此内容没有您所选择的语言版本。

3.12. Example Rule Flows


A Simple Rule Flow

Figure 3.4. A Simple Rule Flow

The rule flow above specifies that the rules in the Check Order group must be executed before the rules in the Process Order group. You could achieve similar results using salience, but this is harder to maintain and makes a time relationship implicit in the rules (or Agenda groups.) By contrast, using a rule-flow makes the processing order explicit, in its own layer on top of the rule structure, allowing you to manage complex business processes more easily.
In practice, if you are using rule-flow, you are most likely doing more than just setting a linear sequence of groups to progress though. You will be using Split and Join nodes to model branches and define flows by connections, from the Start to ruleflow-groups, to Splits and then on to more groups, Joins, and so on. Do all of via a graphical editor:
A Complex Rule Flow

Figure 3.5. A Complex Rule Flow

The rule flow depicted above represents a more complex business process for finalizing an insurance claim:
First of all, the claim data validation rules are processed. These perform data integrity checks for consistency and completeness.
Next, in a Split node, a conditional decision is made based on the value of the claim. Processing will either move on to an auto-settlement group, or to another Split node, which checks whether there was a fatality in the incident.
If so, it determines whether the "regular" set of fatality-specific rules should take effect, with more processing to follow.
Based on a few conditions, many different control flows are possible.

Note

All the rules can be in one package, with the control flow definition being stored separately.
To edit Split nodes, follow this process:
Firstly, click on the node.
From the properties panel that appears, choose the type: AND, OR or XOR. If you choose OR, then any of the split's potential outputs will be allowed to occur, meaning that processing can proceed in parallel along two or more different paths. If you chose XOR, then only one path will be taken.
If you choose OR or XOR, there will be a square button on the right-hand side of the Constraints row.
Click on this button to open the Constraint Editor. This is a text editor with which you add constraints (which are like the conditional part of a rule.)

Note

These constraints operate on facts in the working memory. In the example above, there is a check for claims with a value of less than 250. Should this condition be true, then the associated path will be followed.
Set the conditions that will decide which outgoing path to follow.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部