cancel
Showing results for 
Search instead for 
Did you mean: 

How can we "skip" an approver in Contract workflow?

Former Member
0 Kudos

Hello experts,

We have a requirement for Contract Document workflow where the next approver is based on some custom fields that are part of the Contract document. For example, if the custom checkbox "No legal approver required" is checked, then we need to skip the Legal user and move forward to the next approver in the chain. So in the XPDL, for the block "Legal Approver" I added the logic in PreScript to read this checkbox and call addApprover method only if NoLegalApproverRequired is unchecked. But the problem is that the workflow gets stuck in this block if this checkbox is checked. It is not automatically moving forward to the next approver. Is there any method available where I can force the status to change to "Approved" and move forward?

The "doc" object available to prescript refers to the Contract document. From there how do I access the relevant class where I can add logic to autoapprove? I am not able to figure out to which class the methods "addApprover" and "cancelProcess" belong.. please help.

Thanks in advance!

Gayathri

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Got the solution! We can call multiple "addApprover" methods from inside a single activity block..I was assuming that each step in the approval process needs to be represented by a blue box in the XPDL. However a single block also can have prescript code where we read say all approvers from a custom collection and add them as approvers.. Tried it this way and it worked!