Activity Succeeding rules (activities that contained a K2 SharePoint Workflow Integration Client Event) and Process Finish rules used to call webservices synchronously, which caused excessive loads on the K2 Server.
All executions are now performed asynchronously. This can, however, be changed by a developer, allowing the rules to run synchronously should that be needed. Thhis performance enhancement improves the runtime execution of the K2 Schedules on the K2 Server, and can be most noted when a Succeeding Rule is fired on the Client Events.
This improvement is configurable in the main method of the @safeitemname@.cs file, which may be located at:
CodeExtender\1033\WorkflowIntegration.ClientSucceedingRule\@safeitemname@.cs (Schedule in main Method)
The following code gets used within the client event succeeding rule. A developer has the option to uncomment the synchronous call and comment out the asynchronously call.
Note: The second line of code can be uncommented and used to call the workflow clean up Sync in place of Async. Remember to comment out the first line if uncommenting the second line.
K2SPWorkflow.SPWorkflowTaskCleanupAsync(K2.Activitylnstance.Activity.Name, K2IntegrationData); [This is the default asynchronous call]
// K2SPWorkflows.SPWorkflowTaskCleanup(K2.Activitylnstance.Activity.Name, K2IntegrationData); [This is the commented out synchronous call]
|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 this error:
- Create a K2 SharePoint Workflow Integration process integrated with a SharePoint list.
- Add K2 SharePoint Workflow Integration Client Events to the process.
- Deploy the process and run instances.
- Execute the Client Events in SharePoint and finish the process instances.
There are no errors. This is a performance enhancement.
This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error.