|
|
Re: urgent problem with state of manual activity [message #1653911 is a reply to message #1646929] |
Fri, 06 March 2015 12:47 |
|
It seem like you have assigned that manual activity to a role. hence the activity gets created and is the n suspended in the role worklist, not in the private worklist. It is a good practice to asisgn work to roles instead of individuals whenever possible.
You can change your worklist query to return the role worklist or the items from all worklists that teh user has access to:
ServiceFactory sf = ServiceFactoryLocator.get("motu","motu");
WorkflowService wfs = sf.getWorkflowService();
//WorklistQuery wlq = WorklistQuery.findPrivateWorklist();
WorklistQuery wlq = WorklistQuery.findCompleteWorklist();
Worklist wl = wfs.getWorklist(wlq);
List itemList = wl.getCumulatedItems();
iterator iter = itemList.iterator();
while(iter.hasNext())
{
Object obj = iter.next();
if (obj instanceof ActivityInstance)
{
ActivityInstance ai = (ActivityInstance) obj;
ai = (ActivityInstance) obj;
trace.info(ai.getOID());
}
else
{
trace.info("Item:" + iter.next());
}
}
Alternatively you could assign the activity to the individual user by
a) using a conditional performer (type user) in the process model or
b) delegating it to the private worklist of the target user after it has been created and suspended in the role worklist.
Best regards
Rob
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04956 seconds