TaskID_FormURN Element (Workflow) - ECM

Applies to: SharePoint Server 2010

In this article
Attributes
Child Elements
Parent Elements
Occurrences

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.

<TaskID_FormURN>
</TaskID_FormURN>

Attributes

Attribute

Description

None

Child Elements

None.

Parent Elements

MetaData

Occurrences

Minimum: 0

Maximum: 1

Remarks

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:

    <Edit>WkTaskIP.aspx</Edit>

  • 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:

    <Display>WkTaskIP.aspx</Display>

    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).

Example

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>

See Also

Concepts

Workflows in SharePoint Server 2010 (ECM)

InfoPath Forms for Workflows (ECM)

Using Microsoft InfoPath 2010 Forms for Workflows (ECM)