Follow examples that use ProcessMaker Decision Tables to guide and inspire your own ProcessMaker implementations.
Loading...
Loading...
Intended audience: Process Owners and Designers
Tags: Decision Table; Request Variables; Formulas
This example show how to use formulas in a Decision table. The Decision table used in this example has four input columns: Gross Income, Credit Score, Loan Amount Requested, and Net Income. The table also has one output column: Approval Status.
Click on the following link to download this Decision Table.
Follow these steps to import and use this Decision Table:
Click Browse to locate the downloaded Decision Table.
Click Import. The Import Decision Table screen displays to indicate that the Decision Table imported correctly.
From the Preview options on the right, select Sample Input to test the Decision Table.
Enter the following JSON data.
Modify the JSON as needed to try out different input values.
Insert a Decision Task into a process and configure properties to use Decision Tables in your processes.
Decision Tables using Collections and Variables in the Inputs
Intended audience: Process designers, Web designers
Tags: Decision Table; Request Variables; Magic Variables; Collections; Mustache Syntax
This example shows Decision Table Inputs calling Collections through mustache syntax. And you can call specific rows and fields delimited by dots.
This example also shows Decision Table Inputs calling Request variables and Magic variables through mustache syntax.
This example compares a loan ratio, which is stored in a Request variable with credit scores, that are stored in a Collection. Then, this Decision Table rates a loan ratio and credit scores to see if lenders are creditworthy for a loan.
Follow these steps to add a Decision Table:
To use the Decision Table with a variable, create an Environment Variable called loanRatio
that works on a Screen to enter data.
Import the Collection fico_scores.json, which is at the end of this example. It has data about credit scores, which is on the page MyFico.
Import the Decision Table Decision Table v4.json, which is at the end of this example. The editor displays the imported Decision Table.
It displays the following:
The input Borrower Credit Score, which conditions the number score from the Collection FICO Score that has been previously imported. The Collection is called using mustache syntax, calls the row number, and the Collection field score.
The input Front-End Ratio conditions the variable loanRatio
by entering mustache syntax and selecting the variable.
According how the Inputs rate, the Borrower Rating output displays features for lenders and its creditworthiness.
Test your Decision Table to see data outputs.
On the left side of the Decision Table, Click Sample Input. The JSON data model for the Decision Table displays.
Add the loanRatio
object in the JSON model.
Enter values as follows:
Click Run.
If the Decision Table evaluates successfully, its output displays in the Output panel‌ as follows:
Click the Import button. The Import Decision Table displays.
From the list of Decision tables, click the menu next to the table just created, and select Edit to open the Decision Table for editing.
Click on the formula icon to view the formula defined on this column. This formula uses Request Variables, income and tax, which are part of the JSON data for the request.
Click Run to test the table. The table output will be shown in the Output section.