Introduction

In a K2 process that is designed to run SharePoint Integration Client Events in parallel, the following issues have been experienced if all the events have the same name and the "All at Once" planning option per destination set is selected:

  1. When the user actions the first event in the K2 process all the other events will also complete irrespective of the assigned destination user.
  2. If, for example, five SharePoint Client Events are created as shown in the image below, and each event is assigned a different destination user, at runtime five worklist items will be created in the K2 worklist. However, in the SharePoint Workflow Status page only three will be visible.

     

 

Note: For running instances there are manual steps required to ensure that the instances continue to function as normal after this hotfix has been applied. These steps are detailed in the Error Resolution section below.

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 this error:

  1. Create a SharePoint Workflow Integrated process containing multiple parallel SharePoint Workflow Integrated Client Events. Give all the events the same name.
  2. Integrate the process with a SharePoint document library and configure it to start automatically when a new item is added to the library.
  3. Assign a different destination user to each of the parallel activities containing the SharePoint Client Events.
  4. Start an instance of the K2 process.
  5. Worklist items will be created successfully for each of the different destination users and will be visible in their individual K2 Worklists.
  6. Browse to the Workflow Status page in SharePoint and notice that not all the items are listed. There will be some items missing.

Error Message

No Error message is displayed. Worklist items will be missing.


Error Resolution

This Hotfix is contained within the latest K2 Update.

  1. Install the update package to resolve the error.
  2. To avoid an “Object Reference not set to an instance” error occurring on running instances after installing the hotfix, it is necessary to update the Design Templates and redeploy the processes.

Complete the following steps to update the Design Template:

  1. Open the existing process in K2 Designer for Visual Studio or K2 Studio.
  2. Right-click on the design canvas and select ‘Update Design Template’.
  3. Select the items to be updated by checking the relevant check box.
  4. Click Finish.
  5. Save and redeploy the process.

If an existing process instance is actioned before the Design Template is updated an Object reference error will occur. In this instance a GOTO the next activity will be required for the process to continue.

To perform a GOTO follow the steps below:

  1. Open K2 Workspace >K2 Management Console >Workflow Server> Instances.
  2. Select the instance that is causing the Object Reference error.
  3. Click on the Goto Activity button displayed on the menu bar.
  4. Click on the Activity that the process instance is to be taken to.