Skip to main content
Hallo,

I have a problem with releasing the items from a users worklist so that it is available to everyone in that specific destination queue again.

I get the exception: {"All worklist items have been allocated" }

The code is as follows:

);

//set worklist criteria
objK2WorkListCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.ProcessStatus,"", SourceCode.K2ROM.WCCompare.Equal, 1);
objK2WorkListCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.Or, SourceCode.K2ROM.WCField.ProcessStatus,"", SourceCode.K2ROM.WCCompare.Equal, 2);

objK2WorkListCriteria.Platform = "ASP";

//open the user's worklist
SourceCode.K2ROM.Worklist objWorkList = connK2.OpenWorklist(objK2WorkListCriteria);

//read each item in the user's worklist

foreach(SourceCode.K2ROM.WorklistItem objWorkListItem in objWorkList)
{
string status = "";
status = objWorkListItem.Status.ToString();
string SerialNo = objWorkListItem.SerialNumber.ToString();
//objWorkListItem = connK2.OpenWorklistItem(SerialNo,"ASP");

if(status == "Allocated")
{
SourceCode.K2ROM.WorklistItem objWorkListItemToOpen = connK2.OpenWorklistItem(SerialNo,"ASP");

objWorkListItemToOpen.Release();
}

}
}
catch (Exception ex)
{
throw(ex);
}
finally
{
connK2.Close();

}

}

hi,

we are experiencing a similar problem. did you determine a solution?

mc²
I'm not sure whether a solution was found but remember - You can only release worklist items which have been opened by the logged on user OR the user opening the connection to K2ROM.

Hope this helps,
Ockert
The exception: {"All worklist items have been allocated" }

I don't know if this will help but here goes ...

All worklist items have already been opened and allocated to other users. So you can only redirect them if you login as one of those users or their manager (As Ockert said). If you want to ignore this remeber to set the IgnoreStatus flag in OpenWorklistItem

So
connK2.OpenWorklistItem(SerialNo,"ASP"); 
becomes
connK2.OpenWorklistItem(SerialNo,"ASP", true, true);


The first boolean flag - allocates the Worklist Item to the current user and the second allows you to open the worklist item even though it has been allocated.

Lori

Reply