Introduction

Currently, when a user Actions an InfoPath Worklist Item, both the Process level XML as well as the Activity level XML are updated with the provided values by default. This is due to the InfoPathService.asmx web service posting the changes to both levels of XML fields.  In certain scenarios however, the developer needs more flexibility in manipulating these XML values on Activity level prior to the Process level XML being updated.

Changes have been implemented in the InfoPathService.asmx to make this behavior configurable.  A new setting called “UpdateProcessXMLOnAction” in the RuntimeServices’ web.config file has been added. 

This file can be found here: <install dir>\WebServices\RuntimeServices\web.config. Default behavior for this setting or if the setting does not exist is

<add key=”UpdateProcessXMLOnAction” value=”true”/>
Note: Both Process level and Activity level XML will be updated by the webservice.

The developer of the InfoPath integrated process can change this default behavior by changing the setting value to “false” and manipulating the Activity level XML in the code behind the Succeeding Rules of both the InfoPath Client Event as well as the Activity. 

Note: The Process level XML is updated in both these Succeeding Rules and it is up to the developer to decide how and when this update should be overridden.
Important: Both these Succeeding Rules will be evaluated for each user Actioning an InfoPath Worklist Item.  If the Process level XML is not updated by either of these Succeeding Rules, subsequent Activities or Events will not reflect the changes which occurred in the current Activity or Event.

Error Scenario

Note: The circumstances described in this article are one scenario under which this issue may, or is known to occur. The description is intended to be specific to the scenario described and does not take into account all possible scenarios or circumstances.

To reproduce the error :

  1. Create an InfoPath process containing an InfoPath Client Event 
  2. Navigate to the Succeeding Rule of both the InfoPath Client Event and the containing Activity and comment out the code responsible for updating the process level XML. (Look for code containing K2.ProcessInstance.XMLField[“Value”])
  3. Deploy and create a new instance of this process definition.
  4. Through K2 Reporting validate that the process level XML is unchanged.

Error Message
There is no error message displayed.

Error Resolution
This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error.