Rule editor
The Rule editor enables the creation and editing of rule configurations based on parameterisable rule modules of different Rule types.
In every context that provides a rule configuration, a placeholder appears in the form of a diamond with a
icon, which can be used to open a context menu for defining rules.
Context: Association criteria |
Context: Event handling / Client workflows |
Context: Resolvers |
|
|
|
The configuration of Association criteria is exclusively concerned with the definition of a more or less complex rule that is deemed to have passed or failed at runtime depending on the overall data context. |
In the context of Event handling and Client workflows, the Validating rule decides whether Action on passed rule are executed at all. If the configured rule is ‘not passed’ at runtime, No action is taken. |
Certain Resolvers, such as those shown above as an example (Rule value and Rule list resolver, also refer to the Rule editor to configure a condition. |
Special Rule types → With rule |
Special Event actions → If then else |
Special Resolvers → Conditional value |
|
|
|
In the configuration of the With rule, a temporary reference object is first set via a value configuration. A rule configuration follows below, which is executed in the context of the value resolved as a reference object. |
Within an If then else event action, a case differentiation can be configured with one or more branches. Each branch provides a rule configuration on which the execution of the Event actions configured in the branch depends. |
A Conditional value resolver adapts the concept of case differentiation (see If then else event action, left) for the context of a value configuration. Each branch assigns a specific value configuration to a rule configuration. |
Symbolism and logic for rules
In the Rule editor, a diamond symbol appears for each rule inserted, the inner structure of which can be 'expanded' by clicking on the (+) icon in the top corner. The expanded state allows the rule definition to be edited, provided there is any configurable content. The view can be collapsed again by clicking on the (-) icon displayed in this state at the top right.
The evaluation of a rule always returns a truth value (true or false) at runtime. This check result determines further processing according to the following scheme:
|
|
If the test result is 'true', the rule is considered 'passed' and the 'downwards' path is continued. ►NOTE◄ If no other rule is configured ‘below’ (or when ‘passing’) the Check type rule selected as an example, a type hint appears for the expected return value, depending on the context, which largely covers the arrowhead of the connecting line. A Check type can even ‘set’ this type hint, as it ‘declares’ a type for the downward path.
|
Click on the (+) icon at the top of the diamond to expand the ‘rule’ so that the specific configuration interface for the rule type appears, which provides access to the specific parameterisation (if available). Click on the (-) symbol at the top right of the configuration interface to close the rule.
►NOTE◄ The configuration interface can contain elements for conditional parameters whose visibility or activation status depends on assignments for other parameters. |
Rule graph
Using an interactive visualisation, the ‘rule graph’, the Rule editor enables the step-by-step creation of more complex logical structures based on a single rule.
►NOTE◄ The screenshots in the following sections refer to the context of an association criterion. In other environments, the display differs in details..
Functionally, the rule configuration shown on the right and therefore the association criterion as a whole should be considered ‘passed’ if the following conditions are met:
At runtime, the rule graph is processed step by step along the relevant connection arrows, beginning at Start. For the specific example, this means
|
|
►IMPORTANT◄ As soon as the step-by-step check reaches one of the end points of the rule graph (Rule passed or Rule failed), the evaluation ends. Depending on the check results and the linking logic, more or fewer of the configured rules must therefore be checked.
Within an OR Junction, it can be advantageous to arrange more complex checks (such as the Check existence with database access) as far to the ‘right’ as possible so that they are executed less frequently.
Within an AND Junction, it can be advantageous to place critical checks as high up as possible so that exclusion criteria are recognised as early as possible within the link.
A Check type may influence the type hint for subsequent ↓AND-linked rules. This can make configuration easier, as ‘suitable’ selection options for the data model then appear in value configurations for parameters (here: ownerId in the Object property resolver).