Applies to:
startRoute
Developer Process Extensions
Starts an ad-hoc workflow on a SharePoint list item.
You can also add Approval, Activity, and Notification nodes in this ad-hoc workflow.
Argument |
Description |
adHocXml |
Xml based on which workflow is initiated. |
Return Value: None
Example Argument:
<Routes>
<Route Name="Test1" Desc="Desc1" Duration="2" ListName="Lib3" ItemId="2">
<Comment>Starting from Xml</Comment>
<Steps>
<Step Name="FirstApproval" Desc="First Approval of Workflow." Duration="2" Type="Approval" >
<Participants>
<Participant LoginName=" yourdomain\user1"/>
</Participants>
</Step>
<Step Name="WFNotification" Desc="A demo notification." Duration="2" Type="Notification" >
<Participants>
<Participant LoginName=" yourdomain\user2"/>
</Participants>
<Message>
Demo notification.
</Message>
</Step>
<Step Name="WFActivity" Desc="A demo activity." Duration="2" Type="Activity" >
<Participants>
<Participant LoginName=" yourdomain\user1"/>
<Participant LoginName=" yourdomain\user2"/>
<Participant LoginName=" yourdomain\user3"/>
</Participants>
</Step>
</Steps>
</Route>
</Routes>
Argument description
Each Route Node corresponds to a new workflow, and there can be multiple Route Nodes under the parent Routes.
In each Route Node, you can add Workflow steps under the Steps Node. Each Step node can have four attributes:
- Name: Corresponds to the Name property for a workflow step.
- Desc: Corresponds to the Description property for a workflow step.
- Duration: Corresponds to the Duration property for a workflow step.
- Type: Can have any of the following values: Approval, Activity, Notification.
In each “Step” node, you can specify workflow participants. Also note that the Notification Node also has a child node named Message you can customize to change the notification message.