Task form status failing to update when the task form gets opened, redirected or released via K2 Workspace
kbt151931
PRODUCTIssue
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:
The task status in K2 Manangement fails to update when the task gets released, opened or redirected:
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:
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? 1.) Yes 2.) 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? 1.) Yes 2.) 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;
}
}