Introduction

An enhancement was made relating to the way K2 creates certain data fields during designing processes in K2 Designer for SharePoint. These fields are related to destination sets on User Tasks as well as merge rules on activities.  The change will only be noticed when a K2 Designer for SharePoint process is exported to K2 Designer for Visual Studio and will not affect users running the workflow as there is no user interface change.  The enhancement was made to improve performance on workflow instances.

Data Fields Changed

The following data fields are affected:

  • [ActivityName]_Destinations  
  • [ActivityName]_ResultCompare 
  • [ActivityName]_ResultRecorder
  • [ActivityName]_OutcomeCount
  • [ActivityName]_Outcome
  • [ActivityName]_Notes

Changes made on the Data Fields

This is an explanation on what exactly changed on the above mentioned data fields.  These fields are now all included into one XML field and will no longer be separate fields.  All these fields will now form part of the WorkflowMetadata field in the ServerLog.ProcInstXML table in the K2 Database. 

 1.  [ActivityName]_Destinations:

      The data will only be added to the new XML field if runtime participants exist on a User Task.

 2.  [ActivityName]_ResultCompare

      The data will only be added to the new XML field if a merge rule exists on an activity.

 3.  [ActivityName]_ResultRecorder

      The data will only be added to the new XML field if a merge rule exists on an activity.

 4.  [ActivityName]_OutcomeCount

      This section has been removed.

 5.  [ActivityName]_Outcome

      This section has been removed.

 6.  [ActivityName]_Notes

      The data will be created for all activities if present. 

New XML Field Example

Below is an example of the new XML field structure:

 

<ReferenceFields>

       <Activity name="ManagerApproval">

             <Notes/>

             <ResultRecorder/>

             <ResultCompare/>

             <Destinations frontend="true" minusers="1" maxusers="1" type="Editable" serial="False">

                    ...

             </Destinations>

       </Activity>           

</ReferenceFields>


Process Example

In the image below is an example of a K2 Designer for SharePoint process containing runtime participants as well as a merge rule.  The merge rule is set up on the Placeholder1 activity.  Runtime participants are set up on Task One.  Most of the activities have got notes attached to them.

Image

XML Example based on the Process Example

The example as illustrated in Image 2 below is based on the process as shown in Image 1.  Note the Destination section, Notes sections and both the ResultRecorder and ResultCompare sections. 

Task One is set up with Runtime Participants, Placeholder 1 is setup with a merge rule which is the data added to ResultRecorder and ResultCompare and some of the activities with placeholder events have got notes.

Image

Notes

Note that if for example a SmartObject was used to retrieve the old data fields in a process, these will not exist anymore and need to be reconfigured to use the new XML field.