Designers > K2 Designer for SharePoint 2010 > Configuration Settings for K2 for SharePoint 2010 > InfoPath Versioning > InfoPath Versioning - Using InfoPath Versioning | Send feedback |
![]() |
A single InfoPath form (*.XSN) can be used with a single Workflow in K2 Designer for SharePoint |
The following example illustrates the versioning when using more than one InfoPath form on a SharePoint Form Library.
Using InfoPath integration with the K2 Designer for SharePoint, three forms are used in the illustration below:
The three forms are stored in the Forms folder of the SharePoint Form Library. The Open with Explorer library menu item can be used to view the list of InfoPath forms and form versions in the specific Form Library in Explorer mode.
When creating a new Workflow in this library, these forms are available for selection in the Workflow Settings wizard. The specific version of a form can therefore be selected per Workflow.
If Form1 is selected, it is associated with the Workflow and a time stamp is added to the form when the Workflow is deployed. This can be viewed in Explorer mode.
Form2 can similarly be associated with another Workflow in the same Form Library and will be saved to the Forms folder with a time stamp.
The last version that is active, can be viewed when navigating to Library Settings>Advanced Settings. The url of the last template used can be found in the Document Template section.
The following scenarios can exist when editing InfoPath forms:
Edit the original form
When editing the original InfoPath form and fields are deleted for example, and have previously been used in the associated K2 Designer for SharePoint Workflow, the fields have to be manually deleted and replaced in the Workflow with an existing field to ensure that the Workflow can still be deployed successfully.
Example: If a field was used as an Action field in the Workflow and this field is deleted when editing the InfoPath form, the field will not exist anymore when opening the Workflow again. To bring the Workflow in sync with the edited InfoPath form, edit the Workflow in K2 Designer for SharePoint and replace the Action field with another field that is available in the InfoPath form after being edited. The Workflow will now deploy successfully.
Edit the original form and save as a new form
When editing the original InfoPath form that is associated with a K2 Designer for SharePoint Workflow, and saving it as a new form, the new form has to be selected in the K2 Designer for SharePoint Workflow to enable the Workflow to use the correct version of the Workflow.
Example: If Form1 was associated in a Workflow and this form is edited and saved as another form (Form2) in Explorer mode, open the Workflow in the K2 Designer for SharePoint , go to the Start event, open the Workflow Settings wizard and navigate to the Workflow Settings>Start Form screen. The new form (Form2) will be listed and can be selected to start the Workflow with. If there were any changes to the views of the form, these will be updated when selecting the new form.
Perform the steps in the following order to ensure that the Workflow and form association is kept in sync:
![]() |
It is important to note that when saving the original form as a new form, the new form should NOT be published to the Form Library as this will cause the Workflow and form association to be out of sync. If Workflow instances are started, it will cause errors. |
When saving a K2 Designer for SharePoint Workflow as a Studio Designer File (*.kprx) and subsequently opening this Workflow in K2 Studio or K2 Designer for Visual Studio and the Workflow is using InfoPath Integration, it is important to note the following:
When saving the K2 Designer for SharePoint Workflow, the xsn (InfoPath template) is added to the K2 project and the path is saved within the manifest of the xsn. When clicking on the Design option of the template within K2 Studio or K2 Designer for Visual Studio, and the manifest path differs from the path the xsn is currently saved in, InfoPath will automatically ask for a Save As path. When this happens, Save the InfoPath file to the path within the K2 Studio or K2 Designer for Visual Studio project, in other words overwrite the original file. The manifest path and the actual template path will now be in sync.
It is important to take note of the following statements: