TaskID_FormURN Element (Workflow) - ECM
Last modified: May 07, 2010
Applies to: SharePoint Server 2010
Specifies a Microsoft InfoPath 2010 form as the custom edit form for this workflow task, where ID represents the task type integer ID of the task.
To differentiate the task types that your workflow creates, assign each task type an integer identifier within that workflow. The first task type is 0, the second 1, and so on. This enables you to assign different content types, and thereby different forms, to each task type. These task type identifiers must be unique only within a specific workflow.
Before you set this element, you must set two other pieces of data.
First, specify a custom form in the content type definition of the task's content type:
To use a custom InfoPath 2010 form as the task edit form, you must set the edit form of the task content type to the following value:
To use a custom InfoPath 2010 form as the display edit form, you must set the display form of the task content type to the following value:
For more information on specifying custom forms for content types, see see FormUrls Schema Overview in the Microsoft SharePoint 2010 Software Development Kit (SDK).
Next, use the CreateTaskWithContentType workflow activity to create the task in your workflow. Use the TaskId property to set the task ID, and the ContentTypeId property to specify the task's content type.
For more information about designing Microsoft InfoPath 2010 forms to use as workflow task edit forms, see Workflow Task Forms in SharePoint Server 2010 (ECM).
The following example specifies custom edit forms for three types of tasks included in the workflow.
<MetaData> … <Task0_FormURN>urn:schemas-adventureworks-com:workflow:ReviewRouting-Review</Task0_FormURN> <Task1_FormURN>urn:schemas-adventureworks-com:workflow:ReviewRouting-Review</Task1_FormURN> <Task2_FormURN>urn:schemas-adventureworks-com:workflow:ReviewRouting-Review</Task2_FormURN> … </MetaData>