Returning a Promotion Request from multiple reviewers
Hi everybody.
My Promotion Request workflow has a Review Task where the author can select one or more reviewers to do it. In case of multiple reviewers, all of the votes are required to continue the workflow.
In the Review TaskI have the following routing expression:
Vector v = new Vector();
v.addElement("Approve");
v.addElement("Reject");
v.addElement("Rework");
Vector vResult = wt.workflow.work.WfTally.any(self, v);
if( vResult.contains("Rework")) {
result = "Rework";
} else if ( vResult.contains("Reject") ) {
result = "Reject";
} else {
vResult = WfTally.all(self,v);
if( !vResult.isEmpty() ) {
result = (String)vResult.get(0);
}
}
This is default, I think, just to set the result to Rework or Reject when there's one of these votes in a multiple reviewer situation.
But what I want is complete or finish the pending Review Tasks automaticaly when there is a vote for Rework or Reject. If one reviewer already rejected or set for rework the objects, I don't want the other reviewers wasting time checking the objects. I want to finish the pending tasks and complete the Promotion (in case of reject) or create the Rework Task (in case of Rework) right after the first vote of these.
Thanks in advance!
Configuration Analyst at Mectron Odebrecht

