LEGACY CONTENT
This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Introduction

When using code to Release a K2 Worklist item and then Action that same item, the wrong user is displayed as the actioner of the K2 Worklist item. This is due to the SlotID table in the K2 Server Log SQL database not being set correctly when using the code to perform these specific actions.

Error Scenario Steps

Note: The steps below describe one scenario under which this error may occur. The steps below are simplified and not all the steps will be shown or described.
  1. Create a K2 Process with a Default Client Event and 2 destination users.
  2. Create a Windows or Web application to action these K2 Worklist items with code similar to:

    Dim connStr As String = "Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=localhost;Port=5252"
    Dim conn As New SourceCode.Workflow.Client.Connection
    conn.Open("localhost", connStr)
    Dim myWorkItem As SourceCode.Workflow.Client.WorklistItem
    myWorkItem = conn.OpenWorklistItem(Page.Request.QueryString("SN").ToString, "ASP", False, True)
    myWorkItem.Release()
    myWorkItem.Actions("Task Completed").Execute(True)
  3. Start an instance of the process
  4. Action a K2 Worklist item with the above code
  5. Run the following query on the K2 Server Log SQL database:
    SELECT *, (SELECT [NAME] FROM [K2SERVERLOG].[DBO]._ACT
    WHERE ID = (SELECT DISTINCT(ACTID) FROM [K2SERVERLOG].[DBO]._ACTINST
    WHERE ID = P.ACTINSTID
    AND PROCINSTID = P.PROCINSTID ))
    FROM [K2SERVERLOG].[DBO]._ACTINSTSLOT P
    ORDER BY STARTDATE
  6. The ID column remains zero, indicating the incorrect user who actioned the K2 Worklist item

Error Messages

The following error messages relate to this issue:
  • No Error Message : When doing a SQL Select query, the incorrect actioner of the K2 Worklist item is returned. This results in K2 Reporting functionality being incorrect as well

Error Resolution

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

The latest K2 blackpearl 0807 Update is available as an independent installation package which can be found here: https://portal.k2.com/downloads/bp/default.aspx.