Search

CN-122022739-A - Conditional configuration method, system and equipment of flow engine gateway node

CN122022739ACN 122022739 ACN122022739 ACN 122022739ACN-122022739-A

Abstract

The application provides a condition configuration method, a system and equipment of a flow engine gateway node, the method obtains a plurality of branch paths corresponding to the branch nodes by responding to the triggering operation of the branch nodes in a visual interface and displays the branch paths in a list mode, each branch path is configured with a priority order and different condition models, and the condition models are configured by fields, operators and comparison values; the method comprises the steps of carrying out serialization conversion on a condition model and a priority order to generate structured data, storing the structured data, responding to an execution request of a flow engine, analyzing the structured data to obtain an executable expression, evaluating the executable expression according to the priority order, and advancing the flow along a branch path corresponding to the evaluated executable expression. The application configures the condition model for the branch node through the visualization operation, realizes the visualization and the intellectualization of the condition configuration of the gateway node, and greatly simplifies the configuration process of the condition of the gateway node of the flow engine.

Inventors

  • WANG XIAOHU
  • CHEN MING

Assignees

  • 广域铭岛数字科技有限公司
  • 浙江吉利控股集团有限公司

Dates

Publication Date
20260512
Application Date
20260330

Claims (10)

  1. 1. A method for conditional configuration of a flow engine gateway node, comprising: Responding to the triggering operation of the branch nodes in the visual interface, acquiring a plurality of branch paths corresponding to the branch nodes by the gateway node and displaying the branch paths in a list mode, wherein each branch path is configured with a priority order and different condition models, and the condition models are configured by fields, operators and comparison values; Carrying out serialization conversion on the condition model and the priority order to generate structured data, and storing the structured data; responding to the execution request of the flow engine, analyzing the structured data to obtain an executable expression; and evaluating the executable expressions according to the priority order, and advancing the flow along the branch path corresponding to the evaluated executable expressions.
  2. 2. The method for conditional configuration of a flow engine gateway node according to claim 1, wherein the manner in which the conditional model is configured comprises: operating the ordering of the list by drag and drop, determining the priority order of the branch paths, and Pulling a front node form field for each branch path; And respectively constructing a single condition and a condition group according to the field, the operator and the comparison value triple structure according to the front node form field, binding the single condition and the condition group to the corresponding branch paths, and generating a condition model corresponding to each branch path.
  3. 3. The method of claim 2, wherein the flow engine gateway node is configured to, The condition model is characterized in that a three-layer nested structure is used for representing condition logic, a condition set is used for representing an outer-layer nested structure, the condition sets are used for representing or are related to each other, each condition set comprises a plurality of condition items, the condition items are related to each other, each condition item is formed into an innermost-layer nested structure by a field, an operator and a comparison value, the field is a data item to be judged, the operator is a judging rule, and the comparison value is a judging reference.
  4. 4. The method according to claim 2, wherein after constructing single condition and condition groups according to the field, operator and comparison value triplet structure according to the pre-node form field, respectively, further comprising: performing consistency check on a field, an operator and a comparison value configured on any branch path, wherein the consistency check comprises at least one of verifying validity of the field, verifying validity of the operator, verifying whether data type of the comparison value is matched with data type of the field and verifying semantic integrity of the field, the operator and the comparison value; If all the verification passes, determining that the consistency test passes, and allowing to generate a condition model corresponding to the branch path; If any verification is not passed, determining that the consistency test is not passed, prohibiting the generation of a condition model corresponding to the branch path, and simultaneously displaying a modification suggestion containing the checking error.
  5. 5. The method of claim 1, wherein the step of serializing the condition model with the priority order to generate and store structured data comprises: integrating the condition model and the priority order according to the branch names of the branch paths to determine integrated data; And carrying out validity check on the integrated data, and if the integrated data passes the check, carrying out serialization conversion on the integrated data passing the check to generate and store structured data in a JSON format.
  6. 6. The method for conditional configuration of a flow engine gateway node according to claim 1, wherein parsing the structured data to obtain an executable expression comprises: Performing anti-sequence operation on the structured data based on an abstract syntax tree, and converting the structured data into a structured object of a programming language; Recursively analyzing the structured object of each branch path, extracting and splicing elements according to the triples of the fields, the operators and the comparison values, and generating an atomic expression; And combining a plurality of the atomic expressions to form a complete logic expression, and converting the complete logic expression into an executable expression meeting the target execution environment.
  7. 7. The conditional configuration method of a flow engine gateway node according to any one of claims 1 to 6, further comprising: Evaluating the executable expressions of the branch paths according to the priority order from high to low; If the executable expression corresponding to any branch path is detected to meet the evaluation, the rest branch paths are not evaluated, and the process is advanced along any branch path; And if the executable expression corresponding to any branch path is detected not to meet the evaluation, continuing to evaluate the residual branch path, wherein the evaluation comprises conditional short circuit evaluation, and the residual branch path is a plurality of branch paths excluding the any branch path.
  8. 8. The conditional configuration method of a flow engine gateway node according to any one of claims 1 to 6, further comprising: carrying out version identification on the structured data according to preset operation rule data, and storing the operation rule data with the version identification into a rule warehouse; And if the operation rule data is monitored to trigger a rollback request, querying the structured data matched with a target version identifier in the rollback request in the rule warehouse, and rollback the structured data of the target version identifier for recovery.
  9. 9. A conditional access system for a flow engine gateway node, comprising: the condition configuration module is used for responding to the triggering operation of the branch nodes in the visual interface, acquiring a plurality of branch paths corresponding to the branch nodes by the gateway node and displaying the branch paths in a list mode, wherein each branch path is configured with a priority order and different condition models, and the condition models are configured by fields, operators and comparison values; the data storage module is used for carrying out serialization conversion on the condition model and the priority order to generate structured data and storing the structured data; The data analysis module is used for responding to the execution request of the flow engine and analyzing the structured data to obtain an executable expression; And the engine execution module is used for evaluating the executable expressions according to the priority order and advancing the flow along the branch path corresponding to the evaluated executable expressions.
  10. 10. An electronic device comprising a processor, a memory and a communication bus for connecting the processor and the memory, the processor being adapted to execute a computer program stored in the memory for implementing a conditional configuration method of a flow engine gateway node according to any one of claims 1 to 8.

Description

Conditional configuration method, system and equipment of flow engine gateway node Technical Field The present application relates to the field of flow management, and in particular, to a method, a system, and an apparatus for conditional configuration of a flow engine gateway node. Background With the rapid development of information technology, workflow management systems play an increasingly important role in enterprise business process management. The flow engine is used as a core component of the workflow management system and is responsible for defining, executing and monitoring the business flow, wherein the gateway node is a key element in the flow engine and is used for controlling the branching and convergence of the flow, and the conditional configuration of the gateway node directly influences the execution path and the efficiency of the business flow. However, in a flow engine, a flow is made up of various nodes that represent steps or decision points in the flow. The gateway node routes the execution path of the flow based on conditions, events or parallel logic, and decides what path to go next in the flow. In the related art, because the condition configuration of the gateway node is limited, dynamic and multi-level condition editing cannot be realized, and when complex branch logic is processed, visual interface interaction is lacking, and a user is difficult to preview and verify the validity of a condition rule in real time, so that in practical application, the process configuration is complex, the configuration efficiency is low and the development personnel coding is required to be relied on, therefore, a new condition configuration scheme of the process engine gateway node is needed to overcome the defects. Disclosure of Invention The application provides a conditional configuration method, a conditional configuration system and conditional configuration equipment of a flow engine gateway node, which are used for solving the problems of complex configuration, low configuration efficiency and lack of dynamic configuration in the conditional configuration method of the flow engine gateway node in the prior art. In a first aspect, the application provides a method for configuring a condition of a flow engine gateway node, which includes responding to a triggering operation of a branch node in a visual interface, acquiring a plurality of branch paths corresponding to the branch node by the gateway node and displaying the branch paths in a list mode, configuring a priority order and different condition models by each branch path, configuring the condition models by fields, operators and comparison values, carrying out serialization conversion on the condition models and the priority order to generate structured data, storing the structured data, responding to an execution request of the flow engine, analyzing the structured data to obtain an executable expression, evaluating the executable expression according to the priority order, and pushing a flow along the branch path corresponding to the evaluated executable expression. In some possible embodiments of the first aspect, the method for configuring the condition model includes determining a priority order of each branch path by pulling an order of a list, pulling a front node form field for each branch path, respectively constructing a single condition and a condition group according to the front node form field and a triple structure of the field, an operator and a comparison value, binding the single condition and the condition group to the corresponding branch path, and generating the condition model corresponding to each branch path. In some possible embodiments of the first aspect, the condition model represents condition logic by a three-layer nested structure, wherein a condition group set is adopted to represent an outer nested structure, condition groups are or are related, each condition group comprises a plurality of condition items, the condition items are and are related, each condition item forms an innermost nested structure by a field, an operator and a comparison value, the field is a data item to be judged, the operator is a judging rule, and the comparison value is a judging reference. In some possible embodiments of the first aspect, after the single condition and condition set are respectively constructed according to the field, the operator and the comparison value triple structure according to the pre-node form field, the method further comprises the step of performing consistency check on the field, the operator and the comparison value configured on any branch path, wherein the consistency check comprises at least one of verifying validity of the field, verifying validity of the operator, verifying whether data type of the comparison value is matched with data type of the field, and verifying semantic integrity of the field, the operator and the comparison value. If any verification is not passed, the consistenc