Introduction

When working with SharePoint Workflow Client Events there are three types of forms:
  1. Basic Forms.   Includes the comments and actions for the approver, no data fields.
  2. Advanced Forms.   Allows you to include XML and Process Data fields on the user task form.
  3. Custom Forms.   Allows you to customize the form in Visual Studio, no access to the API but allows for look and feel and ADO.NET provider access to SmartObjects.
Note: This knowledge base article describes several tips for working with these forms, with special focus on deployment.

Multiple Form Types

SharePoint allows for one Content Type to be associated with a workflow. When using multiple form types within a process, multiple Content Types would need to be associated, which is not possible.
The K2 process will look at the first client event that is described in the process flow, and associate that content type with the process.
So for example, you have a process with a Manager Approval activity followed by an HR Approval activity. The Manager Approval event uses the basic forms, while the HR Approval event uses advanced forms. The process will be bound to the basic form Content Type; therefore, the HR event will also display the basic form and ignore the fields you added to the advanced form.
To solve this, ensure that the first Client Event in the process matches the most advanced form type you will use throughout your process OR use the same form type for all client events in your process. Now all your Client Events will display the proper fields throughout your process.

Deployment Considerations

After you have deployed your SharePoint Workflow Integration process, you may decide you want to change the form type on one or more of your Client Events. There are several things you should do before redeploying your process to ensure that the SharePoint Workflow association and process work properly:

  1. Before deploying your process, remove the workflow association from your List or Library. This is done through the workflow settings option on the List or Library settings page. Removing the workflow association will ensure that the new process and the new form Content Types will be associated correctly.
  2. Next, perform an IISReset on your SharePoint server to ensure that all content types and forms held in memory are released.
  3. Then, deploy your process with the new form changes.
  4. After the deployment has succeeded, perform another IISReset to ensure that the changes are picked up successfully by SharePoint.

Following these steps will ensure that your new form types and client events are deployed and associated correctly.