cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Getting Routing choices from a Work Item

PreetiGupta
15-Moonstone

Getting Routing choices from a Work Item

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?

2016-08-04_8-46-45.gif

I appreciate any help.

thanks.

7 REPLIES 7

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();

hi @PreetiGupta   @BhushanNehe 

 

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 

HelesicPetr
22-Sapphire II
(To:AA_9841156)

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

thanks @HelesicPetr  Its working great!

Announcements

Top Tags