Model Business Rules For RuleTasks

The Rule Model enables you to define Business Rule elements and associate them with a Rule Task. In the example, you might define a set of rules to perform an eligibility check for a customer, to determine if the customer is eligible to rent a car.

To do this, follow the steps below:

  1. Create a diagram of type Rule Model. The Rule Model pages display in the Toolbox.
  2. Drag and drop a Rule Task element (Eligibility in the example) from the Rule Flow Activity diagram package onto the Rule Model diagram.
  3. Drag as many Business Rule elements as necessary from the Toolbox (or Project Browser if they exist already) onto the diagram. You type the rule as the element name here, then define the parameters of the rules using the Rule Composer.
  4. Create a Dependency relationship between each Business Rule element and the Rule Task element.


However, when you bring the rule into the Rule Composer, it automatically creates the Dependency relationship anyway.

  1. Repeat steps 2 - 4 for the next Rule Task element.

The resulting Rule Model resembles the following diagram:

Rules defined

After you have modeled rules for all the Rule Task elements in the Rule Flow diagram, the Business Domain model is ready for code transformation. The code templates for generating technology-specific rule code work hand-in-hand with the EASL code templates to generate the code for the Rule Flow diagram.