A business rule is an action type in FlowX that allows you to configure a script on a BPMN node. It’s a way to specify business logic or decision-making processes in a business process.
The script can read and write the data available on the process at the moment the script is executed. For this reason, it is very important to understand what data is available on the process when the script is executed.
Business rules can be attached to a node by using actions with action rules on them. These can be specified using DMN rules, MVEL expressions, or scripts written in JavaScript, Python, or Groovy.
For more information about supported scripting languages, see the next section:
You can also test your rules by using the Test Rule function.
To use a Business Rules Action, follow these steps:
Let’s take look at the following example. We have some data about the gender of a user and we need to create a business rule that computes the formal title based on the gender:
This is how the process instance data looks like before it reaches the business rule:
When the token reaches this node the following script (defined for the business rule) is executed. The language used here for scripting is MVEL.
With version 2.5.0 we introduced unflattened keys inside business rules. Flattened keys are now obsolete. You are notified when you need to delete and recreate a business rule so it contains an unflattened key.
Examples available for v2.5.0 version and higher
We will use the MVEL example used above to rewrite it in other scripting languages formats:
For more detailed information on each type of Business Rule Action, refer to the following sections:
A business rule is an action type in FlowX that allows you to configure a script on a BPMN node. It’s a way to specify business logic or decision-making processes in a business process.
The script can read and write the data available on the process at the moment the script is executed. For this reason, it is very important to understand what data is available on the process when the script is executed.
Business rules can be attached to a node by using actions with action rules on them. These can be specified using DMN rules, MVEL expressions, or scripts written in JavaScript, Python, or Groovy.
For more information about supported scripting languages, see the next section:
You can also test your rules by using the Test Rule function.
To use a Business Rules Action, follow these steps:
Let’s take look at the following example. We have some data about the gender of a user and we need to create a business rule that computes the formal title based on the gender:
This is how the process instance data looks like before it reaches the business rule:
When the token reaches this node the following script (defined for the business rule) is executed. The language used here for scripting is MVEL.
With version 2.5.0 we introduced unflattened keys inside business rules. Flattened keys are now obsolete. You are notified when you need to delete and recreate a business rule so it contains an unflattened key.
Examples available for v2.5.0 version and higher
We will use the MVEL example used above to rewrite it in other scripting languages formats:
For more detailed information on each type of Business Rule Action, refer to the following sections: