Sharepoint Workflow (2)

To add a breakpoint, switch to design view, and click the activity, press F9. You will see a red dot next to the activity.

Workflow association is indictaed in the Elements.xml.

If you want to associate a workflow with a Content Type, change it to:

In workflow’s property, if the Auto Associate is set to True (default), then the association will be made upon deployment. If you want to associate manually, then set it to False.

Once deployed, you can go to each content type and associate with a workflow manually.

Association Form — An association form is a regular ASPX form that gets deployed together with your workflow and is displayed to the person who is responsible for associating the workflow. End users usually won’t be the ones who associate workflows; this is typically done by a site owner or administrator.

Initiation form — Allows the workflow to gather input each time the workflow is started
. Initiation forms are only displayed when a workflow is started manually by a user
, not when a workflow is automatically started when an item is added or updated in a list.

A workflow can only have one association form and one initiation form. Linked to the workflow using Elements.xml.(AssociationUrl and InstantiationUrl)

Some misc notes: To add a task to the originator of the workflow. (TaksID and TaskProperty both set to Create Field)

Right click workflow project item, and select Add New Item

Add a Workflow Association Form

The Elements.xml automatically updates the AssociateUrl information.

Add one label and one textbox in the Main area.


Switch to the code view, locate GetAssociationData method and update it:

Association Form is done. Next is the initiation form.

Add a new Workflow Initiation Form, name WWF-INI.aspx.

Again the Elements.xml is updated:

Similarly, add a label and textbox control to capture amt total from user. In the code view, locate GetInitiationData and update the code.

Drag IFElse to under the onWorkflowActivated.

Click on IfElseBranchActivity1, and click the Condition Name in property pane.

Add one condition to compare the INI data with the ASSO data.


























Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: