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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

I need to Determine what a vote value is for a given review task in hand

ptc-775300
3-Newcomer

I need to Determine what a vote value is for a given review task in hand

I have a situation where I need to know whether the user chose an approve or reject task option in a standard Review workflow task.  I plan to use the complete transition in the task to place my code.  I need to test the value before the task goes away so I make the system take the proper action.  For example, let's say three people were in the review.  If the first reviewer says approve, then I want the task to call custom code x.  If the next reviewer rejects then I want the task to call custom code y.  The same for the third user and so forth.

Simplistically I need the task to do this:

get the task vote

if vote equals approve

    call approval code

else

    call reject code

=====

There plenty of examples on how to use tally for obtaining all the votes for a given review but there isn't an example for how to look at the vote of the task in hand.

 

Any suggestions?

1 REPLY 1
vkadu
5-Regular Member
(To:ptc-775300)

You can refer to below snippet for reference. I have tested this expression in workflow template (in a limited fashion )and connected it with the Review task activity, however, the method used  (getVotingEvents) is NOT supported for customization.  

 

wt.fc.collections.WTArrayList auditCol = (wt.fc.collections.WTArrayList) wt.workflow.engine.WfEngineHelper.service.getVotingEvents((wt.workflow.engine.WfProcess)self.getObject(), null, null, null);
Announcements


Top Tags