Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Edit Decision Tables to design complex business rules in an intuitive spreadsheet interface for use in any Process model.
Learn what are the components of a Decision Table in ProcessMaker Platform.
The Decisions Table package must be installed to use Decision Table Editor.
A Decision Table is a two-dimensional grid that outlines the different possible business conditions that can occur for a particular data output. The data output then affects the workflow routing for any Request that references that decision table. The Decision Table represents business rules from which to evaluate how to route Requests for a Process. Below is a Decision Table edited in Decision Table Editor. Decision Tables are Decision Model and Notation (DMN) files.
A Decision Table is a set of decisions. Each row in a Decision Table represents one decision. In the example in the Overview, there are three decisions. As a best practice, describe each decision for greater clarity. Collectively, this set of decisions represents business rules for that use case.
Each decision contains the following:
Condition(s): Conditions are the inputs that must occur for each decision. A decision variable represents one condition in each decision. A decision may be composed of multiple conditions, and therefore affect multiple Request variables. However, each decision must have at least one input. In the example in the Overview, there are four possible inputs, though in the second decision only three inputs are evaluated; the Commercial Industry input is not considered in that decision because it either is not relevant or is not expected to be in that Request's JSON data model to be evaluated. A Decision Table may contain many decisions that apply to multiple intended Process models. Therefore, some inputs or outputs may not apply to all Process models that a Decision Table is to be referenced.
Output(s): The output sets the value to a specified Request variable when the input(s) for each decision occur. This output Request variable then affects workflow routing in that Request. A decision may have multiple outputs, and therefore affect multiple Request variables. However, each decision must have at least one output. Outputs in a Decision Table are denoted with blue coloring in the table header. In the example above, there is one output.
Each input and output for a decision has the following:
Label: Both inputs and outputs have labels that briefly describe that aspect of the decision. The label is independent of any labels used in Screen design for a control label or a Process model element label since Decision Tables are independent of Processes. Labels are in bold in the Decision Table header.
Decision variable name: Both inputs and outputs must have a decision variable for that input or output:
Input(s): The decision variable provides a value for that input to evaluate that condition. When configuring a Decision Task connector, data from the in-progress Request maps to the decision variable for each input so as to evaluate that Request data's condition.
Output(s): The decision variable value in that decision outputs that value to the in-progress Request's JSON data model, thereby affecting workflow routing for that Request. Therefore, it is important to understand the names of the decision variables and how they would correspond with an intended Request variable.
Request variables display below their labels in the header.
A decision variable represents the value for decision input or output. Decision variables are independent of Request variables because a Decision Table can be used in multiple Processes. The name of the decision variable can be identical to that of a Request variable, but is not required. After a Decision Task connector references a Decision Table during its configuration, map the referenced Decision Table's variables to and from the Request variables to transfer Request data to and from the Request. Therefore the decision variable names can be the same or different from the names of Request variables intended to transfer data.
By default, decision variables are of string
data type. A decision variable may be of any of the following data types:
boolean: The decision variable represents one of two possible values (usually denoted TRUE
and FALSE
).
date: The decision variable represents a date. The date is in the following format: YYYY-MM-DD
. Example: "2020-07-01"
.
datetime: The decision variable represents a datetime. The datetime is in the following format: YYYY-MM-DD HH:MM:SS
. Example: "2020-07-01 14:25:15"
.
number: The decision variable represents a number.
string: The decision variable represents a string.
time: The decision variable represents a time. Example: 14:25:15
.
The following are some examples of conditions. Take into account that the Decision Tables package uses the Drools engine to evaluate business rules, which is based on the Decision Model and Notation (DMN) and Friendly Enough Expression Language (FEEL) standards. Therefore, to view more condition examples, see Drools Documentation and Drools DMN FEEL handbook.
String examples: See the following examples that use strings within conditions:
Concatenate strings by using the +
symbol as follows:
Split strings using the split
function. The next example splits a string by specifying the delimiter symbol, in this case that is space (\\s
).
Date example: The following example uses a date, specifically to get its year by using .year
after the date:
Number examples: See the following examples that use number ranges within conditions. These examples use range syntax instead AND
or OR
operators, which are not supported by the DMN and FEEL specifications:
A range where the number is greater than or equal to 100000 and less than 199999:
A range where the number is less than 100000:
Use mustache syntax {{variable_name}}
to use Request variables and Magic Variables in your Decision Table conditions. In this way, expressions can compare input values against other dynamic variables coming from the request data model. This syntax avoids hard-coded constant values.
There are different uses, such as the following:
Some FEEL expressions require an explicit reference to the variable. For example, contains(variable, string)
. Use mustache brackets to reference the variable in order to search for the string inside of it. You may also use mustache brackets to reference a separate value for a string if it is not a constant.
Follow these steps to reference Collection data:
In a condition, enter {{
. A gray-colored data icon suggests possible Collections to call values within it.
Select a Collection.
Press the TAB
key. The autocomplete enters a mustache syntax expression with a Data icon to access the selected Collection. If there are no Collections, the suggestion disappears.
Directly import a Decision Table into Decision Table Editor.
When in Decision Table Editor, import a Decision Table that has been exported from the same ProcessMaker Platform version. Decision Tables edited in Decision Table Editor are in .dmn
format because they are Decision Management Notation files. Importing a Decision Table overwrites the existing Decision Table.
The Decision Tables package must be installed.
Your user account or group membership must have the following permissions to import a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Import Decision Tables
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
See the Decision Tables permissions or ask your Administrator for assistance.
Follow these steps to import a Decision Table previously exported directly from Decision Table Editor:
Click the Select file from computer link or drag-and-place the file into the Import DMN screen. Decision Tables have the .dmn
file extension.
Click Import. The file imports into Decision Table Editor.
Add a new input or output column to a Decision Table in Decision Table Editor.
Your user account or group membership must have the following permissions to add an input or output column to a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
Follow these steps to add an input or output column to a Decision Table:
Do one of the following:
Select one of the following options:
Add a new column to the left of the selected column: Select the Add Column Left option.
Add a new column to the right of the selected column: Select the Add Column Right option.
The new column displays. By default, decision variables use the string
data type.
Click the Import button. The Import DMN screen displays.
Input and output columns are components of a decision in a Decision Table. See for more information.
The must be installed.
See the permissions or ask your Administrator for assistance.
. Decision input columns display immediately below the Inputs section. Decision output columns display immediately below the Outputs section. Dots above each column separator indicate where to add a new column to the right of the existing column.|
Add a new column to the right of a selected column: Mouse-hover over the dot in which to add a new column to the right of the existing column, and then click the icon. Below is an example of adding a new column in the Inputs section.
Add a new column to the left or right of a selected column: Right-click on the decision input or output label in which to add the new column in that section. Below is an example of adding a new column in the Outputs section.|
Replace the placeholder values for the input/output label and its decision variable with those for your decision. Optionally, .
See the example in when using quotation marks as punctuation in the output string.
Change the data type for decision input or output variable.
Each decision variable uses the string
data type. See Components of a Decision Table for more information.
The Decision Tables package must be installed.
Your user account or group membership must have the following permissions to change the data type for a decision variable in a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
See the Decision Tables permissions or ask your Administrator for assistance.
Follow these steps to change the data type for a decision variable:
Locate the decision input or output variable in which to change its data type. The current data type displays in the lower-right corner of the decision variable.
Select one of the following data types:
boolean: The decision variable represents one of two possible values (usually denoted TRUE
and FALSE
).
date: The decision variable represents a date. The date is in the following format: YYYY-MM-DD
. Example: "2020-07-01"
.
datetime: The decision variable represents a datetime. The datetime is in the following format: YYYY-MM-DD HH:MM:SS
. Example: "2020-07-01 14:25:15"
.
number: The decision variable represents a number.
string: The decision variable represents a string.
time: The decision variable represents a time. Example: 14:25:15
.
Move an input or output column to the left or right of a Decision Table in Decision Table Editor.
Your user account or group membership must have the following permissions to move an input or output column in a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
Follow these steps to move an input or output column in a Decision Table:
Do one of the following:
Right-click on the current data type.
Input and output columns are components of a decision in a Decision Table. See for more information.
The must be installed.
See the permissions or ask your Administrator for assistance.
. Decision input columns display immediately below the Inputs section. Decision output columns displays immediately below the Outputs section.
Move a decision input column to the left or right of other input columns: Right-click on the decision input's label, and then select the Move Column Left option or the Move Column Right option to move that column to the left or right of its current position in its section, respectively. Note that decision input columns cannot be moved outside of the Inputs section. Attempts to move a decision input column to the right of the Output section are ignored.
Move a decision output column to the left or right of other output columns: Right-click on the decision output's label, and then select the Move Column Left option or the Move Column Right option to move that column to the left or right of its current position in its section, respectively. Note that decision output columns cannot be moved outside of the Outputs section. Attempts to move a decision output column to the left of the Input section are ignored.
Remove an input or output column from a Decision Table in Decision Table Editor.
Your user account or group membership must have the following permissions to remove an input or output column from a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
Follow these steps to remove an input or output column from a Decision Table:
Do one of the following:
Click Confirm. The decision column is removed if it was not the only column in that section.
Add a new decision to a Decision Table in Decision Table Editor.
Your user account or group membership must have the following permissions to add a decision to a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
Follow these steps to add a decision to a Decision Table:
Do one of the following:
Select one of the following options:
Add a new decision above the selected decision: Select the Add Row Above option.
Add a new decision below the selected decision: Select the Add Row Below option.
The new decision row displays.
Enter the business rule for the new decision.
Remove a decision from a Decision Table in Decision Table Editor.
Your user account or group membership must have the following permissions to remove a decision from a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
Follow these steps to remove a decision from a Decision Table:
Do one of the following:
Click Confirm. The decision is removed if it was not the only decision in that Decision Table.
Input and output columns are components of a decision in a Decision Table. See for more information.
The must be installed.
See the permissions or ask your Administrator for assistance.
. Decision input columns display immediately below the Inputs section. Decision output columns displays immediately below the Outputs section.
Click the label of the decision column to be removed, and then click the icon. Below is an example of removing a column from the Inputs section. Note that the Inputs and Outputs sections must have at least one decision input and output in each section. Attempts to remove a decision column when it is the only column in that section are ignored.
Right-click on the label of the decision column to be removed, and then select the Remove option. Below is an example of removing a column from the Outputs section.
The Caution screen displays to confirm the removal of the decision column.
are components of a decision in a Decision Table. See for more information.
The must be installed.
See the permissions or ask your Administrator for assistance.
.
. Each decision displays as a row in the Decision Table. Dots above each column separator indicate where to add a new column to the right of the existing column.|
Add a new decision below a selected decision: Mouse-hover over the dot in which to add a new below the existing decision, and then click the icon. Below is an example.
Add a new above or below a selected decision: Right-click on the decision in which to add the new decision. Below is an example.
are components of a decision in a Decision Table. See for more information.
The must be installed.
See the permissions or ask your Administrator for assistance.
. Each decision displays as a row in the Decision Table.
Click the index number for that decision row to be removed, and then click the icon. Below is an example. Note that the Decision Table must have one row. Attempts to remove a decision row when it is the only decsion displays the following message: It cannot be delete because there should always be a rule..
Right-click on the index number for that decision row to be removed, and then select the Remove option. Below is an example.
The Caution screen displays to confirm the removal of the decision.
Test conditions in a Decision Table.
Test the conditions in a Decision Table to ensure they work as expected. If desired, use the Sample Input panel to mock Request variables and Magic Variables enclosed in mustache syntax to test how the Decision Table runs using data you expect.
The Decision Tables package must be installed.
Your user account or group membership must have the following permissions to do testing in a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
See the Decision Tables permissions or ask your Administrator for assistance.
Follow these guidelines to mock data coming into your Decision Table:‌
​View Decision Tables. The Decision Tables tab displays all Decision Tables.
Select a Decision Table to edit in which to test conditions.
Paste the JSON data model into the Sample Input panel in the Decision Table Editor. If you use any variables as defined in the JSON data model in your Decision Table, the Decision Table Editor uses those variable values during testing.
Mock the variables enclosed in mustaches that your Inputs would reference.
Click Run.
In the Output panel, view the mocked data. If the Decision Table evaluates successfully, its output displays in the Output panel. If the Decision Table does not evaluate successfully, the language engine evaluating the Decision Table displays an error.‌
Export a Decision Table directly from Decision Table Editor.
When in Decision Table Editor, export a Decision Table that may be imported directly into Decision Table Editor of the same ProcessMaker Platform version. Decision Tables edited in Decision Table Editor are in .dmn
format because they are Decision Management Notation files.
The Decision Tables package must be installed.
Your user account or group membership must have the following permissions to export a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Export Decision Tables
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
See the Decision Tables permissions or ask your Administrator for assistance.
Follow these steps to export a Decision Table directly from Decision Table Editor:
Save the Decision Table. If the Decision Table is not saved prior to attempting to export, the following message displays: You have not saved the data. Save your changes before exporting the DMN file..
Click the Export button. Decision Table Editor exports the Decision Table.
Save a Decision Table in Decision Table Editor.
Follow these steps to save a Decision Table:
Click Save. The following message displays: The Decision Table was saved..
Close Decision Table Editor.
Follow these steps to close a Decision Table:
Click Close.
Click Confirm to save changes prior to closing the Decision Table.
The must be installed.
See the permissions or ask your Administrator for assistance.
.
The must be installed.
See the permissions or ask your Administrator for assistance.
.
If the Decision Table has unsaved changes, then the Caution screen displays to confirm saving the changes prior to closing the Decision Table.