CN-122022425-A - Flow execution method and system
Abstract
The invention discloses a flow execution method and a system, relates to the technical field of business flow management, and mainly aims at flexibility of flow execution. The main technical scheme of the invention is that the flow execution engine executes a preset business flow according to the business flow model. When executing to the target decision node, generating a corresponding decision request event and issuing the decision request event to an event bus. The rule evaluation engine monitors the event through a preset subscription mechanism, and determines a business rule which corresponds to the target decision node and is defined by the domain-specific language model in a preset rule base. Then, the engine acquires the target real-time service data corresponding to the event from an external system, generates a decision suggestion of a target decision node according to the data and the rule, wherein the decision suggestion comprises an approval result, a next node to be executed or a node adjustment condition, and issues the suggestion to an event bus. Finally, the flow execution engine executes the operation corresponding to the decision suggestion according to the execution interface.
Inventors
- ZHAO ZHIAO
- Miao Xuewen
- LI MUDONG
- HE QINGJIE
Assignees
- 中国人民解放军93184部队
Dates
- Publication Date
- 20260512
- Application Date
- 20251226
Claims (10)
- 1. A flow execution method, wherein the method is applied to a flow execution system, the flow execution system comprising a flow execution engine, a rule evaluation engine, and an event bus, the method comprising: executing a corresponding preset business process according to a business request by using the process execution engine, and generating a corresponding decision request event to be issued to the event bus when the corresponding decision request event is executed to a target decision node in the preset business process, wherein the preset business process is a process defined in advance according to a business process model; Monitoring decision request events in the event bus by using the rule evaluation engine through a preset subscription mechanism, and determining business rules corresponding to the target decision nodes in a preset rule base, wherein the business rules are defined according to a domain specific language model; acquiring target real-time service data corresponding to the decision request event in an external system by using the rule evaluation engine; generating a decision suggestion of the target decision node according to the target real-time service data and the service rule by using the rule evaluation engine, and issuing the decision suggestion to the event bus, wherein the decision suggestion comprises an approval result of the target decision node, a next node to be executed in a preset service flow or a node adjustment condition of the preset service flow; and executing the operation corresponding to the decision suggestion according to the execution interface by using the flow execution engine.
- 2. The method of claim 1, wherein generating, with the rule evaluation engine, a decision suggestion for the target decision node based on the target real-time business data and the business rule comprises: if the number of the business rules is multiple, selecting a target business rule from the multiple business rules according to a preset conflict arbitration strategy; and generating a decision suggestion of the target decision node according to the target real-time service data and the target service rule by using the rule evaluation engine.
- 3. The method of claim 2, wherein generating, with the rule evaluation engine, a decision suggestion for the target decision node based on the target real-time business data and a target business rule, comprises: judging whether the judging conditions in the target business rules are supported by target real-time business data or not; If not, generating a decision suggestion of the target decision node according to a preset processing strategy; If yes, executing the target business rule according to the target real-time business data, and outputting a decision suggestion, wherein the decision suggestion comprises whether the target decision node passes approval or not, and whether the next node to be executed or an unnecessary node to be skipped after the approval passes or not.
- 4. A method according to claim 3, wherein generating the decision suggestion for the target decision node according to a preset processing policy comprises: evaluating the target real-time service data based on a preset risk model to obtain a risk value; If the risk value is smaller than a preset risk threshold value, generating a template based on the target real-time service data and a preset rule, and generating a new service rule for evaluating the target decision node; Evaluating the target real-time service data by utilizing the new service rule to obtain an approval result aiming at the target decision node; and determining the approval result and the manual rechecking node to be inserted together as a decision suggestion of the target decision node, wherein the manual rechecking node is used for carrying out post-confirmation on the approval result.
- 5. The method of claim 4, wherein after obtaining the new business rule, the method further comprises: obtaining a mapping table between flow nodes and rules in a preset rule base; And updating the corresponding relation between the target decision node and the business rule in the preset rule base according to the new business rule.
- 6. The method of claim 2, wherein selecting a target business rule from a plurality of business rules according to a preset conflict arbitration policy comprises: acquiring a preset priority value of each business rule and the number of constraint conditions in each business rule; Sequencing the preset priority values corresponding to the business rules respectively to obtain a priority sequencing result; selecting a service rule with the highest preset priority value from the priority ordering result as a candidate service rule; if the candidate business rules are multiple, selecting the candidate business rule with the largest constraint condition number from the candidate business rules as a target business rule; If two or more candidate business rules still exist and have the same constraint condition number, determining a target business rule by utilizing a plurality of candidate business rules according to the rule spam strategy.
- 7. The method of claim 6, wherein determining the target business rule using the plurality of candidate business rules according to the rule spam policy comprises: counting the accumulated use times of each candidate business rule in a historical decision-making library; acquiring the number of service dimension types covered by each candidate service rule; Determining an adaptation coefficient of each candidate business rule according to the accumulated use times and the business dimension type number; and determining the candidate business rule with the largest adaptation coefficient as a target business rule.
- 8. A process execution system, the system comprising: The flow execution engine is used for executing a corresponding preset business flow according to the business request, generating a corresponding decision request event to be issued to an event bus in a flow execution system when the corresponding preset business flow is executed to a target decision node in the preset business flow, wherein the preset business flow is a flow defined in advance according to a business flow model; The rule evaluation engine is used for publishing decision request events in the event bus by the monitoring flow execution engine through a preset subscription mechanism, and determining business rules corresponding to the target decision nodes in a preset rule base, wherein the business rules are defined according to a domain specific language model; The rule evaluation engine is also used for acquiring target real-time service data corresponding to the decision request event from an external system; The rule evaluation engine is further used for generating a decision suggestion of the target decision node according to the target real-time service data and the service rule, and issuing the decision suggestion to the event bus, wherein the decision suggestion comprises an approval result of the target decision node, a next node to be executed in a preset service flow or a node adjustment condition of the preset service flow; the flow execution engine is also used for executing operations corresponding to the decision suggestions issued by the rule evaluation engine in the event bus according to the execution interface.
- 9. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the flow execution method according to any one of claims 1 to 7.
- 10. A processor, wherein the processor is configured to run a program, wherein the program when run performs the flow execution method according to any one of claims 1 to 7.
Description
Flow execution method and system Technical Field The present invention relates to the field of business process management technologies, and in particular, to a process execution method and system. Background In the context of equipment business digital transformation, business process management systems play a critical role. The current mainstream architecture generally adopts a design mode that a flow execution engine and a rule evaluation engine are separated, wherein the flow execution engine advances service execution according to a pre-modeled fixed path, when a flow runs to a decision node, execution is suspended, relevant service data are packaged into a structured data packet and are transferred to the rule evaluation engine through an API call, the rule evaluation engine loads and executes corresponding service rules after receiving the data, and finally a decision result (such as 'pass' or 'reject' or the next node ID in the specified flow) is returned. And the flow execution engine drives the flow to the next node according to the result, thereby completing the business closed loop. However, the loose coupling architecture is still highly dependent on the static modeling in the early stage in practice, on one hand, rule logic is often embedded in a system in a hard-coded or configured form, and can only passively respond when a flow execution engine actively calls and output a limited decision result in a preset range, and on the other hand, an execution path followed by the flow execution engine is solidified in a deployment stage of a flow model, and node sequence, branching conditions and jump logic of the execution path cannot be dynamically reconstructed according to real-time service requirements during operation. The cutting mode of 'rule only judging and process only executing' causes that the system is difficult to flexibly cope with when facing to the temporary approval requirement, and severely restricts the flexibility of process execution. Disclosure of Invention In view of the above problems, the present invention provides a method and a system for executing a flow, and is mainly aimed at improving the flexibility of executing a flow. In order to solve the technical problems, the invention provides the following scheme: in a first aspect, the present invention provides a flow execution method, where the method includes: executing a corresponding preset business process according to a business request by using the process execution engine, and generating a corresponding decision request event to be issued to the event bus when the corresponding decision request event is executed to a target decision node in the preset business process, wherein the preset business process is a process defined in advance according to a business process model; Monitoring decision request events in the event bus by using the rule evaluation engine through a preset subscription mechanism, and determining business rules corresponding to the target decision nodes in a preset rule base, wherein the business rules are defined according to a domain specific language model; acquiring target real-time service data corresponding to the decision request event in an external system by using the rule evaluation engine; generating a decision suggestion of the target decision node according to the target real-time service data and the service rule by using the rule evaluation engine, and issuing the decision suggestion to the event bus, wherein the decision suggestion comprises an approval result of the target decision node, a next node to be executed in a preset service flow or a node adjustment condition of the preset service flow; and executing the operation corresponding to the decision suggestion according to the execution interface by using the flow execution engine. In a second aspect, the present invention provides a process execution system, the system comprising: The flow execution engine is used for executing a corresponding preset business flow according to the business request, generating a corresponding decision request event to be issued to an event bus in a flow execution system when the corresponding preset business flow is executed to a target decision node in the preset business flow, wherein the preset business flow is a flow defined in advance according to a business flow model; The rule evaluation engine is used for publishing decision request events in the event bus by the monitoring flow execution engine through a preset subscription mechanism, and determining business rules corresponding to the target decision nodes in a preset rule base, wherein the business rules are defined according to a domain specific language model; The rule evaluation engine is also used for acquiring target real-time service data corresponding to the decision request event from an external system; The rule evaluation engine is further used for generating a decision suggestion of the target decision node according to