How to use Sequence Flow in jbpm
Today, I will talk to you about how to use Sequence Flow in jbpm. Many people may not know much about it. In order to let everyone know more, Xiaobian summarizes the following contents for everyone. I hope everyone can gain something according to this article.
Parallel Gateway: Parallel Gateway (one-in-multiple-out gatewayDirection="Diverging") will execute all paths, do not set conditions on paths at this time, because conditions will not take effect
Conditional Gateway: Inclusive Gateway (gatewayDirection="Diverging") only continues if the condition on the path is true
Aggregation Gateway: Inclusive Gateway (multi-in, one-out gatewayDirection="Converging") waits for all paths to be executed before continuing downward execution
Note: All types of gateways cannot have multiple entrances and multiple exits at the same time.
About Sequence Flow, that is, the line in the figure, when the connection is a parallel gateway, there is no condition, the condition must have a return value of true or false, such as the following example, using java code to write the condition (red part), pay attention to must return.
System.out.println("conditional gateway");return true;2>1
Trigger rules specifying agenda-groups and ruleflow-groups
kieSession.getAgenda().getAgendaGroup("test").setFocus();((InternalAgenda)kieSession.getAgenda()).activateRuleFlowGroup("test");
The condition expressions in jbpm use MVEL, java, and expressions, most notably language, which distinguishes DRL languages.
com.trusfort.credit.decision.pojo.DecisionFlow(id=="1")
When the judgment condition is map, it is written as follows:
java.util.HashMap(this["a"]>1)
Java language
return ture
expression
2>1
Conditions on the line are invalid if the gateway is a parallel gateway, conditions on the Inclusive and exclusive gateway lines are valid
After reading the above, do you have any further understanding of how Sequence Flow is used in jbpm? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.