Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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?
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);