Setting up a Sync Robot for Reject Votes in Workflow
Detailed guide on setting up a sync robot to monitor and reroute tasks based on reject votes in a workflow. Learn how to listen for reject votes using object-based sync robots and terminate activities accordingly. Examples and steps provided for effective implementation.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Reject on 1stReject Vote Jeff Zemsky April 27th, 2012
Reject on First Reject Vote A sync robot can be set up as detailed below to listen to the vote on each task completion and re-route if a reject vote has been cast. // On the start transition of the voting activity in the workflow, initialize a process variable, // say theActivity to the current activity as shown. theActivity=(wt.workflow.work.WfAssignedActivity)self.getObject(); // Set up an object-based sync robot that listens to the ACTIVITY CONTEXT CHANGED event on theActivity object // Have an expression in the sync robot that uses WfTally to verify if any of the votes has been Rejected // If so, have the sync robot set the result to this value, there would be a link associated with this value Rejected // which diverts the workflow path as desired (to say, a loop-back) System.out.print("Activity changed event fired."); wt.fc.ObjectReference objRef = new wt.fc.ObjectReference(); objRef.setObject(theActivity); result = wt.workflow.work.WfTally.any(objRef, "Rejected", ""); System.out.println("Result is " + result); // Terminate the activity java.lang.String resultStr = (java.lang.String)result; if(resultStr.equalsIgnoreCase("Rejected")){ System.out.println("Found rejected vote ...... terminating Decide activity"); theActivity.changeState(wt.workflow.engine.WfTransition.TERMINATE); } 2