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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Getting Routing choices from a Work Item

PreetiGupta
14-Alexandrite

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
BhushanNehe
14-Alexandrite
(To:PreetiGupta)

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

PreetiGupta
14-Alexandrite
(To:BhushanNehe)

Thanks Bhushan for your help. I found it already. It was just tedious to get to this api. 🙂

Preeti

BhushanNehe
14-Alexandrite
(To:PreetiGupta)

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

PreetiGupta
14-Alexandrite
(To:BhushanNehe)

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 

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