Using the Approvals Module
  • Updated on 22 Oct 2015
  • 3 minutes to read
  • Print
  • Dark
    Light

Using the Approvals Module

  • Print
  • Dark
    Light

This tutorial demonstrates how to use Truth Table and simple Approval Chain to create ad hoc approval applications.
Example:
In this example use a Truth Table that outputs an Approval Chain based on the input.
Note: install the Approvals feature in Decisions to access some steps. This feature can be found under  System > Administration > Features.
2018-09-14_155559.jpg

Begin in the Designer Folder with clicking Create Rule > Create Truth Table on theFolder Actions Panel.
Then, Name the Truth Table and select Create to proceed to the Rule Designer.
2018-09-14_155944.jpg

In the Rule Designer locate Output Section and using Output Type picker select Approval Chain type.
Then, Ignore Outcome Data [Default].
2018-09-14_160239.jpg

Next, in the Rule Input Data select Show Editor link to add an input for the Truth TableName the input and define its type String . Select Ok to save and close Rule Input definition window.
2018-09-14_161200.jpg

Next, on the workspace are going to define a condition for theTruth Table . First, select [Select Data Element] and select Rule Input that was defined for this Truth Table.
2018-09-14_161225.jpg

Next, select [Pick Verb] and choose Equals verb for the Truth Table condition.
2018-09-14_161240.jpg

Then, wselect the empty dashes link under ApproverEmail Equals and define a Constantadmin@decisions.comEmail .
2018-09-14_161310.jpg

Next, under Result select the empty dashes . Because the Truth Table outputs Approval Chain , build a Constant Simple Approval Chain . For the Approval Chain Value , select ellipses to create an Approval Chain . In the resulting window, Add Account to the first level of approvers. This is done by typing the name or email of an approver. Decisions will try to auto-complete the name based on accounts that exist within Decisions.
When the account or group appears in the auto-complete, pick that and click Ok.
2018-09-14_161358.jpg

Then, select add row link to create the second case of the Approval Chain.
2018-09-14_161501.jpg

In the same manner, define Constant Input email to the Truth Table and create Constant Approval Chain. Add Account to the first level of Approvers . Chose an existing Account that matches the Input for this row and select Ok . Save and close row definition editor.
2018-09-14_161639.jpg

The Truth Table is completed. Save it and close Rule Designer.
2018-09-14_161653.jpg

Next, create a simple Flow to demonstrate the use of the Truth Table that outputs Approval Chain based on the input. In the Designer Folder , selectCreate Flow on the Folder Actions Panel .
In the resulting window, Name the Flow and select Create to proceed to the Flow Designer .
2018-09-14_161841.jpg

In the Flow Designer , add Show Form component from theFavorite Steps category. Create a simple Form where User should be able to pick Approver .
2018-09-14_162008.jpg

In the resulting window, Name the Form and select Create to proceed to the Form Designer.
2018-09-14_162040.jpg

The Form is designed with a Title (Label component) , Radio Button List that represents two options for the Truth Table , and a Submit Button. When finished designing the Form , save the Form and close Form Designer.
2018-09-14_162300.jpg

Back in the Flow Designer , add the Truth Table. Add [Pick or Create Truth Table] step from theFlows, Rules, Forms, and Reports > Rules category.
2018-09-14_162335.jpg

Then, select Pick or Create Truth Table link.
Next, locate the Truth Table and click Pick .
2018-09-14_162347.jpg

In the resulting window pick Select Value Mapping type for Approver Email input to the Truth Table.
2018-09-14_162458.jpg

Then, using Path picker select Approver outcome from the Form and select Ok .
Next, add Get Approval step from Integrations > Approvals > Approvals Core category, or it can be found using the search function.
2018-09-14_162552.jpg

Then,  connect all outcomes from the Get Approval step to the End step in our Flow
Select Get Approval step on the workspace and select Edit Input Mappings option.
2018-09-14_162832.jpg

In the Mapping Editor, connect First Approval Chain from the outcome from the Truth Table to the Approval Chain field. Then, for the simplicity of this example, Ignore other inputs into Get Approval step. Save and close Mapping Editor.
2018-09-14_162912.jpg

This completes our Flow . To test it, selectDebug link on the top panel of the Flow Designer.
This Flow is executed under an admin Account . Select admin Account on the Form and click Submit .
2018-09-14_163010.jpg

Then, the Flow executes to the end with no issues.
TableApprovalChain_Debug_Admin_Done.jpg

Was this article helpful?