Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Is there a way to get this routing choices from an user work item. I do not see any api to get routing choices before the work item is completed. It appears that they are generated dynamically. Any ideas?
I appreciate any help.
thanks.
Hi Preeti,
Can you try following API to check if you get the routing list.
ObjectIdentifier oid= ObjectIdentifier.newObjectIdentifier("wt.workflow.work.WorkItem:xxxxxx");
wt.workflow.work.WorkItem work=(WorkItem) PersistenceHelper.manager.refresh(oid);
WfActivity activity = (WfActivity)(work.getSource().getObject());
System.out.println(activity.getUserEventList());
Thanks Bhushan for your help. I found it already. It was just tedious to get to this api. 🙂
Preeti
Hi Preeti,
Yes, the dataUtility on this page gets the routing options from the commandBean and it is not easy to figure out how the bean gets populated with the values. Can you share your findings or mark if the above API worked for you.
Regards,
Bhushan
Yes Bhushan. The api worked liked a charm. 🙂
java.util.Vector v=((wt.workflow.work.WfAssignedActivity) workItems.getSource().getObject()).getUserEventList(); |
how can we get user selected routing name from routing options through API .
Actually below api
WfAssignedActivity wa = (WfAssignedActivity) wi.getSource().getObject();
System.out.println("getUserEventList&&&&&&"+wa.getUserEventList());
this one gives list of routing option .
O/p is getUserEventList&&&&&&[Ready for Review, Validate Business Rules, QSS Review]
Suppose user select QSS review so how can i get in code user selected routing
Pls reply
Hi @AA_9841156
Try this method.
WorkItem workItem = (WorkItem) null; // workitem is the task from Workflow
Vector options = new Vector();
options.addElement("Approve");
options.addElement("Reject");
options.addElement("Rework");
Vector vResult = wt.workflow.work.WfTally.any(workItem.getSource(), options);
PetrH