Last Updated: 02/15/2016Introduced in Verision: 2.0
Decisions includes a pre-built approval flow. This flow allows you to quickly create a flow that requires approval. In the example below, we will demonstrate how to use this pre-built approval flow to quickly create a simple request flow that requires approval.
In this new flow, place a new form step as the flow’s first step (see Creating Your First Form). On your form, place controls to collect information like “Request Subject,” “Request Details,” and “Needed by Date.” Below is a sample of a basic request form
Back in the flow designer toolbox, navigate to Integration > Approvals and drag Run Approval Flow onto the canvas and connect from the Submit path of your form step.
Using the output data variables from your Simple Request Form map to the corresponding inputs of the Run Approval Flow step (see Using the Mapping Editor). Also set value for AssumeRejectOnExpire to Constant and checked (checked = true). Remain in this mapping editor and proceed to next step below.
Set ApprovalChain to Constant and click the ellipses (…) next to Values. This will bring up the Approval Chain editor. Enter All Users in the first text box. Then click OK to save the approval chain and click OK to save the mappings you just configured. (note: the reason we entered All Users in the approval chain is so that your user is guaranteed to get assigned the approval task when you test the flow below).
Connect the Approve and Reject paths to the End step. In a real approval flow you would configure steps on each of these paths to do the desired behavior for either Approve and Reject requests. For example, your flow could send a “Request Approved” email on the Approve path and a “Request Rejected” email on the Reject path.
Now you are ready to run your flow in the debugger.
Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.
First you will see the Simple Approval Form you wrote. Fill it out and click Submit.
You will see a dialog like the one below. Click Yes.
You will now see the Approval form that is part of the pre-built approval flow delivered with Decisions. Fill out the form and click either Reject or Approve.