This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

When using K2 blackpearl 4.7 where you have a workflow that has a user task assigned to a group of users; when any of the users in the group opens the task, the task status will change from ‘available’ to ‘open’ (and vise versa) when the task is ‘released’.  In 4.7 we could expand out the group to show all the users and see which user had it open and then click that row to release it back.

In K2 Five it appears that you cannot expand out the step. K2 Five does not release it. An "OK" message appears like it's done but the status of the task does not change from 'open' to 'available.'

Symptoms

After opening the task in K2 Workspace, when looking at the task status in K2 Management to see if it has updated from ‘available’ to ‘open’, the task status remains ‘available’. The same thing happens when redirecting the task.

Opening task in K2 Workspace:

Image

The task status in K2 Manangement fails to update when the task gets released, opened or redirected:

Image

Troubleshooting Steps

This has been identified as a bug.

As a workaround please do the following:

1. Use the following SQL Query to see who opened the task:

SELECT WLS.ProcInstID, WLS.ActInstID, A.ActionerName FROM Server.WorklistSlot WLS JOIN Server.Actioner A ON A.ID = WLS.ActionerID WHERE WLS.ProcInstID = /*ProcInstID From Serial #*/;

You can then plug the output into the console app (api code below) which is used to release the task.

2. Releasing the task via the api: 

string user, answer, sn, answerv2;
int answerToINT, answerv2ToINT;
SourceCode.Workflow.Client.Connection theConnection = new SourceCode.Workflow.Client.Connection();
theConnection.Open("localhost");
Console.WriteLine("Who would you like to impersonate?");
user = Console.ReadLine();
theConnection.ImpersonateUser("DENALLIX\\" + user);
WorklistCriteria wc = new WorklistCriteria();
wc.NoData = true;
Worklist theWorklist = theConnection.OpenWorklist(wc);
foreach (WorklistItem wlitem in theWorklist)
{
Console.WriteLine(wlitem.SerialNumber + " : " + wlitem.Status);
}
Console.WriteLine("Open Item?\n1.) Yes\n2.) No");
answer = Console.ReadLine();
answerToINT = Int32.Parse(answer);
if (answerToINT == 1)
{
Console.WriteLine("Serial No: ");
sn = Console.ReadLine();
WorklistItem theItem = theConnection.OpenWorklistItem(sn);
string status = theItem.Status.ToString();
release:
Console.WriteLine("Status is " + status + " Release Now?\n1.) Yes\n2.) No");
answerv2 = Console.ReadLine();
answerv2ToINT = Int32.Parse(answerv2);
if (answerv2ToINT == 1)
{
theItem.Release();
string statusv2 = theItem.Status.ToString();
Console.WriteLine("Status is now " + statusv2);
}
if (answerv2ToINT == 2)
{
goto release;
}
}