Welcome to MSDN Blogs Sign in | Join | Help

Using different InfoPath forms for tasks in your custom workflow

When using InfoPath to design task forms we can easily use different forms for tasks being created by Workflow instance, all you have to do is to extend the workflow.xml setting by adding additional <Taskx_FormURN> child elements under <MetaData> element (where "x" is a zero based index) and setting the SPWorkflowTaskProperties.TaskType to index value.

For example, lets say we want to have different forms for Approval and Verification tasks in our workflow:

Add a seperate element for each IP form to Workflow.xml:

<Task0_FormURN>ApprovalForm_URN_Value</Task0_FormURN>
<Task1_FormURN>VerificationForm_URN_Value<Task1_FormURN>

In your code set the SPWorkflowTaskProperties.TaskType to either 0 or 1 when creating the tasks depends on whether it is an Approval or Verification task.

Published Thursday, February 07, 2008 3:41 AM by AMazaheri

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker