Control methods of generic workflow engines, generic workflow engines and storage media

By using the control methods of a generic workflow engine, matching transfer paths, multi-dimensional permission verification, and dual process blocking detection, the full lifecycle management of concurrent sub-instances is constructed, solving the problems of poor process efficiency and insufficient cross-scenario reuse in existing technologies, and achieving efficient and stable process operation.

CN122865487BActive Publication Date: 2026-11-17SHENZHEN SHENGQIANG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611357070.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-17
Estimated Expiration
2046-09-03

AI Technical Summary

Technical Problem

In existing technologies, workflow engines based on standard process modeling languages ​​are difficult to adapt to complex enterprise business scenarios, resulting in poor business process efficiency. Furthermore, access control logic is bound to process modeling, lacking cross-scenario reuse capabilities and process blocking protection.

Method used

By employing a generic workflow engine, and matching generic parameterized stage nodes with transition rule sets, permission verification and dual process blocking detection are performed to build full lifecycle management of concurrent sub-instances and achieve process advancement.

Benefits of technology

It improves process flow efficiency, cross-scenario reuse capability, multi-dimensional accuracy of access control, and security and stability of process operation, solving the problem of poor process efficiency in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122865487B_ABST
    Figure CN122865487B_ABST
Patent Text Reader

Abstract

This application discloses a control method for a generic workflow engine, a generic workflow engine, and a storage medium, relating to the field of computer software technology. The method includes: responding to a process advancement command from the generic workflow engine; matching a target transition path based on a set of generic parameterized stage nodes and transition rules to determine the advancement context to be verified; inputting the corresponding permission expression and four-dimensional permission information into a permission evaluator to generate candidate advancement schemes; eliminating invalid paths through static and runtime dual blocking detection to obtain the target advancement scheme; constructing concurrent sub-instances and initiating full lifecycle management in the parallel stage; and outputting the process advancement execution result after completing the stage transition. This application solves the problem of poor business process efficiency by using a generic workflow engine to match transition paths, perform multi-dimensional permission verification, implement dual blocking detection, and manage the full lifecycle of concurrent sub-instances, thereby improving process flow efficiency, operational stability, and cross-scenario reusability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer software technology, and in particular to a control method for a generic workflow engine, a generic workflow engine, and a storage medium. Background Technology

[0002] In the context of automated management and control of enterprise business processes, the ability to decouple and adapt process engines, handle concurrent collaborative processing, manage multi-dimensional permissions, and conduct self-inspection of process risks directly affects the versatility, operational stability, and process adaptation efficiency of enterprise business systems.

[0003] In related technologies, a node-connected workflow engine is built based on a standard process modeling language. Business flow control is achieved by relying on a fixed persistence framework, a single-dimensional role permission system, and a general multi-instance node simulation of concurrent processes. This approach binds process modeling, data persistence, and permission control logic, allocates flow permissions according to fixed role rules, and simulates concurrent business flow through serial node reuse. However, it is difficult to adapt to complex enterprise business scenarios, resulting in poor business process efficiency.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a control method for a generic workflow engine, a generic workflow engine, and a storage medium, which aims to solve the technical problem of poor efficiency in business processes.

[0006] To achieve the above objectives, this application proposes a control method for a generic workflow engine, the method comprising: In response to the process advancement instructions of the generic workflow engine, based on the generic parameterized stage nodes and transition rule set, the target transition path is matched and the advancement context to be verified is determined. If the permission expression bound to the progress context to be verified passes the verification of the four-dimensional permission information associated with the process progress instruction, a progress candidate scheme is generated based on the progress context to be verified. The candidate advancement schemes are subjected to both static process structure analysis and runtime state dual process blockage detection to eliminate invalid paths and obtain the target advancement scheme. Based on the target advancement plan, determine the parallel attributes of the target stage, construct concurrent sub-instances according to the parallel attributes, and initiate the full lifecycle management of the concurrent sub-instances; Based on the lifecycle management and the concurrent sub-instances, the process progress execution result is obtained after the phase transition is completed.

[0007] In one embodiment, based on the business type and tenant identifier of the process advancement instruction, a process definition matching the priority, the corresponding generic parameterized stage node, and the set of transition rules are loaded under generic parameter constraints to generate a generic process running instance; Based on the trigger action identifier in the process advancement instruction, the generic process running instances are traversed, and the transfer rules corresponding to the trigger actions are matched according to the three types of transfer types: automatic, manual, and conditional, to obtain a preliminary set of candidate transfer paths. The conditional transfer paths in the preliminary candidate transfer path set are parsed, the guard condition expressions associated with the conditional transfer paths are determined, and the evaluation and verification are performed in combination with the process instance running data to filter and obtain the target transfer path. Integrate the current stage attributes, the target transfer path, and process instance information to generate the progress context to be verified.

[0008] In one embodiment, based on the verification context, the four-dimensional permission information associated with the permission expression bound to the target transfer path and the process advancement instruction is determined; The four-dimensional permission information associated with the permission expression bound to the target transfer path and the process advancement instruction is subjected to syntax validity verification and null value marking to generate a permission evaluation dataset with compliance identification. Based on the non-empty compliant permission expressions in the permission assessment dataset, dimensional recursive parsing and short-circuit Boolean verification are performed according to the nested Boolean operation rules to obtain the permission determination result of a single transfer path; Based on the permission determination results, all transfer paths that have passed permission verification and their corresponding target stage attribute information are filtered out to obtain the advancement candidate schemes that have passed permission verification.

[0009] In one embodiment, based on the non-empty compliant permission expressions in the permission assessment dataset, the nested Boolean structure is decomposed layer by layer using the recursive descent parsing method to construct a computation node tree that distinguishes between computation nodes and dimension condition leaf nodes; Based on the permission dimension attribute corresponding to each node in the operation node tree, the corresponding evaluation unit and operator set are matched to generate a dimension-level condition evaluation sequence sorted by the tree structure hierarchy. Based on the dimensional condition evaluation sequence, Boolean evaluation is performed from bottom to top along the operation node tree hierarchy, and the Boolean evaluation results are aggregated layer by layer to obtain the permission determination result of the single transfer path.

[0010] In one embodiment, based on the process definition topology data and process instance running status snapshots corresponding to the advancement candidate schemes, the static structure verification dimension and the running status verification dimension are split to obtain a two-dimensional blocking detection dataset; The process topology of the two-dimensional blocking detection dataset is subjected to cyclic dependency exit determination and mandatory stage reachability verification to obtain static structure blocking detection results; Based on the static structure blocking detection results and runtime state snapshots, the necessary stage skip verification and parallel group target blocking determination are performed to obtain the dynamic process blocking risk detection results during runtime. By integrating the static structure blockage detection results and the dynamic process blockage risk detection results, transfer paths with arbitrary process blockage risks are eliminated, compliant transfer paths are retained, and they are encapsulated to form the target advancement plan.

[0011] In one embodiment, based on the target advancement plan, the parallel identifier and nesting prohibition attribute of the target stage are determined, and nesting concurrency compliance verification is performed in combination with the concurrency level of the process instance to generate a sub-instance creation permission determination; When the sub-instance creation permission is approved, sub-instance entities are constructed in batches according to the concurrency configuration parameters of the target stage, and an initial state concurrent sub-instance set is obtained. The initial state concurrent sub-instance set is equipped with five-state lifecycle transition rules, batch state management interface and aggregate state calculation logic, and a nested concurrency interception mechanism is enabled to generate a running state sub-instance cluster; Drive the process instance to the target stage and update the global process running status and sub-instance aggregate status snapshot to complete the initial deployment of the parallel stage and the start of the full lifecycle management of the concurrent sub-instances.

[0012] In one embodiment, when the sub-instance creation permission determination is passed, the sub-instance generation scale, association binding rules and initial state baseline are determined according to the concurrency configuration parameters of the target stage and the process instance context information, and the sub-instance batch construction parameter set is obtained by association. Based on the parameter set of the sub-instances, the sub-instance entities are constructed in batches according to the unified data structure of generic constraints, and a globally unique identifier is assigned to each sub-instance entity to obtain an initial set of sub-instance entities; A two-way binding relationship is established between the initial set of sub-instance entities, the process instance, and the target stage to obtain the initial state of the sub-instance cluster to be set. The initial state of the sub-instance cluster to be set is uniformly initialized and anchored, and all sub-instance states are initialized to pending processing to obtain the initial state concurrent sub-instance set.

[0013] In one embodiment, after the driving process instance completes the state transition from the current stage to the target stage, the lifecycle management mechanism and nested concurrency interception logic of the concurrent sub-instance are activated to generate a running process instance that has completed the stage transition. Based on the real-time status data of the concurrent sub-instances under the running process instance, the completion degree aggregation calculation and the identification of rollback and cancellation abnormal states are performed to obtain the sub-instance aggregated status dataset; Based on the aggregated state dataset of the sub-instances, the transfer rules of the target stage are matched, and automatic transfer paths and legal manual transfer options that meet the triggering conditions are filtered to generate a set of executable transfer schemes. The executable workflow scheme, along with the process instance running status and concurrent sub-instance details, are organized and encapsulated to obtain the process advancement execution result.

[0014] In addition, to achieve the above objectives, this application also proposes a generic workflow engine, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for the generic workflow engine as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the control method of the generic workflow engine as described above.

[0016] This application provides a control method for a generic workflow engine, including responding to process advancement instructions through the generic workflow engine, matching a target transition path based on a generic parameterized stage node and transition rule set, determining a advancement context to be verified, inputting the permission expression bound to the advancement context to be verified and the four-dimensional permission information associated with the process advancement instructions into a permission evaluator to complete dimensional recursive parsing and short-circuit Boolean verification to generate advancement candidate schemes that pass permission verification, performing static process structure analysis and runtime state dual process blocking detection on the advancement candidate schemes and eliminating invalid risk paths to obtain a target advancement scheme, and then, based on the target advancement scheme... The solution identifies the parallel attributes of the target stage to construct concurrent sub-instances and initiates full lifecycle management of these concurrent sub-instances. Ultimately, based on lifecycle management and the status of concurrent sub-instances, the process execution result is obtained after the stage transition is completed. This solves the technical problems of existing workflow engines being deeply coupled with business entities, making cross-scenario reuse difficult; lack of complete sub-instance lifecycle management in concurrent collaboration scenarios; single-dimensional permission control with insufficient configuration flexibility; and lack of dual process blocking protection mechanisms during the design and runtime phases. It improves the generalization and reusability of workflow engines, the flow efficiency of multi-role parallel business processes, the multi-dimensional accuracy of permission control, and the security and stability of process operation.

[0017] In summary, this application solves the technical problem of poor business process efficiency by matching transfer paths with a generic workflow engine, performing multi-dimensional permission verification, implementing dual process blocking detection, and managing the entire lifecycle of concurrent sub-instances. This improves process flow efficiency, operational stability, and cross-scenario reusability. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the first embodiment of the control method for the generic workflow engine of this application; Figure 2 This is a system architecture diagram of the generic workflow engine in this application; Figure 3 This is a diagram of the multidimensional permission expression tree structure of this application; Figure 4 This is a flowchart illustrating the fourth embodiment of the control method for the generic workflow engine of this application; Figure 5 This is a flowchart of the dual-process blockage detection process in this application; Figure 6 This is a diagram of the five-state lifecycle model of concurrent sub-instances in this application; Figure 7 This is a flowchart illustrating the seventh embodiment of the control method for the generic workflow engine of this application. Figure 8 This is a schematic diagram of the generic workflow engine in this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] In related technologies, a node-connected workflow engine is built based on a standard process modeling language. Business flow control is achieved by relying on a fixed persistence framework, a single-dimensional role permission system, and a general multi-instance node simulation of concurrent processes. This approach binds process modeling, data persistence, and permission control logic, allocates flow permissions according to fixed role rules, and simulates concurrent business flow through serial node reuse. However, it is difficult to adapt to complex enterprise business scenarios, resulting in poor business process efficiency.

[0024] This application provides a solution: First, responding to the process advancement command of the generic workflow engine, based on the generic parameterized stage nodes and transition rule set, the target transition path is matched to determine the advancement context to be verified. Then, if the permission expression bound to the advancement context to be verified passes the verification with the four-dimensional permission information associated with the process advancement command, a advancement candidate scheme is generated according to the advancement context to be verified. Next, the advancement candidate scheme is subjected to dual process blocking detection of process structure static analysis and runtime state to eliminate invalid paths and obtain the target advancement scheme. Then, the parallel attributes of the target stage are determined according to the target advancement scheme, concurrent sub-instances are constructed according to the parallel attributes, and the full lifecycle management of the concurrent sub-instances is started. Finally, based on the lifecycle management and the concurrent sub-instances, the process advancement execution result is obtained after the stage transition is completed.

[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or generic workflow engine capable of implementing the above functions. The following description uses a generic workflow engine as an example to illustrate this embodiment and the subsequent embodiments.

[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0027] This application provides a control method for a generic workflow engine, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the control method for the generic workflow engine of this application.

[0028] In this embodiment, the control method of the generic workflow engine includes steps S10 to S50: Step S10: Respond to the process advancement command of the generic workflow engine, match the target transition path based on the generic parameterized stage node and transition rule set, and determine the advancement context to be verified.

[0029] Process advancement instructions are the core control instructions that trigger the flow of process stages, driving the process to jump from the current stage to the downstream target stage. Generic parameterized stage nodes are process node units based on unified interface constraints, adaptable to different business entity types, and carry stage attributes, flow rule associations, and business data binding capabilities. The transfer rule set is a set of rules describing the triggering conditions, action types, and target stages for inter-stage transitions, covering automatic, manual, and conditional transition modes. The pending advancement context is a standardized data carrier carrying the current stage attributes, candidate transfer paths, and basic information about the process instance, providing complete input for subsequent permission verification and blockage detection.

[0030] In this embodiment, the aforementioned process advancement instructions can be triggered in four ways. First, manual operation triggering: the operator submits approval, submission, or rejection requests through the business interaction interface. Upon receiving the request, the system generates a process advancement instruction carrying the corresponding trigger action to drive the flow of manually decided process nodes. Second, event-driven triggering: after the upstream business system completes a specified business action, it pushes a business event message. Upon receiving the message, the generic workflow engine automatically generates a process advancement instruction with the corresponding trigger action to drive the automatic flow of business-linked process nodes. Third, timed scheduling triggering: according to preset periodic scheduling rules, the engine automatically generates process advancement instructions for process instances that meet timeout conditions, to execute automated flow actions such as automatic timeout redirection and automatic overdue reminders. Fourth, data condition triggering: when the business data associated with a process instance meets preset threshold conditions, the engine automatically generates a process advancement instruction to drive the automatic flow of data-driven branch nodes.

[0031] Once the generic workflow engine receives the process advancement instruction, it begins loading the corresponding process definition and set of transfer rules, and performs target transfer path matching.

[0032] For example, there are two methods for matching the target transfer path. The first is priority-based static rule retrieval. Before the formal start of the process flow, the corresponding process definition file is loaded according to the business type and tenant identifier carried by the instruction, and the full set of generic parameterized stage nodes and transfer rules is extracted. Then, according to the trigger action identifier in the instruction, the corresponding transfer rules are directly matched according to three types of transfer: automatic, manual, and conditional. The guard expressions of the conditional rules are verified one by one, and rules that do not meet the preconditions are filtered out. The path corresponding to the final retained transfer rules is the target transfer path. This method relies on the preset process definition and fixed priority matching logic, the rules are clear and stable, and the execution speed is fast.

[0033] The second method is topology-based dynamic path derivation. Upon receiving a process advancement instruction, it first locates the position of the current stage node in the directed topology graph of the process. Starting from the current stage, it performs a breadth-first traversal to deduce all reachable downstream stage nodes. Then, combining the trigger action type, guard condition expression, and the current process instance's runtime data, it reverse-verifies the flow legality of each reachable path, eliminating paths that do not meet the trigger conditions and pre-constraints. The final remaining legal reachable paths are the target transfer paths. This method dynamically deduces reachable paths based on the process topology, without relying on pre-matching of fixed rules.

[0034] In an exemplary scheme for determining the context to be verified, a set of process definitions matching priorities is first loaded. This set contains all stage node definitions and transition rule definitions under generic parameter constraints. Each transition rule is pre-configured with a corresponding trigger action type, guard condition expression, and target stage identifier. Then, an initial screening of trigger actions is performed, comparing the trigger action identifier in the process advancement instruction with the trigger action configuration of the transition rules item by item to filter out the set of transition rules matching the trigger actions. Next, for conditional transition rules, their guard condition expressions are parsed, and evaluation verification is performed in conjunction with the business operation data of the current process instance, eliminating transition rules that do not meet the preconditions. Then, a target stage validity check is performed, verifying whether the target stage exists in the set of stage nodes defined in the current process, eliminating transition rules with invalid target nodes. Duplicate rule elimination is then performed; if multiple duplicate rules with the same source, target, and trigger action exist, the one with the highest priority is retained, and the remaining redundant rules are eliminated. Finally, the current stage attributes, all compliant target transition paths, and basic process instance information are integrated and encapsulated to generate a standardized context to be verified, used for subsequent permission assessment and blocking detection.

[0035] It should be noted that in some special cases, if there is only one compliant target transfer path, the subsequent multi-path verification and screening process will be skipped, and it will be directly used as the final execution path.

[0036] Step S20: If the permission expression bound to the progress context to be verified passes the verification of the four-dimensional permission information associated with the process progress instruction, a progress candidate scheme is generated based on the progress context to be verified.

[0037] Permission expressions are a set of logical rules configured based on nested Boolean logic to limit the scope of the operation subject in a transfer path, and are the core basis for permission verification. Examples include role matching expressions, department affiliation expressions, job level value comparison expressions, data range intersection expressions, and multi-level AND / OR combination nested expressions. Four-dimensional permission information consists of four core dimensions describing the permission attributes of the operation subject in the current process advancement instruction, and serves as the comparison benchmark for permission verification. Examples include the operator's role identifier, department identifier, job level value, and set of accessible data range identifiers. Candidate advancement schemes are the set of all transfer paths for which the operator has the necessary permissions, along with their corresponding target stage attributes, after permission verification and filtering. These serve as the input for subsequent process blockage detection.

[0038] In this embodiment, permission verification can be implemented through two core verification mechanisms. The first is recursive descent real-time parsing verification. For each target transfer path in the context to be verified, its bound permission expression is read in real time. The nested Boolean structure is decomposed layer by layer using recursive descent parsing. After constructing a computation node tree, Boolean evaluation is performed from bottom to top. Combined with a short-circuit optimization strategy, the permission determination result of a single path is obtained. All paths that pass the verification are aggregated to generate candidate advancement schemes. This method adopts real-time parsing and dynamic computation execution logic, which does not require preprocessing, supports dynamic modification of expressions and immediate effect, and adapts to flexible business scenarios where permission rules are frequently adjusted.

[0039] The second method is rule pre-compilation and caching verification. All permission expressions for each process are pre-compiled into standardized verification rule bytecode and cached in a rule cache library. Each rule is bound to a unique expression identifier. When performing permission verification, the pre-compiled verification rule is retrieved directly based on the expression identifier of the target transfer path. After injecting the four-dimensional permission information corresponding to the process advancement instruction, the verification calculation is performed directly, eliminating the need for repeated parsing of the expression structure. Permission determination results for all paths are obtained in batches, and candidate advancement schemes are generated through filtering. This approach uses pre-compilation caching and direct calculation execution logic, eliminating runtime expression parsing overhead through pre-compilation, significantly improving execution efficiency in high-frequency verification scenarios.

[0040] In an exemplary scheme for determining candidate advancement plans, all target transfer paths corresponding to the advancement context to be verified are first loaded, and the permission expression identifier bound to each path and the four-dimensional permission information of the process advancement instruction are extracted. Then, empty expression preprocessing is performed, directly marking paths with empty permission expressions as passed, ensuring backward compatibility. Next, for paths with non-empty permission expressions, the pre-compiled rule cache is queried. If the cache is hit, the pre-compiled rule is directly called for verification; if the cache is not hit, real-time recursive parsing is initiated, a computation node tree is constructed, Boolean verification is performed, and the parsed rules are synchronously written to the cache. A short-circuit evaluation strategy is used throughout the verification process, terminating when a computation branch encounters a false value or a true value, reducing invalid computations. After all paths have completed permission verification, all verified transfer paths and their corresponding target stage attribute information are summarized. After deduplication of duplicate paths, the final candidate advancement plan is generated for subsequent process blocking detection and selection of target advancement plans.

[0041] It should be noted that in some special cases, if there is only one target transfer path and the permission verification passes directly, the subsequent multi-path filtering process will be skipped, and it will be directly used as the candidate solution for advancement.

[0042] After generating the candidate implementation plan, the process enters the process blockage detection stage, and the screening process for the target implementation plan is initiated.

[0043] Step S30: Perform static process structure analysis and runtime state dual process blockage detection on the candidate advancement schemes, eliminate invalid paths, and obtain the target advancement scheme.

[0044] Dual-layer process blocking detection is a two-tiered process blocking protection mechanism encompassing static structure verification of the process definition and runtime instance state verification. Static analysis is used to identify structural defects in the process topology, while runtime detection intercepts dynamic blocking risks during instance execution. Static analysis performs process blocking risk screening on the directed topology of the process definition, including circular dependency detection, parallel outgoing edge conflict detection, and unreachable mandatory stage detection. Runtime detection performs dynamic risk verification on the current process instance's running state, including mandatory stage skipping detection, parallel group blocking detection, and concurrent sub-instance completion detection. The target advancement plan is a set of compliant transfer paths that have undergone dual-layer process blocking verification and are free from flow blocking risks.

[0045] In this embodiment, the process topology data and instance running status data corresponding to the candidate solution are input into a dual process blocking detector to start process blocking risk detection in both static and runtime dimensions.

[0046] For example, there are two execution methods for blocking detection. The first is a full-topology full-scan detection mode. After the blocking detection is officially started, the complete directed topology graph defined by the current process is loaded first. A depth-first traversal is performed on all nodes in the full process, checking for three types of static structural defects: circular dependencies, parallel outgoing edge conflicts, and unreachable necessary stages, generating static blocking detection results. Then, combined with the full running status data of the current process instance, the dynamic process blocking risks of all candidate paths are verified, and a complete blocking detection report is output. This method covers the entire process topology and full status, ensuring comprehensive and thorough detection.

[0047] The second approach is incremental path-based targeted detection, which performs targeted process blocking analysis only on the local path topology from the source stage to the target stage involved in advancing candidate solutions. It first extracts the local topology fragments corresponding to the candidate paths, verifies the circular dependencies and reachability of mandatory nodes within the fragments, and then combines the current instance status to verify the skipping of mandatory stages, parallel blocking, and sub-instance completion risks within the path. This eliminates the need to scan the entire complete topology. This method performs incremental detection only on the target path, resulting in low performance overhead and fast execution speed.

[0048] Before performing blocking detection, the granularity of the detection rules can be determined based on the following methods.

[0049] In one alternative approach, a pre-defined set of standard blocking detection rules is retrieved from the system. This set predefines the criteria and detection procedures for various types of process blocking risks. The corresponding detection rule is directly matched based on the business risk level of the process and used directly for the current blocking detection. This method is logically unified and stable, with consistent detection standards.

[0050] In another alternative approach, the path complexity and corresponding business risk level of the candidate implementation paths are first extracted, along with the runtime complexity of the current process instance. Then, detection rules optimized based on historical faults are retrieved from the rule base, and the depth and granularity of the detection are dynamically adjusted. Full-scale deep detection is enabled for high-risk paths, while simplified and rapid detection is enabled for low-risk paths. After rule adaptation, these rules are used as the execution guidelines for this blocking detection. This method can dynamically adapt the detection intensity according to the risk level, balancing detection accuracy and execution efficiency.

[0051] In an exemplary scheme for determining a target advancement plan, the process definition topology data corresponding to the candidate advancement plans and the current process instance runtime state snapshot are first extracted and split into two dimensions: static structure verification and runtime state verification, generating a two-dimensional blocking detection dataset. Then, static structure blocking detection is performed, based on the process topology, performing circular dependency exit determination, parallel outgoing edge conflict analysis, and mandatory stage reachability verification, generating a static structure blocking detection result set. Next, runtime dynamic blocking detection is performed, combining the static detection results and runtime state snapshots, performing mandatory stage skip verification, parallel group target blocking determination, and verifying the concurrent sub-instance aggregation completion degree as needed based on the current stage's parallel attributes, generating runtime dynamic process blocking risk detection results. Then, a detection result fusion verification is performed, integrating the static and dynamic detection results, and marking each candidate path with a risk level and risk type. Finally, transfer paths with any type of process blocking risk are eliminated, all compliant flow paths are retained and encapsulated to form a target advancement plan for subsequent concurrent sub-instance construction and stage transitions.

[0052] Step S40: Determine the parallel attributes of the target stage according to the target advancement plan, construct concurrent sub-instances according to the parallel attributes, and start the full lifecycle management of the concurrent sub-instances.

[0053] Parallelism attributes are markers indicating whether a target phase supports concurrent execution of multiple sub-instances, including two core configuration types: parallelism flags and nesting prohibition flags. Concurrent sub-instances are independent execution units assigned to different processing entities during the parallel phase, possessing independent lifecycle states and business processing contexts. Full lifecycle management is a mechanism for unified control over the entire state transition of concurrent sub-instances from creation to termination, covering five states: pending, processing, completed, rolled back, and canceled.

[0054] In this embodiment, the parallel attributes of the target stage are extracted according to the target advancement plan. When the target stage is marked as a parallel stage, the construction and lifecycle management process of concurrent sub-instances is initiated.

[0055] For example, there are two methods for constructing and managing concurrent sub-instances. The first is configuration-driven batch construction and management. Before the formal start of sub-instance construction, the pre-set configuration parameters such as the number of concurrent instances, the scope of processing entities, and the state transition rules for the target stage are read. A fixed number of concurrent sub-instances are generated in batches according to the configuration, uniformly initialized to a pending state, and then the standard five-state lifecycle management rules are attached to execute standardized state transition and aggregation calculation management. This method relies on the pre-set configuration to perform standardized management, and the logic is stable and controllable.

[0056] The second approach is dynamic adaptive elastic construction and control. It first extracts the business data volume of the process instance, the number of authorized processing entities, and the current system load status. Based on a dynamic scheduling algorithm, it calculates the optimal number and allocation strategy for concurrent sub-instances, elastically generating the corresponding number of concurrent sub-instances. Different lifecycle control rules are then applied to different sub-instances, supporting dynamic adjustment of the number of sub-instances and processing entity allocation at runtime. This method can elastically adapt to the concurrency scale according to the actual business scenario, without relying on fixed preset configurations, resulting in higher resource utilization.

[0057] Before initiating lifecycle management, management rules can be determined based on the following methods.

[0058] In one alternative approach, a pre-defined set of standard five-state lifecycle management rules is retrieved. This set predefines the transition conditions, triggering actions, and aggregation calculation logic for each state of the sub-instance. The corresponding management rules are directly matched based on the parallelism type of the target stage, and this is directly applied to the full lifecycle management of the sub-instance. This method features standardized rules and stable transition logic.

[0059] In another alternative approach, the business characteristics and workflow requirements of the target stage are first extracted, along with the business rule constraints of the current process instance. Then, lifecycle management rules optimized based on historical business data are retrieved from the rule base. Exclusive management rules tailored to this parallel scenario are dynamically customized, supplemented with customized state transition conditions and aggregation judgment logic. After feasibility verification, these rules are used for lifecycle management of this sub-instance. This method can flexibly adapt to customized parallel business needs and is not limited to standard management rules.

[0060] In the exemplary scheme for initiating full lifecycle management, the parallel identifier and nesting prohibition attribute of the target stage are first extracted based on the target advancement plan. Nested concurrency compliance verification is then performed in conjunction with the concurrency level of the current process instance, generating a sub-instance creation permission determination result. When the determination result is passed, the concurrency configuration parameters of the target stage and the process instance context information are extracted. The sub-instance generation scale, association binding rules, and initial state baseline are parsed to form a batch construction parameter set for sub-instances. Subsequently, based on the construction parameter set, a unified data structure following generic constraints is used to batch generate sub-instance entities. A globally unique identifier is assigned to each sub-instance, establishing a two-way binding relationship between the sub-instance and its corresponding process instance and target stage, resulting in an initial set of sub-instance entities. Next, a unified state initialization anchoring is performed on the initial set of sub-instance entities, setting the state of all sub-instances to pending processing. Five-state lifecycle transition rules, batch state management interfaces, and aggregated state calculation logic are mounted, and a nested concurrency interception mechanism is enabled to generate a running sub-instance cluster. Finally, the current process instance is driven to transition to the target stage, synchronously updating the global process running state and sub-instance aggregated state snapshots, completing the initial deployment of the parallel stage and the initiation of full lifecycle management of concurrent sub-instances.

[0061] Step S50: Based on the lifecycle management and the concurrent sub-instances, the process progress execution result is obtained after the phase transition is completed.

[0062] The process execution result is a standardized output that encapsulates information such as the running status of the process instance, details of concurrent sub-instances, and subsequent executable flow paths after the phase transition is completed. This output is used to provide feedback on the process progress status and subsequent operation options to the business system.

[0063] In this embodiment, after the process instance completes the stage transition and starts the lifecycle management of concurrent sub-instances, a standardized process advancement execution result is generated based on the management status and sub-instance data.

[0064] For example, there are two ways to generate the execution results of the process. The first is a full snapshot-style result output. After the stage transition is completed, the running status parameters of the process instance, the real-time status details of all concurrent sub-instances, all subsequent reachable transfer paths and corresponding permission identifiers are collected in full, and all information is completely encapsulated into a standardized execution result data package for output. This method provides complete and comprehensive information and can be directly used as a data source for the process status of the business system.

[0065] The second approach is incremental event-based result output. After a stage transition is completed, only the incremental status change, triggered business event types, and core operation permission list for this transition are extracted and pushed to the subscribed business systems as event messages, without needing to transmit the full process data. This method results in smaller data volume and higher transmission efficiency.

[0066] In the exemplary scheme for generating process execution results, the process instance is first driven to complete the state transition from the current stage to the target stage, activating the five-state lifecycle management mechanism and nested concurrency interception logic of concurrent sub-instances, generating a running process instance with the stage transition completed. Then, real-time status data of all concurrent sub-instances under the running process instance is collected, and full completion aggregation calculation and rollback / cancellation of abnormal state identification are performed to generate a sub-instance aggregated status dataset. Next, based on the sub-instance aggregated status dataset, the transfer rules of the target stage are matched, and automatic transfer paths and legal manual transfer options that meet the trigger conditions are selected to generate a set of executable transfer schemes. Then, compliance verification of the result data is performed, verifying the legality and consistency of all status data and transfer schemes, and eliminating abnormal and invalid data. Finally, the running status of the process instance, details of concurrent sub-instances, and the set of executable transfer schemes are integrated and encapsulated to generate standardized process execution results.

[0067] Further, please refer to Figure 2 , Figure 2This is the system architecture diagram of the generic workflow engine system in this application. The generic workflow engine system is implemented based on a four-layer architecture. The top layer is the application layer business process management system, which uniformly handles the workflow scheduling needs of OA approval, procurement processes, project management, contract management, and other business scenarios. Below this is the core layer, a generic workflow engine with zero external dependencies, which incorporates four core components: a generic state machine (WorkflowEngine), a deadlock detector, a permission evaluator, and a sub-instance orchestration module (SubInstance). The generic state machine has automatic / manual transition, condition guards, and process definition verification capabilities; the deadlock detector has circular dependency detection, parallel blocking detection, and runtime detection capabilities; the permission evaluator has a four-dimensional permission model, AND / OR expressions, and short-circuit evaluation capabilities; and the sub-instance orchestration module has five-state lifecycle, aggregate state judgment, and nesting prohibition capabilities. The next layer is the abstract interface contract, which decouples implementation from persistence. It defines five standardized interfaces: Workflow Stage (IWorkflowStage), Workflow Transition (IWorkflowTransition), Workflow Sub-Instance (IWorkflowSubInstance), Permission Context (IPermissionContext), and Workflow Repository (IWorkflowRepository). The lowest layer is the extensible implementation layer persistence adapter, supporting flexible integration with frameworks such as SqlSugar, Entity Framework Core (EFCore), Dapper, MongoDB, and custom persistence solutions.In actual operation, the system responds to the process advancement instructions of the generic workflow engine, matches the target transition path based on the generic parameterized stage nodes and transition rule set, determines the advancement context to be verified, and if the permission expression bound to the advancement context to be verified passes the verification with the four-dimensional permission information associated with the process advancement instruction, a advancement candidate scheme is generated based on the advancement context to be verified. The advancement candidate scheme is subjected to static analysis of the process structure and dual process blocking detection of runtime state, and invalid paths are eliminated to obtain the target advancement scheme. The parallel attributes of the target stage are determined based on the target advancement scheme, and concurrent sub-instances are constructed according to the parallel attributes and the full lifecycle management of the concurrent sub-instances is started. Finally, based on the lifecycle management and the concurrent sub-instances, the process advancement execution result is obtained after the stage transition is completed.

[0068] Second Embodiment This embodiment provides an exemplary scheme for constructing generic process instances and matching transfer paths. In this example, firstly, based on the business type and tenant identifier of the process advancement instruction, a set of process definitions and rules matching priority is loaded to generate a generic process execution instance. Then, based on the trigger action identifier, three types of transfer rules are matched to obtain preliminary candidate paths. Subsequently, guard expressions are evaluated and verified on conditional transfer paths to filter and obtain target transfer paths. Finally, the process is integrated to generate the advancement context to be verified. Step S10 includes steps A11 to A14: Step A11: Based on the business type and tenant identifier of the process advancement instruction, load the process definition matching the priority, the corresponding generic parameterized stage node and the set of transition rules under the generic parameter constraints, and generate a generic process running instance.

[0069] Step A12: Based on the trigger action identifier in the process advancement instruction, traverse the generic process running instances, match the corresponding trigger action transfer rules according to the three types of transfer types: automatic, manual, and conditional, and obtain a preliminary candidate transfer path set.

[0070] Step A13: Parse the conditional transfer paths in the preliminary candidate transfer path set, determine the guard condition expressions associated with the conditional transfer paths, and perform evaluation and verification in conjunction with process instance running data to filter and obtain the target transfer path.

[0071] Step A14: Integrate the current stage attributes, the target transfer path, and the process instance information to generate the progress context to be verified.

[0072] A generic process execution instance is an execution unit instantiated under generic parameter constraints, carrying the entire lifecycle of a single business process. It is the core execution carrier for transfer rule matching and process flow control. The preliminary candidate transfer path set is a set of all transfer paths that meet the basic triggering conditions after initial matching of triggering actions. It serves as the basic input for subsequent condition validation and path selection. The guard condition expression is a logical expression configured on condition-based transfer paths to determine whether the preconditions for the transfer are met, controlling the triggering timing of condition-based branches. The process instance execution data is real-time execution data describing the current process instance's business state, execution parameters, and associated business information. It is the core basis for evaluating guard conditions. The target transfer path is a valid transfer path that has passed guard condition validation and meets all preconditions. It serves as the target path for staged flow execution.

[0073] In this example, when loading process definitions based on process advancement instructions to generate generic process runtime instances, a priority-based retrieval method can be used. First, the business type and tenant identifier carried by the instruction are extracted. All matching process definition entries are retrieved from the process definition repository. Then, they are sorted from highest to lowest priority by the priority field. The highest priority process definition and its associated generic parameterized stage nodes and transition rule set are selected. Instantiation initialization is completed under generic parameter constraints, thus generating a generic process runtime instance. Alternatively, a hierarchical overlay loading method can be used. First, the globally default basic process definition is loaded as a base. Then, tenant-level customized rules and business type-level customized rules are incrementally overlaid, and finally, they are merged to generate a generic process runtime instance adapted to the current business scenario, thus completing the construction of the process instance.

[0074] After constructing the generic process execution instance, the transfer rule matching process is initiated. Trigger action identifiers are extracted from the process advancement instructions. All transfer rules in the generic process execution instance are traversed, and trigger action attributes are matched one by one according to three transfer types: automatic, manual, and conditional. All transfer rules matching trigger actions are filtered out, and a preliminary candidate transfer path set is generated. Next, for the conditional transfer paths in the preliminary candidate set, their associated guard condition expressions are parsed one by one. Logical evaluation is performed in conjunction with the real-time running data of the current process instance. Invalid transfer paths that do not meet the guard conditions are eliminated, and all legal paths that meet the pre-constraints are retained as target transfer paths. Finally, the current stage attributes, target transfer paths, and basic process instance information are integrated to generate a advancement context to be verified. This hierarchical, progressive filtering method improves the accuracy of path matching and avoids invalid paths entering subsequent verification stages, thus preventing wasted computing power.

[0075] For example, there are two ways to obtain the target transfer path through guard condition evaluation and verification. The first is a path-by-path serial condition verification. Following the default sorting of the initial candidate transfer path set, guard condition expressions for condition-based transfer paths are extracted sequentially, starting from the first path. A syntax parse tree is generated for each path, and the verification is performed using process instance execution data. For each path verified, if the verification passes, it is added to the target transfer path set; if it fails, it is removed, and the verification continues for the next path. After all candidate paths have been verified, the target transfer path is obtained by summing all the verified paths. This method employs a sequential traversal path-by-path serial verification and successive result aggregation execution logic. By verifying each path individually, the determination of each path is independent and controllable, avoiding data conflict issues associated with parallel multi-path verification.

[0076] The second method is a categorized batch parallel verification. First, a preliminary categorization process is performed on the initial candidate transfer path set, dividing the transfer paths into three groups: automatic, manual, and conditional. Automatic and manual paths are directly included in the valid path range without condition verification. Guard condition verification is performed only on the conditional groups. Parallel evaluation is initiated simultaneously for all paths within the conditional groups, parsing the guard condition expressions of each path one by one and batch-matching process instance execution data to complete the verification. Invalid paths that fail verification are marked synchronously. After all conditional paths have completed parallel verification, the automatic, manual, and verified conditional paths are summarized to obtain the target transfer path. This method uses the execution logic of pre-categorization grouping and parallel verification of paths within the same group. Pre-categorization eliminates paths that do not require verification, reducing the number of invalid condition evaluations, while parallel verification improves the processing efficiency of batch paths.

[0077] Furthermore, the core of the generic workflow engine system consists of four subsystems. The first is the generic programming domain state machine (WorkflowEngine), which abstracts the core workflow logic into a pure domain state machine with three generic parameters: stage node type (TStage:IWorkflowStage), transition rule type (TTransition:IWorkflowTransition), and concurrent sub-instance type (TSubInstance:IWorkflowSubInstance). The engine does not rely on any persistence framework or Inversion of Control (IoC). The Control container or third-party library decouples itself from the specific technology stack by interacting with the outside world only through interface contracts. It has three core flow capabilities: automatic transfer, manual transfer, and conditional transfer. Automatic transfer matches automatic (Auto) type transfer rules based on trigger actions (TriggerAction) to achieve event-driven automatic advancement. Manual transfer provides a list of manual (Manual) type transfer options starting from the current stage to support manual decision-making. Conditional transfer supports conditional type guards, which configure conditional expressions through structured data configuration (GuardConfig, GuardConfiguration). It also integrates process definition integrity verification, covering stage existence checks, isolated stage detection, duplicate rule detection, reachability analysis of necessary stages, and blockage detection. Secondly, there is a concurrent sub-instance orchestration mechanism. When the stage parallel flag (IsParallel) is true, the engine automatically identifies and creates concurrent sub-instances. It adopts a five-state model of sub-instances, namely Pending, InProgress, Completed, Returned, and Cancelled, to fully cover parallel collaboration scenarios. It provides a method to determine the full completion status of all sub-instances (AllSubInstancesCompleted) and a method to identify the return status (HasReturnedSubInstance) to provide a basis for subsequent advancement decisions. It prevents the initiation of sub-processes again within the concurrent stage through nested prohibition (ForbidNesting) flags to avoid infinite recursion. At the same time, it supports batch creation, batch cancellation, and batch lifecycle management atomic operations for updating status one by one.Thirdly, there is the multi-dimensional permission evaluator, which adopts a multi-dimensional permission evaluation scheme based on structured expressions. It constructs a four-dimensional permission model consisting of Role, Department, Rank, and DataScope. The four-dimensional information of the current operator is injected through the Permission Context interface. It supports arbitrarily nested AND / OR Boolean expressions and covers multi-dimensional operators: for strings, it includes equal to (Eq, Equal) and not equal to (Neq, Not Equal); for arrays, it includes (Eq, Equal), not containing (Neq, NotEqual), non-empty intersection (In), and empty intersection (NotIn); for numeric values, it includes equal to (Eq, Equal), not equal to (Neq, NotEqual), greater than (Gt, Greater Than), greater than or equal to (Gte, Greater Than or Equal), less than (Lt, LessThan), and less than or equal to (Lte, Less Than or Equal). The first part is the Equal function, which sets a default rule to allow empty expressions, meaning that when the permission expression is empty or null, it is considered to have no permission restrictions to ensure backward compatibility. It also provides an independent expression validity verification method to check for syntax errors during the design phase. The fourth part is the Dual Process Blocking Detector (DeadlockDetector), which adopts a dual process blocking detection scheme of static analysis and runtime detection. The static detection (DetectStatic) dimension covers directed graph cycle detection algorithms based on depth-first search (DFS) and recursive stack (inStack), which can identify loop paths in the process definition and further determine whether there are outgoing edges to jump out of the loop, distinguishing between benign backtracking loops and process blocking loops without exit. The Parallel Blocking Detection (ParallelDeadlock) analyzes whether the outgoing edge target of the parallel stage is simultaneously depended by other non-parallel paths, identifies and issues edge conflicts, and checks whether there are incoming edges to reach the stage where the IsRequired flag is true.The runtime inspection (CheckAdvanceRuntime) dimension covers sub-instance completion checks, which verify whether all sub-instances in the concurrent phase have been completed before the operation is advanced. The mandatory stage skip check uses breadth-first search (BFS) reachability analysis to determine whether the advanced operation has skipped the mandatory stage. The parallel blocking check is used to determine whether the target stage is blocked by other parallel groups. It can accurately identify and handle six types of process blocking risks: parallel deadlock, cyclic dependency, unreachable required stage, uncompleted sub-instances, skipped required stage, and target blocked by parallel group. This system enables zero-dependency reuse. Its abstraction layer depends only on .NET 8.0 and has no third-party NuGet dependencies. It can be embedded in any .NET project, supports multi-tenant and multi-business type adaptation, and allows process definitions to be overridden by tenant and business type. It achieves precise loading through priority matching rules, has type safety features, and generic parameter constraints ensure compile-time type checking to avoid runtime type errors. It achieves full lifecycle management, covering the entire process lifecycle from process initiation, automatic advancement, manual advancement, sub-instance management to process cancellation and withdrawal. At the same time, it forms a dual protection mechanism of design phase and runtime phase. Static blocking detection warns of risks in the design phase, and runtime blocking detection intercepts anomalies in the execution phase, building a dual security protection system.

[0078] Third Embodiment This embodiment provides an exemplary scheme for multi-dimensional permission verification and generation of advancement candidate schemes. In this example, the permission expression bound to the target transfer path and the four-dimensional permission information are first extracted from the context to be verified. Then, the syntax validity of all permission expressions is checked and null value marking is performed to generate a permission evaluation dataset with compliance identifiers. Subsequently, dimensional recursive parsing and short-circuit Boolean verification are performed on the non-null compliant permission expressions in the dataset to obtain the permission judgment result of a single transfer path. Finally, the advancement candidate schemes that pass the permission verification are selected and summarized. Step S20 includes steps B11 to B14: Step B11: Based on the context to be verified, determine the four-dimensional permission information associated with the permission expression bound to the target transfer path and the process advancement instruction.

[0079] Step B12: Perform syntax validity verification and null value marking on the permission expression bound to the target transfer path and the four-dimensional permission information associated with the process advancement instruction to generate a permission evaluation dataset with compliance identifiers.

[0080] Step B13: Based on the non-empty compliant permission expressions in the permission assessment dataset, perform dimensional recursive parsing and short-circuit Boolean verification according to the nested Boolean operation rules to obtain the permission determination result of a single transfer path.

[0081] Step B14: Based on the permission determination results, filter out all transfer paths that have passed permission verification and their corresponding target stage attribute information to obtain the advancement candidate schemes that have passed permission verification.

[0082] Permission expressions are a set of logical rules configured based on nested Boolean operations to limit the scope of the operation subject in a transfer path, and are the core basis for permission verification. Examples include role matching expressions, department affiliation expressions, job level numerical comparison expressions, data range intersection expressions, and multi-level AND / OR combination nested expressions. Syntax validity verification is a pre-verification action used to check the structural integrity, operator validity, and dimension parameter validity of permission expressions, intercepting invalid expressions with grammatical errors in advance. Examples include nested structure closure verification, operator format verification, dimension field existence verification, and parameter format compliance verification. The permission assessment dataset is a standardized verification input set that integrates permission expressions, compliance identifiers, and four-dimensional permission information corresponding to process advancement instructions, carrying all the basic data for a single round of permission verification.

[0083] Nested Boolean operation rules describe the rules for nested combination of AND and OR logical operations, supporting arbitrary depths of nesting. Dimensional recursive parsing is a parsing method that decomposes nested expressions layer by layer according to permission dimension attributes and distributes processing according to dimensions, decoupling the logical structure from dimension determination. Short-circuit Boolean validation is a validation strategy that terminates the remaining operations when a condition that can determine the final result is encountered during Boolean operations, reducing invalid calculations and improving validation efficiency. The permission determination result is the final conclusion of whether the permission of a single transfer path is approved after permission validation.

[0084] In this example, when extracting the four-dimensional permission information corresponding to the permission expression and process advancement instruction from the context to be verified, it can be done by path association extraction. This involves traversing all target transfer paths in the context to be verified, extracting the permission configuration fields bound to each path one by one, and simultaneously pulling a snapshot of the current operator's four-dimensional permissions from the process context to complete the collection of basic verification data. Alternatively, a batch mapping extraction method can be used. A mapping index table between transfer path identifiers and permission expressions can be pre-established. Based on the identifier set of the target transfer paths, the corresponding permission expressions can be retrieved in batches, while simultaneously loading the operator's permission context in batches, completing the collection of all verification data at once, thereby improving the overall efficiency of data extraction.

[0085] After collecting the basic data for permission assessment, the expression syntax validity verification process is initiated. Each permission expression bound to all target transfer paths undergoes compliance verification of its structure, operators, and dimension parameters. Null expressions are simultaneously marked and allowed to proceed by default, generating a permission assessment dataset with compliance indicators. Next, for non-null compliant permission expressions in the dataset, dimensional recursive parsing is performed according to nested Boolean operation rules, breaking them down into multiple layers of logical nodes and dimensional condition units. Combined with a short-circuit Boolean verification strategy, layer-by-layer calculations are performed to determine the permission assessment result for each transfer path. Finally, based on the permission assessment results for all paths, all verified transfer paths and their corresponding target stage attribute information are selected and integrated to generate permission-verified advancement candidate schemes. This combined mechanism of pre-syntax verification, layered dimensional parsing, and short-circuit operation optimization improves the accuracy and efficiency of permission verification, preventing invalid expressions from entering the calculation stage and causing computational waste.

[0086] For example, there are two ways to obtain the permission determination result of a single transfer path through a non-empty compliant permission expression. The first is a top-down recursive tree depth-first traversal serial verification. Starting from the top-level logical node of the permission expression, the expression tree is recursively traversed layer by layer in depth-first order. When a leaf node of a dimension condition is encountered, it is dispatched to the corresponding dimension's evaluation unit to perform condition determination. During the traversal, if a node in the AND operation branch does not meet the condition, the remaining traversal of that branch is immediately terminated and a failure is returned. If a node in the OR operation branch meets the condition, the remaining traversal of that branch is immediately terminated and a success is returned. After all branches have been traversed and determined, the results are aggregated layer by layer to obtain the final permission determination result of a single transfer path. This method uses depth-first node-by-node recursive traversal and branch-level short-circuit termination execution logic. By decomposing and short-circuiting layer by layer according to the nested structure of the expression, the accuracy of the determination of complex nested expressions is guaranteed.

[0087] The second method is dimensional flat grouping and parallel verification. First, the nested permission expressions are expanded into a list of dimensional conditions. All dimensional conditions are grouped and marked according to AND / OR operations. Then, conditions from different dimensions are distributed to the corresponding dedicated evaluation units, and parallel judgment of all dimensional conditions is initiated simultaneously. After the judgment results of all dimensional conditions are returned, the results are aggregated layer by layer according to the grouping operations. Short-circuit rules are used to skip grouping operations with already determined results, ultimately obtaining the permission judgment result for a single transfer path. This method employs the execution logic of multi-dimensional condition flat grouping and multi-dimensional parallel judgment. By decomposing the structure beforehand, the computational dependency of the nested structure is eliminated, and parallel judgment significantly improves the processing efficiency of multi-dimensional conditions.

[0088] Further, please refer to Figure 3 , Figure 3 This is a diagram of the multi-dimensional permission expression tree structure for this application. The multi-dimensional permission verification process is implemented using a multi-level nested Boolean permission expression tree as an example. The top level of the expression tree is an AND node, with three parallel verification branches. The first branch is the role dimension, configured with the rule that roles include (In) two types of identities: Manager and Supervisor (Role In [Manager, Supervisor]). The second branch is an OR node marked "Saving either one is sufficient," with two sub-branches: department and job level. The department dimension is configured with the rule that the department equals (Eq, Equal) Finance Department (Department Eq Finance Department), and the job level dimension is configured with the rule that the job level is greater than or equal to (Gte, Greater Than or Equal) 5 levels (Rank Gte5). The third branch is the data scope dimension, configured with the rule that the data scope includes (In) all permissions (DataScope In [All]). The evaluation logic of this expression is as follows: The overall expression represents (role is manager or supervisor) and (department is finance department or job level ≥ 5) and (data range is all). It employs a short-circuit AND operation to return if false, and an OR operation to return if true. A default rule for allowing empty expressions is set to ensure backward compatibility. During actual permission verification, the system first determines the permission expression and four-dimensional permission information bound to the target transfer path based on the context to be verified. It then performs syntax validity checks and empty value markings on all permission expressions, generating a permission evaluation dataset with compliance indicators. Next, for non-empty compliant permission expressions in the dataset, it performs dimensional recursive parsing and short-circuit Boolean checks according to nested Boolean operation rules. It decomposes the operation nodes and dimensional conditions layer by layer and distributes them to the corresponding dimensions for judgment, obtaining the permission judgment result for a single transfer path. Finally, it filters out all verified transfer paths and their corresponding target stage attribute information based on the permission judgment results, generating a candidate transfer scheme that has passed permission verification.

[0089] Fourth embodiment This embodiment provides an exemplary scheme for constructing an operation node tree and performing recursive Boolean validation. In this example, a recursive descent parsing method is first used to decompose the nested Boolean structure of non-empty compliant permission expressions, constructing an operation node tree that distinguishes between operation nodes and dimension condition leaf nodes. Then, the evaluation unit and operator set are matched according to the permission dimension attribute to generate a dimension-level condition evaluation sequence. Finally, Boolean evaluation is performed hierarchically from bottom to top, and the results are aggregated layer by layer to obtain the permission determination result for a single transfer path. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the fourth embodiment of the control method for the generic workflow engine of this application. Step B13 includes steps C11-C13: Step C11: Based on the non-empty compliant permission expressions in the permission assessment dataset, decompose the nested Boolean structure layer by layer using the recursive descent parsing method to construct a computation node tree that distinguishes between computation nodes and dimension condition leaf nodes.

[0090] Step C12: Match the corresponding evaluation unit and operator set according to the permission dimension attribute of each node in the operation node tree, and generate a dimension-level condition evaluation sequence sorted by the tree structure hierarchy.

[0091] Step C13: Based on the dimension-level condition evaluation sequence, perform Boolean evaluation operations from bottom to top along the operation node tree hierarchy, and aggregate the Boolean evaluation results layer by layer to obtain the permission determination result of the single transfer path.

[0092] Recursive descent parsing is a parsing algorithm that decomposes the syntax structure of Boolean expressions layer by layer from top to bottom according to the nested syntax hierarchy. It is the core parsing method for constructing the operation node tree. The operation node tree is a tree-shaped data structure generated based on the logical structure mapping of permission expressions. It consists of upper-level logical operation nodes and lower-level dimension condition leaf nodes, and is the core operation carrier of Boolean validation. Operation nodes are the intermediate nodes of the tree structure that carry Boolean logical operation rules and are used to define the logical operation relationships between their child nodes. For example, AND operation nodes, OR operation nodes, and NOT operation nodes. Dimension condition leaf nodes are the terminal nodes of the tree structure that are attached to operation nodes and carry single permission dimension validation rules. They are the smallest execution unit for permission condition judgment. For example, role dimension containment condition nodes, department dimension equal to condition nodes, job level numerical comparison condition nodes, and data range intersection condition nodes. The dimension-level condition evaluation sequence is a set of dimension conditions arranged in the hierarchical order of the operation node tree and classified by permission dimension. It is the input sequence for batch execution of dimension condition judgment.

[0093] In this example, when constructing the operation node tree based on a non-empty compliance permission expression, a top-down recursive decomposition approach can be used. Starting from the top-level logical operator of the permission expression, nested operation nodes and dimension condition units are identified layer by layer. For each operation node identified, a corresponding tree node is generated, and its sub-expressions are recursively parsed until all dimension conditions are decomposed into leaf nodes, thus completing the construction of the operation node tree. Alternatively, a syntax pre-compilation mapping method can be used. The permission expression is first converted into a standardized syntax token sequence, and then the token sequence is mapped into a tree structure based on preset syntax rules, completing the division and mounting of operation nodes and leaf nodes in one go, thereby improving the efficiency of node tree construction.

[0094] After constructing the operation node tree, the dimensional condition matching and evaluation sequence generation process is initiated. It traverses all leaf nodes of the operation node tree, matching specific evaluation units and corresponding operator sets based on the permission dimension attributes corresponding to each node. All dimensional conditions are sorted according to the hierarchical order of the tree structure, generating a dimensional condition evaluation sequence. Then, based on this evaluation sequence, Boolean evaluation operations are performed from bottom to top along the hierarchy of the operation node tree. First, the condition judgments of all leaf nodes are completed, and then the logical results of the operation nodes are aggregated layer by layer upwards, ultimately obtaining the permission judgment result for a single transfer path. This structured tree-like operation and hierarchical aggregation mechanism improves the accuracy and efficiency of complex nested expressions, avoiding judgment biases caused by chaotic parsing of nested structures.

[0095] For example, there are two ways to obtain the permission determination result of a single transfer path through a dimension-level condition evaluation sequence. The first is a depth-first serial recursive evaluation. Starting from the root node of the operation node tree, all child nodes are recursively traversed in a depth-first order. At each dimension condition leaf node reached, the corresponding dimension condition is evaluated, and the result is returned to the upper-level operation node. Short-circuit optimization is performed during the traversal. If the current node is an AND operation node and a child node returns "not passed," the traversal of the remaining child nodes of that node is terminated, and "not passed" is returned upwards. If the current node is an OR operation node and a child node returns "passed," the traversal of the remaining child nodes of that node is terminated, and "passed" is returned upwards. After the root node aggregates the results of all child nodes, the permission determination result of the single transfer path is obtained. This method uses a depth-first, node-by-node recursive traversal and node-level short-circuit termination execution logic, strictly conforming to the nested structure of the expression, supporting arbitrary depths of logical nesting, and ensuring rigorous and controllable judgment logic.

[0096] The second method is hierarchical parallel batch evaluation. First, the computation node tree is hierarchically partitioned, dividing all nodes into multiple computation levels from leaf to root, with no logical dependencies between nodes within the same level. Parallel evaluation of all leaf nodes at the lowest level is initiated simultaneously, batching the evaluation results for all leaf nodes. Then, the process proceeds upwards layer by layer, synchronously performing logical aggregation operations on all computation nodes at the same level. Short-circuit rules are used to skip operations on nodes with already determined results, until the root node completes the final aggregation, yielding the permission determination result for a single transfer path. This method employs hierarchical decoupling partitioning and parallel computation of nodes at the same level. By eliminating computational dependencies between nodes through pre-level partitioning, it significantly improves the verification efficiency of multi-condition, wide-structure expressions through parallel computing.

[0097] Furthermore, precise verification of permission expressions is achieved through structured parsing and hierarchical aggregation. First, based on non-empty compliant permission expressions in the permission evaluation dataset, a recursive descent parsing (RDP) method is used to decompose nested Boolean structures layer by layer, constructing an operation node tree (ONTO) that distinguishes between operation nodes (ON) and dimension condition leaf nodes (DCLN), thus completing the semantic structured mapping of permission expressions. Then, based on the permission dimension attributes corresponding to each node in the operation node tree, the corresponding dimension's specialized evaluation unit and operator set are matched to generate a dimension-level condition evaluation sequence (DCES) ordered hierarchically by the tree structure. Finally, based on this dimension-level condition evaluation sequence, Boolean evaluation is performed from bottom to top along the operation node tree hierarchy. The results are aggregated layer by layer using a short-circuit evaluation strategy to ultimately obtain the permission judgment result (PJR) for a single transfer path.

[0098] Fifth Embodiment This embodiment provides an exemplary scheme for dual process blockage detection and target advancement scheme generation. In this example, firstly, based on the process topology data and runtime state snapshot corresponding to the advancement candidate scheme, static structure verification and runtime state verification data are split into two dimensions to generate a dual-dimensional blockage detection dataset. Then, the process topology is subjected to circular dependency exit determination and mandatory stage reachability verification to obtain static structure blockage detection results. Subsequently, the runtime state snapshot is combined to perform mandatory stage skip verification and parallel group target blockage determination to obtain runtime dynamic process blockage risk detection results. Finally, the two types of detection results are merged to eliminate risky paths and encapsulate to obtain the target advancement scheme. Step S30 includes steps D11~D14: Step D11: Based on the process definition topology data and process instance running status snapshots corresponding to the advancement candidate schemes, split the static structure verification dimension and the running status verification dimension to obtain a two-dimensional blocking detection dataset.

[0099] Step D12: Perform cyclic dependency exit determination and mandatory stage reachability verification on the process topology of the two-dimensional blocking detection dataset to obtain the static structure blocking detection result.

[0100] Step D13: Based on the static structure blocking detection results and runtime state snapshots, perform mandatory stage skip verification and parallel group target blocking determination to obtain the runtime dynamic process blocking risk detection results.

[0101] Step D14: Integrate the static structure blockage detection results and the dynamic process blockage risk detection results, eliminate transfer paths with arbitrary process blockage risks, retain compliant transfer paths, and encapsulate them to form the target advancement plan.

[0102] The process definition topology data is a directed graph structure describing the connection relationships between all stage nodes and transition rules in the process, and is the core analysis object for static blocking detection. Examples include the set of stage nodes, the set of directed transition edges, the set of node attribute tags, and the set of edge trigger rule configurations. The process instance runtime state snapshot is a slice of the full runtime state data of the process instance at a specific moment, and is the core basis for runtime blocking detection. Examples include the current stage identifier, the set of concurrent sub-instance states, the trajectory of executed stages, the current value of business data, and the execution status of parallel groups. The dual-dimensional blocking detection dataset is a standardized detection input set integrating static topology data and runtime state data, carrying all the basic data for dual process blocking detection. Cyclic dependency exit determination is a detection action that determines whether a cyclic path in the directed graph of the process has an outgoing edge that can escape the loop, distinguishing between benign backtracking loops and process blocking loops without exit points. Mandatory stage reachability verification is a static detection action that verifies whether stage nodes marked as mandatory have valid incoming edges reachable, used to identify unreachable mandatory nodes in advance. The static structural blocking detection result is a set of structural process blocking risk judgments obtained after performing static analysis on the process definition topology.

[0103] The mandatory stage skip check is a dynamic detection action that verifies at runtime whether the execution path bypasses the mandatory stage, used to intercept illegal jump operations. The parallel group target blocking determination is a dynamic detection action that verifies whether the target stage is blocked by other parallel execution groups and cannot be entered normally. The runtime dynamic process blocking risk detection result is a set of execution-state blocking risk judgments obtained after performing dynamic verification on the running state of the process instance.

[0104] In this example, when splitting the dual-dimensional verification data based on the candidate advancement scheme, it can be done by classifying and splitting the entire dataset, extracting the complete process definition topology diagram associated with the candidate advancement scheme and the runtime status data of all instances, and then classifying and standardizing the data according to two dimensions: static structure and runtime status, to generate a dual-dimensional blocking detection dataset. Alternatively, it can be split by path-targeted extraction, extracting only the local topology fragments from the source stage to the target stage involved in the candidate advancement scheme and the runtime status data of the corresponding paths, and then splitting them in a targeted manner to generate a dual-dimensional blocking detection dataset that only covers the target path, thereby reducing the amount of invalid data processed and improving the detection execution efficiency.

[0105] After constructing the dual-dimensional blocking detection dataset, a static structural blocking detection process is initiated. Based on the process topology in the dataset, circular dependency exit checks and mandatory stage reachability verifications are performed to systematically identify structural blocking risks in the process topology, generating static structural blocking detection results. Next, combining the static detection results with runtime state snapshots, mandatory stage skip verification and parallel group target blocking checks are performed to verify the dynamic flow risks of each candidate advancement path, generating runtime dynamic process blocking risk detection results. Finally, the static and dynamic detection results are merged, and each candidate path is labeled with a risk level and risk type. Paths with any process blocking risk are eliminated, and all compliant flow paths are retained and encapsulated into a target advancement plan. This dual protection mechanism of static structural pre-screening and runtime dynamic interception comprehensively covers process blocking risk scenarios, avoiding process blocking problems caused by structural defects and dynamic blocking.

[0106] For example, there are two ways to obtain the target advancement plan through dual process blockage detection. The first is a full topology depth-first traversal serial detection. Starting from the starting node of the process topology, a depth-first search algorithm combined with a recursive stack is used to traverse all stage nodes, identify loop paths segment by segment and determine the loop exit attributes, and verify the reachability of the inbound edges of each necessary stage to complete a full static process blockage risk screening. After the static detection is completed, a breadth-first search algorithm is used to traverse all reachable paths of the current instance, and the necessary stage skipping risk and parallel group blocking risk of each candidate path are verified to complete the runtime dynamic detection. After both types of detection are completed, all risk markers are summarized and compliant paths are selected to obtain the target advancement plan. This method uses the execution logic of full topology depth traversal and path-by-path serial verification, covering all nodes of the process and all reachable paths, with comprehensive and thorough detection, and can accurately identify hidden structural process blockage and dynamic blockage risks.

[0107] The second method is local path incremental parallel targeted detection. It first locates the source and target stages corresponding to candidate advancement schemes, extracts local topological fragments between these two points as the detection range, and avoids scanning the entire topology. It simultaneously initiates parallel processing of static and runtime detection. In the static dimension, it performs circular dependency identification and reachability verification of necessary nodes on the local topological fragments. In the runtime dimension, it performs necessary stage skipping analysis and parallel group blocking determination on the candidate paths. After both types of detection are completed in parallel, the detection results are simultaneously fused, and risky paths are marked. After removing risky paths, the target advancement scheme is directly obtained. This method employs the execution logic of local topology targeted extraction and static / dynamic dual-dimensional parallel detection. By narrowing the detection range, it reduces the number of invalid traversals, improves detection speed through dual-dimensional parallel processing, and reduces the performance overhead of runtime verification.

[0108] Further, please refer to Figure 5 , Figure 5This is a flowchart of the dual-process blocking detection process in this application. Based on the dual-process blocking detection mechanism combining static analysis and runtime detection, the left side represents the static analysis (SA) design-phase detection process, which sequentially executes the following steps: loading the process definition, constructing the directed topology graph of the process, traversing and detecting loops using depth-first search (DFS), checking if the loop has an exit point, detecting parallel outgoing edge conflicts using breadth-first search (BFS), checking the reachability of necessary stages, and finally outputting a complete static analysis report. The right side represents the runtime detection (RTD) execution-phase detection process, which sequentially executes the following steps: receiving process advancement requests, obtaining the list of sub-instances for the current stage, verifying the completion degree of sub-instances, calculating the reachable set from the source stage to the target stage, detecting whether the advancement path skips necessary stages, detecting whether there is parallel blocking in the target stage, and finally returning the runtime detection result. The mechanism uniformly defines six types of process blocking: Cyclic Dependency, Parallel Deadlock, Unreachable Required Stage, Uncompleted SubInstances, Skipped Required Stage, and TargetBlockedByParallel. During actual process blocking verification, the system first uses the process definition topology data corresponding to the candidate advancement scheme and the snapshot of the process instance's running state to split the static structure verification dimension and the runtime state verification dimension, generating a two-dimensional blocking detection dataset. Then, it performs cyclic dependency exit judgment and required stage reachability verification on the process topology within the dataset to obtain the static structure blocking detection result. Subsequently, combining the static structure blocking detection result with the runtime state snapshot, it performs required stage skip verification and parallel group target blocking judgment to obtain the runtime dynamic process blocking risk detection result. Finally, it merges the two types of detection results, eliminates transfer paths with arbitrary process blocking risks, retains all compliant flow paths, and encapsulates them into a target advancement scheme.

[0109] Sixth Embodiment This embodiment provides an exemplary scheme for the construction and full lifecycle management of concurrent sub-instances. In this example, the parallel identifier and nesting prohibition attribute of the target stage are first extracted based on the target advancement plan. Then, nested concurrency compliance verification is performed at the process instance concurrency level to generate a sub-instance creation permission determination. Next, for scenarios where the permission is granted, sub-instance entities are constructed in batches according to the concurrency configuration parameters of the target stage, and an initial set of concurrent sub-instances is obtained. Subsequently, five-state lifecycle transition rules, batch management interfaces, and aggregation calculation logic are attached to the initial set, and a nested concurrency interception mechanism is enabled to generate a running sub-instance cluster. Finally, the process instance is driven to transition to the target stage to complete the initial deployment of the parallel stage and the start of the full lifecycle management of concurrent sub-instances. Step S40 includes steps E11~E14: Step E11: Based on the target advancement plan, determine the parallel identifier and nesting prohibition attribute of the target stage, perform nested concurrency compliance verification in combination with the concurrency level of the process instance, and generate a sub-instance creation permission determination.

[0110] Step E12: When the sub-instance creation permission determination is passed, sub-instance entities are constructed in batches according to the concurrency configuration parameters of the target stage, and an initial state concurrent sub-instance set is obtained.

[0111] Step E13: Attach the five-state lifecycle transition rules, batch state management interface and aggregate state calculation logic to the initial state concurrent sub-instance set, enable the nested concurrency interception mechanism, and generate a running state sub-instance cluster.

[0112] Step E14: Drive the process instance to the target stage and update the global process running status and sub-instance aggregate status snapshot to complete the initial deployment of the parallel stage and the start of the full lifecycle management of the concurrent sub-instances.

[0113] The parallelism flag is a core attribute that marks whether the target stage enables multi-sub-instance parallel execution mode, used to trigger the engine's concurrent sub-instance creation logic. Examples include parallel countersigning flags, parallel review flags, and multi-role parallel processing flags. The nesting prohibition attribute is a constraint attribute that marks whether the parallel stage allows internal sub-processes to be initiated again or nested concurrency, used to prevent the risk of infinite recursion. Examples include prohibiting nested sub-processes, prohibiting second-level concurrency, and prohibiting sub-process recursion. Nested concurrency compliance verification is a pre-verification action that checks whether the current concurrency level complies with the nesting prohibition constraint; it is a compliance interception gate before sub-instance creation. Sub-instance creation permission determination is the final judgment output after the nested concurrency compliance verification is completed, determining whether the creation of concurrent sub-instances is allowed.

[0114] Concurrency configuration parameters are a set of configurations describing the rules for generating, allocating, and establishing initial states of sub-instances during the parallel phase. They are the core basis for batch building of sub-instances. Examples include sub-instance quantity parameters, processing scope parameters, initial state configuration, and state transition constraint parameters. The initial state concurrent sub-instance set is a set of sub-instances that have completed entity construction and initial state settings but have not yet started lifecycle management; it is the basic carrier for subsequently attaching management rules. The five-state lifecycle transition rules are a set of rules defining the transition conditions and triggering actions for five types of sub-instance states: pending, processing, completed, rolled back, and canceled. They are the core principles for sub-instance state management. The batch state management interface is a standardized calling interface that supports batch state updates, batch cancellations, and batch locking operations on the sub-instance set. The aggregated state calculation logic is a set of calculation rules used to statistically analyze the overall completion rate of the sub-instance set, the proportion of abnormal states, and the identification of rolled-back states, providing an aggregate basis for process advancement decisions. The nested concurrency interception mechanism is a runtime protection mechanism that intercepts nested sub-process requests within the concurrent phase in real time, dynamically mitigating recursion risks. The running sub-instance cluster is a collection of concurrent sub-instances that have complete management rules and full lifecycle management capabilities. It is the core unit for business execution during the parallel phase.

[0115] In this example, when performing nested concurrency compliance checks to generate permission for creating child instances, the process can be performed by comparing the level counts. First, the concurrent level count of the current process instance is read, then the nesting prohibition attribute of the target stage is extracted, and the two are compared to output the judgment result. Alternatively, a process link backtracking check can be used. The complete execution link of the current process instance from startup to the current stage is traced back, and the existing parallel stage levels in the link are checked one by one. The nesting prohibition rule of the target stage is then used to determine whether adding a new child instance is allowed, thus completing the nested concurrency compliance check.

[0116] After the sub-instance creation permission check is completed, if the check passes, the batch construction process of concurrent sub-instances is initiated. The concurrent configuration parameters and process instance context information of the target stage are extracted, and the sub-instance generation scale, association binding rules, and initial state baseline are parsed to obtain them. Sub-instance entities are generated in batches according to a unified data structure with generic constraints, and state initialization is completed, resulting in an initial set of concurrent sub-instances. Next, five-state lifecycle transition rules, batch state control interfaces, and aggregate state calculation logic are attached to the initial state set. A nested concurrency interception mechanism is enabled to generate a running sub-instance cluster with complete control capabilities. Finally, the process instances are driven to the target stage, and the global process running state and sub-instance aggregate state snapshots are updated synchronously, completing the initial deployment of the parallel stage and the initiation of full lifecycle control. This layered mechanism of pre-nested verification, standardized batch construction, and full-link control attachment improves the construction efficiency and operational stability of concurrent sub-instances, avoiding process anomalies caused by nested recursion and lack of state control.

[0117] For example, there are two ways to construct sub-instances and initiate full lifecycle management through concurrent configuration parameters. The first is a standardized construction management driven by preset configuration. A fixed number of sub-instances, a list of processing entities, and standard five-state transition rules are pre-configured at the target stage. Once the sub-instance creation permission is approved, the corresponding number of sub-instance entities are directly generated in batches according to the preset configuration. After being uniformly initialized to a pending state, standard lifecycle management rules and aggregation calculation logic are attached, and the driving process jumps to the target stage to initiate standardized management. This method uses batch generation with fixed configuration mapping and execution logic with standard rule attachment. The pre-defined preset configuration ensures the uniformity and stability of the management logic, eliminating the need for dynamic calculation at runtime.

[0118] The second approach is elastic construction and control based on dynamic business adaptation. It first reads the business data scale of the current process instance, the total number of processing entities with the required operating permissions, and the current system load. Based on a dynamic scheduling algorithm, it calculates the optimal number of sub-instances and the processing entity allocation strategy for this parallel phase, elastically generating the corresponding number of sub-instance entities. Differentiated state transition rules and permission constraints are then attached to different sub-instances. Simultaneously, it supports dynamic adjustment of the number and allocation relationships of sub-instances at runtime, driving elastic full lifecycle control after process jumps. This method employs business load-aware elastic generation and differentiated rule attachment execution logic. By dynamically adapting to business scenarios and adjusting the concurrency scale, it does not rely on fixed preset configurations, improving resource utilization and scenario adaptability for parallel business.

[0119] Further, please refer to Figure 6 , Figure 6This is a diagram of the five-state lifecycle model for concurrent sub-instances in this application. Based on the five-state lifecycle model for concurrent sub-instances, the full lifecycle management mechanism for the parallel phase is implemented. The state transition of a sub-instance begins at the start node, enters the Pending state after the creation action, which means waiting to be picked up. The Pending state then transitions to the InProgress state after the start processing action, which means it is being processed. The InProgress state has three downstream transition branches: first, after the processing is completed, it transitions to the Completed state, which means it is completed; second, after the modification action is returned, it transitions to the Returned state, which means it can be resubmitted, and in the Returned state, it can be canceled and resubmitted to return to the InProgress state, forming a closed-loop transition path of rollback and resubmission; third, it can directly jump to the Cancelled state, which means it is canceled. During the actual deployment of the parallel phase, the system first determines the parallel identifier and nesting prohibition attribute of the target phase based on the target advancement plan. Combined with the concurrency level of the process instance, it performs nested concurrency compliance verification to generate a sub-instance creation permission determination. When the sub-instance creation permission determination passes, it batch-builds sub-instance entities according to the concurrency configuration parameters of the target phase and uniformly initializes them to a pending state, obtaining an initial set of concurrent sub-instances. Then, it attaches the aforementioned five-state lifecycle transition rules, batch state management interface, and aggregated state calculation logic to this initial set of concurrent sub-instances, enabling a nested concurrency interception mechanism to generate a running sub-instance cluster. Finally, it drives the process instance to flow to the target phase, synchronously updating the global process running state and sub-instance aggregated state snapshots to complete the initial deployment of the parallel phase and the initiation of full lifecycle management of concurrent sub-instances.

[0120] Seventh Embodiment This embodiment provides an exemplary scheme for batch construction of concurrent sub-instances and generation of an initial state set. In this example, firstly, assuming the sub-instance creation permission is approved, the sub-instance generation scale, binding rules, and initial state baseline are determined by combining the concurrent configuration parameters of the target stage and the process instance context information, forming a batch construction parameter set for sub-instances. Then, sub-instance entities are batch constructed according to a unified data structure with generic constraints, and globally unique identifiers are assigned to obtain an initial sub-instance entity set. Subsequently, a two-way binding relationship is established between sub-instances and their respective process instances and target stages to obtain a cluster of sub-instances whose initial states are to be set. Finally, unified state initialization and anchoring are executed to set all sub-instances to a pending state, resulting in the initial state concurrent sub-instance set. Please refer to... Figure 7 , Figure 7 This is a flowchart illustrating the seventh embodiment of the control method for the generic workflow engine of this application. Step E12 includes steps F11 to F14: Step F11: When the sub-instance creation permission determination is passed, the sub-instance generation scale, association binding rules and initial state baseline are determined according to the concurrent configuration parameters of the target stage and the process instance context information, and the sub-instance batch construction parameter set is obtained.

[0121] Step F12: Construct parameter sets in batches based on the sub-instances, construct the sub-instance entities in batches according to the unified data structure of generic constraints, and assign globally unique identifiers to the sub-instance entities to obtain the initial set of sub-instance entities.

[0122] Step F13: Establish a two-way binding relationship between the initial set of sub-instance entities, the process instance, and the target stage to obtain the initial state of the sub-instance cluster to be set.

[0123] Step F14: Perform unified state initialization and anchoring on the initial state of the sub-instance cluster to be set, initialize all sub-instance states to be processed, and obtain the initial state concurrent sub-instance set.

[0124] The batch sub-instance construction parameter set is a standardized set of construction parameters that integrates the number of sub-instances generated, association binding rules, and initial state configuration. It serves as the core input for batch generating sub-instance entities. Examples include the number of sub-instances, processing entity allocation rules, process instance binding rules, stage affiliation rules, and default value configurations for the initial state. The unified data structure of generic constraints is a sub-instance entity data structure based on generic parameters, with unified field specifications, ensuring structural consistency and compiler type safety for all sub-instances. A globally unique identifier is a globally unique identity code assigned to each sub-instance, used for precise sub-instance location, state updates, and association queries. The initial sub-instance entity set is the set of sub-instance entities that have completed entity structure creation and identifier allocation but have not yet established association bindings.

[0125] Two-way binding is a bidirectional association mapping established between a sub-instance and its associated process instance and target stage, enabling indexing of all sub-instances from the process perspective and tracing back to their respective processes and stages from the sub-instance perspective. The initial state of the sub-instance cluster to be set is a set of sub-instances that have completed association binding but have not yet undergone state initialization. State initialization anchoring is a standardized operation that uniformly sets the initial state of sub-instances to a baseline state, ensuring that the initial states of parallel sub-instances are completely consistent.

[0126] In this example, when determining the batch construction parameter set for sub-instances, it can be done by directly reading the preset configuration. After the sub-instance creation permission is approved, the pre-configured concurrency parameters of the target stage are read directly, and the sub-instance generation scale, binding rules, and initial state baseline are extracted and combined to form the batch construction parameter set for sub-instances. Alternatively, it can be done through dynamic calculation in the context, combining the business data volume of the current process instance, the number of authorized processing entities, and the system load status to dynamically calculate the optimal sub-instance generation scale and allocation rules, and combine them with the default initial state baseline to generate the batch construction parameter set for sub-instances, thereby adapting to the differentiated concurrency requirements of different business scenarios.

[0127] After obtaining the parameter set for batch construction of sub-instances, the batch construction process for sub-instances is initiated. Sub-instance entities are generated in batches according to a unified data structure based on generic constraints. Each sub-instance is assigned a globally unique identifier, resulting in an initial set of sub-instance entities. Next, a two-way binding relationship is established between all sub-instances and their respective process instances and target stages, forming a cluster of sub-instances in an initial state to be set. Finally, a unified state initialization anchor is performed on all sub-instances within the cluster, setting the state of all sub-instances to pending processing, resulting in an initial set of concurrent sub-instances. This mechanism, through unified parameter set management, structured batch generation, and two-way binding, ensures the standardization and consistency of sub-instance construction, avoiding subsequent management anomalies caused by heterogeneous sub-instance structures and missing relationships.

[0128] For example, there are two ways to obtain the initial state concurrent sub-instance set by batch building parameter sets of sub-instances. The first is single-threaded serial batch building. According to the numerical value of the sub-instance generation scale, starting from the first sub-instance, entity creation, identifier allocation, association binding, and state initialization are executed sequentially. The construction process of the next sub-instance is started only after the full construction process of each sub-instance is completed. After all sub-instances have been built, they are uniformly collected to form the initial state concurrent sub-instance set. This method adopts the execution logic of sequential full-process construction and final collection of each instance. The construction process of each sub-instance is independent and complete, the state consistency is high, and it is not easy to have binding omissions or identifier conflicts.

[0129] The second approach involves multi-instance parallel batch construction. First, it splits the sub-instances into an equal number of construction tasks based on their generation scale. All construction tasks are independent of each other, and multiple tasks are simultaneously launched to execute entity creation and globally unique identifier allocation, resulting in a batch of initial sub-instance entities. Then, it batches all sub-instances with process instances and target stages for bidirectional binding operations. After binding is complete, it uniformly performs state initialization and anchoring of all quantum instances, setting the state of all sub-instances to pending processing at once, and finally aggregating them to obtain the initial state concurrent sub-instance set. This method employs a task-splitting parallel construction and batch unified operation execution logic. Parallel processing improves the construction efficiency of a large number of sub-instances, while unified batch operations ensure the consistency of binding relationships and initial states.

[0130] Furthermore, after the sub-instance creation permission is approved, a standardized batch construction process for concurrent sub-instances is executed. First, the concurrency configuration parameters of the target stage and the process instance context information are combined to parse and determine the sub-instance generation scale, association binding rules, and initial state baseline, integrating them to form the SubInstanceBatch Construction Parameter Set (SBCPS). Then, based on this parameter set, sub-instance entities are constructed in batches using a Generic Constrained Unified Data Structure (GCUDS), following generic constraints. Each sub-instance entity is assigned a globally unique identifier (GUID), and the resulting sets are aggregated to obtain the Initial SubInstance Entity Set (ISIES). Subsequently, a bidirectional binding relationship (BBR) is established between the initial set of sub-instance entities and their respective process instances and target stages, generating a sub-instance cluster to be set in the initial state; finally, a unified state initialization anchoring (SIA) is performed on the sub-instance cluster to initialize the state of all sub-instances to be processed, resulting in the initial state concurrent sub-instance set (ICSS).

[0131] Eighth embodiment This embodiment provides an exemplary scheme for stage transition implementation and process advancement execution result generation. In this example, the process instance is first driven to complete the state transition from the current stage to the target stage. Simultaneously, the concurrent sub-instance lifecycle management mechanism and nested concurrent interception logic are activated to generate a running process instance with the stage transition completed. Then, based on the real-time status data of the concurrent sub-instances under the running instance, the completion degree aggregation calculation and abnormal state identification are performed to obtain the sub-instance aggregated status dataset. Subsequently, the target stage transfer rules are matched according to the aggregated status dataset to filter out the automatic transfer paths and legal manual transfer options that meet the trigger conditions, generating a set of executable transition schemes. Finally, the process running status, sub-instance details, and transition schemes are integrated and encapsulated to obtain a standardized process advancement execution result. Step S50 includes steps G11~G14: Step G11: After the driving process instance completes the state transition from the current stage to the target stage, the lifecycle management mechanism and nested concurrency interception logic of the concurrent sub-instance are activated to generate a running process instance that has completed the stage transition.

[0132] Step G12: Based on the real-time status data of the concurrent sub-instances under the running process instance, perform completion aggregation calculation and rollback / cancellation abnormal status identification to obtain the sub-instance aggregated status dataset.

[0133] Step G13: Match the transfer rules of the target stage with the aggregated state dataset of the sub-instances, filter the automatic transfer paths and legal manual transfer options that meet the trigger conditions, and generate a set of executable transfer schemes.

[0134] Step G14: Organize and encapsulate the executable flow scheme, along with the process instance running status and concurrent sub-instance details, to obtain the process advancement execution result.

[0135] Running process instances are execution instances of processes after completing stage state transitions and activating full-scale control mechanisms. They are the core runtime carriers for subsequent state collection, rule matching, and result output. Examples include business process instances that have completed stage switching, parallel process instances that have activated five-state control for sub-instances, and process instances that have enabled nested interception protection. Real-time status data of concurrent sub-instances is real-time status slice data describing the current lifecycle state, processing progress, and associated information of a single concurrent sub-instance; it is the smallest data unit for aggregation calculations. Examples include the current status identifier of the sub-instance, its processing entity information, the latest status update timestamp, business processing result remarks, and explanations of abnormal status reasons. Completion aggregation calculation is an aggregation operation that calculates the proportion of each state and the overall execution progress for all concurrent sub-instances in the parallel stage, used to quantify the overall execution progress of the parallel stage. Examples include calculating the proportion of completed sub-instances, counting the number of sub-instances in processing, and calculating the overall progress percentage.

[0136] Anomaly state identification involves detecting and labeling two types of non-positive states—return and cancellation—in concurrent sub-instances. This provides a basis for determining abnormal branches in transition rule matching. Examples include locating returned sub-instances, statistically analyzing cancelled sub-instances, and classifying and labeling anomaly types. The sub-instance aggregated state dataset is a standardized aggregated result set integrating the overall completion rate of the parallel phase, details of each state's sub-instances, and anomaly state statistics. It serves as the core input for subsequent transition rule matching. The executable flow scheme set is a collection of all flow paths and operation options that can be normally triggered under the current process state after trigger condition verification. It covers both automatic triggering and manual operation. Examples include an automatic submission path for full completion, a manual resubmission option for return, a manual withdrawal operation, and an automatic jump path when conditions are met.

[0137] In this example, when the process instance completes its phase transition and generates a running process instance, it can be performed using an atomic transaction-based synchronous transition. This involves executing phase state changes, control mechanism activation, and interception logic activation within the same transaction unit, committing the transaction only after all actions are successful, thus ensuring consistency between the phase transition and control activation states. Alternatively, an event-driven asynchronous activation approach can be used. This involves first completing the process instance's phase state transition and committing the transaction, then asynchronously triggering the activation of the lifecycle control mechanism and nested concurrent interception logic via internal event messages. This reduces the synchronization time of phase transitions and improves the flow response speed in high-concurrency scenarios.

[0138] After constructing the running process instance, the sub-instance status aggregation process is initiated. This process collects real-time status data from all concurrent sub-instances under the running process instance, performs full completion aggregation calculations and rollback / cancellation of abnormal status identification, generating a sub-instance aggregated status dataset. Next, based on this aggregated status dataset, all transfer rules for the target stage are matched, and the triggering conditions for automatic transfers and the permission constraints for manual transfers are verified one by one. All automatic transfer paths and valid manual transfer options that meet the triggering conditions are selected, generating a set of executable transfer schemes. Finally, the executable transfer schemes, along with the running status of the process instance and details of concurrent sub-instances, are standardized, organized, and encapsulated to obtain the process execution results. This mechanism of layered aggregation, precise matching, and standardized encapsulation improves the completeness and usability of the process execution results, avoiding business operation anomalies caused by state asynchrony or missing transfer options.

[0139] For example, there are two ways to obtain the process execution result by matching aggregated state data with transition rules. The first is a full snapshot-style synchronous generation. After the stage jump is completed, all running state fields of the process instance, detailed data of all concurrent sub-instances, and all reachable transition rules are fully retrieved. After completing state aggregation and rule matching one by one, all information is completely encapsulated into a standardized execution result data package and synchronously returned to the caller. This method adopts the execution logic of full data collection and one-time complete encapsulation, and the returned result information is comprehensive and complete, which can be directly used as the state data source for the business side.

[0140] The second method is incremental event-driven asynchronous push. After a stage transition is completed, only the incremental state change, triggered business event types, and core executable operation list of the current flow are extracted and asynchronously pushed to the subscribed business systems in the form of event messages. The caller can retrieve the full details data as needed without synchronously transmitting the full process data. This method uses incremental data extraction and asynchronous event push execution logic, resulting in small data transmission volume and fast response speed, which can effectively reduce the performance overhead of the flow process.

[0141] Furthermore, based on the process of stage transition execution and result output, the process instance is first driven to complete the state transition from the current stage to the target stage, simultaneously activating the lifecycle management mechanism (LCMM) and nested concurrency interception logic (NCIL) of concurrent sub-instances, generating a running process instance (RPI) with the stage transition completed. Then, based on the real-time state data of concurrent sub-instances under the running process instance, completion aggregation calculation (CAC) and exception state identification (ESI) are performed to obtain a sub-instance aggregation state dataset (SASD). Subsequently, the transition rules of the target stage are matched according to the sub-instance aggregation state dataset, and automatic transition paths (ATP) and legal manual transition options (LMTO) that meet the trigger conditions are selected to generate an executable transition scheme set (ETSS). Finally, the set of executable flow schemes, along with the process instance running status and concurrent sub-instance details, are standardized, organized, and encapsulated to obtain the Process AdvanceExecution Result (PAER).

[0142] The generic workflow engine implements full lifecycle management of the process through seven core application programming interfaces (APIs): Get Initial Stage Code, Find MatchingTransitions (matching automatic type transition rules based on triggered actions), Validate Manual Advance, Requires Sub Instances (determining whether concurrent sub-instances need to be created in the current stage), CheckPermission (performing four-dimensional permission assessment), Check Advance Deadlock (runtime process blocking security check), and All Sub Instances Completed (a static method to determine whether all sub-instances have completed). Its typical call flow follows a standardized execution chain of creating an engine instance, matching transition rules, validating advancement validity, checking process blocking, and executing advancement. The blocking detection module encompasses three core algorithms. First, the circular dependency detection uses a Tarjan Variant Algorithm (TVA) combining Depth-First Search (DFS) with a recursive stack. By maintaining a globally visited set and the current recursive path node set, it performs a depth-first traversal, identifies cycles, and checks for outgoing edges pointing to the outside. This distinguishes between benign loops with exit points and blocking loops without exit points, preventing normal backtracking from being misjudged as blocking. Second, the parallel blocking detection algorithm first identifies all stages where the parallel flag (IsParallel) is true, then uses Breadth-First Search (BFS) to... The search function expands to obtain the set of successor targets of the parallel stage, and then verifies whether the incoming edges of each successor target contain independent paths that are not in the parallel stage, thereby identifying and issuing edge conflict risks. The third function is to detect the skipping of the necessary stage during runtime. It calculates the set of reachable stages of the source stage and the target stage respectively through breadth-first search, locates the stage whose necessary flag (IsRequired) is true and is in the source reachable set but not in the target reachable set, and determines whether there is an illegal jump that skips the necessary stage by combining the node sorting.The permission evaluation module uses Recursive Descent Parsing (RDP) to parse the structured expression tree. When parsing the root node, it first checks whether it contains an operator field. If it does, it recursively evaluates the condition array using AND and OR operators. The AND operation uses a short-circuit evaluation strategy that returns if it is false, and the OR operation uses a short-circuit evaluation strategy that returns if it is true. If it does not contain an operator, it is a leaf condition node. It is then dispatched to the corresponding dimension evaluator according to the dimension field. Each dimension supports a different set of operators: the string dimension supports equal to (Eq, Equal) and not equal to (Neq, Not Equal); the array dimension supports equal to, not equal to, non-empty intersection (In), and empty intersection (NotIn); and the numeric dimension supports equal to, not equal to, greater than (Gt, GreaterThan), greater than or equal to (Gte, Greater Than or Equal), less than (Lt, Less Than), and less than or equal to (Lte, Less Than or Equal). Meanwhile, the engine has built-in eight process definition integrity verification rules, covering stage set non-empty checks, initial stage existence checks by taking the first one by sorting field, end stage existence checks by identifying no outgoing edge nodes, isolated stage detection by identifying no incoming edge nodes in non-initial stages, transfer rule reference validity checks for start and end stage existence verification, duplicate transfer rule detection by identifying same source, same target, and same triggering action, mandatory stage reachability checks, and static analysis verification with integrated blocking detectors, achieving full-dimensional compliance verification during the process definition design phase.

[0143] This application provides a generic workflow engine, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to execute the control method of the generic workflow engine in the first embodiment described above.

[0144] The following is for reference. Figure 8 The diagram illustrates a structure suitable for implementing a generic workflow engine in the embodiments of this application. The generic workflow engine in the embodiments of this application may include, but is not limited to, mobile terminals such as programmable logic controllers, CNC machining centers, CNC lathes, etc., and fixed terminals such as human-machine interface terminals, distributed control systems, etc. Figure 8 The generic workflow engine shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0145] like Figure 8As shown, the generic workflow engine may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the generic workflow engine. The processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the generic workflow engine to communicate wirelessly or wiredly with other devices to exchange data. Although a generic workflow engine with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented alternatively.

[0146] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0147] The generic workflow engine provided in this application, employing the control method of the generic workflow engine in the above embodiments, can solve the technical problem of poor business process efficiency. Compared with the prior art, the beneficial effects of the generic workflow engine provided in this application are the same as the beneficial effects of the control method of the generic workflow engine provided in the above embodiments, and other technical features in this generic workflow engine are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0148] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0150] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the control method of the generic workflow engine in the above embodiments.

[0151] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0152] The aforementioned computer-readable storage medium may be included in the generic workflow engine; or it may exist independently and not be assembled into the generic workflow engine.

[0153] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the generic workflow engine, the generic workflow engine: responds to the workflow engine's process advancement instructions, matches the target transition path based on the generic parameterized stage nodes and transition rule set, and determines the advancement context to be verified; if the permission expression bound to the advancement context to be verified passes the verification with the four-dimensional permission information associated with the process advancement instructions, it generates a advancement candidate scheme based on the advancement context to be verified; it performs static process structure analysis and runtime state dual process blocking detection on the advancement candidate scheme, eliminates invalid paths, and obtains the target advancement scheme; it determines the parallel attributes of the target stage based on the target advancement scheme, constructs concurrent sub-instances according to the parallel attributes, and starts the full lifecycle management of the concurrent sub-instances; based on the lifecycle management and the concurrent sub-instances, it obtains the process advancement execution result after completing the stage transition.

[0154] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0156] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0157] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the control method of the generic workflow engine described above, which can solve the technical problem of poor business process efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the control method of the generic workflow engine provided in the above embodiments, and will not be repeated here.

[0158] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A control method for a generic workflow engine, characterized in that, The method includes: In response to the process advancement instructions of the generic workflow engine, based on the generic parameterized stage nodes and transition rule set, the target transition path is matched and the advancement context to be verified is determined. If the permission expression bound to the progress context to be verified passes the verification of the four-dimensional permission information associated with the process progress instruction, a progress candidate scheme is generated based on the progress context to be verified. The candidate advancement schemes are subjected to both static process structure analysis and runtime state dual process blockage detection to eliminate invalid paths and obtain the target advancement scheme. Based on the target advancement plan, determine the parallel attributes of the target stage, construct concurrent sub-instances according to the parallel attributes, and initiate full lifecycle management of the concurrent sub-instances, including: based on the target advancement plan, determine the parallel identifier and nesting prohibition attribute of the target stage, perform nesting concurrency compliance verification in conjunction with the concurrency level of the process instance, and generate a sub-instance creation permission determination; when the sub-instance creation permission determination passes, determine the sub-instance generation scale, association binding rules, and initial state baseline according to the concurrency configuration parameters of the target stage and the process instance context information, and obtain a batch construction parameter set for sub-instances; based on the batch construction parameter set for sub-instances, construct sub-instance entities in batches according to a unified data structure of generic constraints, and assign globally unique values ​​to each sub-instance entity. The process is identified to obtain an initial set of sub-instance entities; a two-way binding relationship is established between the initial set of sub-instance entities and the process instance and the target stage to obtain a sub-instance cluster to be set in the initial state; a unified state initialization anchor is performed on the sub-instance cluster to be set in the initial state, and all sub-instance states are initialized to pending processing to obtain an initial set of concurrent sub-instances; five-state lifecycle transition rules, batch state management interfaces and aggregate state calculation logic are attached to the initial set of concurrent sub-instances, and a nested concurrency interception mechanism is enabled to generate a running sub-instance cluster; the process instance is driven to flow to the target stage, and the global process running state and sub-instance aggregate state snapshot are updated to complete the initial deployment of the parallel stage and the start of the full lifecycle management of the concurrent sub-instances; Based on the lifecycle management and the concurrent sub-instances, the process progress execution result is obtained after the phase transition is completed.

2. The control method for the generic workflow engine as described in claim 1, characterized in that, The steps for responding to the process advancement instructions of the generic workflow engine, matching the target transition path based on the generic parameterized stage nodes and transition rule set, and determining the advancement context to be verified include: Based on the business type and tenant identifier of the process advancement instruction, the process definition matching the priority, the corresponding generic parameterized stage node and the set of transition rules are loaded under the generic parameter constraints to generate a generic process running instance. Based on the trigger action identifier in the process advancement instruction, the generic process running instances are traversed, and the transfer rules corresponding to the trigger actions are matched according to the three types of transfer types: automatic, manual, and conditional, to obtain a preliminary set of candidate transfer paths. The conditional transfer paths in the preliminary candidate transfer path set are parsed, the guard condition expressions associated with the conditional transfer paths are determined, and the evaluation and verification are performed in combination with the process instance running data to filter and obtain the target transfer path. Integrate the current stage attributes, the target transfer path, and process instance information to generate the progress context to be verified.

3. The control method for the generic workflow engine as described in claim 1, characterized in that, If the permission expression bound to the progress context to be verified passes the verification of the four-dimensional permission information associated with the process progress instruction, the step of generating a progress candidate scheme based on the progress context to be verified includes: Based on the context to be verified, determine the four-dimensional permission information associated with the permission expression bound to the target transfer path and the process advancement instruction; The four-dimensional permission information associated with the permission expression bound to the target transfer path and the process advancement instruction is subjected to syntax validity verification and null value marking to generate a permission evaluation dataset with compliance identification. Based on the non-empty compliant permission expressions in the permission assessment dataset, dimensional recursive parsing and short-circuit Boolean verification are performed according to the nested Boolean operation rules to obtain the permission determination result of a single transfer path; Based on the permission determination results, all transfer paths that have passed permission verification and their corresponding target stage attribute information are filtered out to obtain the advancement candidate schemes that have passed permission verification.

4. The control method for the generic workflow engine as described in claim 3, characterized in that, The steps for obtaining the permission determination result of a single transfer path by performing dimensional recursive parsing and short-circuit Boolean verification based on the non-empty compliant permission expressions in the permission assessment dataset according to the nested Boolean operation rules include: Based on the non-empty compliant permission expressions in the permission assessment dataset, the nested Boolean structure is decomposed layer by layer using the recursive descent parsing method to construct a computation node tree that distinguishes between computation nodes and dimension condition leaf nodes. Based on the permission dimension attribute corresponding to each node in the operation node tree, the corresponding evaluation unit and operator set are matched to generate a dimension-level condition evaluation sequence sorted by the tree structure hierarchy. Based on the dimensional condition evaluation sequence, Boolean evaluation is performed from bottom to top along the operation node tree hierarchy, and the Boolean evaluation results are aggregated layer by layer to obtain the permission determination result of the single transfer path.

5. The control method for the generic workflow engine as described in claim 1, characterized in that, The steps of performing static process structure analysis and runtime state dual process blockage detection on the candidate advancement schemes to eliminate invalid paths and obtain the target advancement scheme include: Based on the process definition topology data and process instance running status snapshots corresponding to the proposed advancement schemes, the static structure verification dimension and the running status verification dimension are split to obtain a two-dimensional blocking detection dataset. The process topology of the two-dimensional blocking detection dataset is subjected to cyclic dependency exit determination and mandatory stage reachability verification to obtain static structure blocking detection results; Based on the static structure blocking detection results and runtime state snapshots, the necessary stage skip verification and parallel group target blocking determination are performed to obtain the dynamic process blocking risk detection results during runtime. By integrating the static structure blockage detection results and the dynamic process blockage risk detection results, transfer paths with arbitrary process blockage risks are eliminated, compliant transfer paths are retained, and they are encapsulated to form the target advancement plan.

6. The control method for the generic workflow engine as described in claim 1, characterized in that, The steps for obtaining the process progress execution result after completing the phase transition based on the lifecycle management and the concurrent sub-instances include: After the driving process instance completes the state transition from the current stage to the target stage, the lifecycle management mechanism and nested concurrency interception logic of the concurrent sub-instance are activated to generate a running process instance that has completed the stage transition. Based on the real-time status data of the concurrent sub-instances under the running process instance, the completion degree aggregation calculation and the identification of rollback and cancellation abnormal states are performed to obtain the sub-instance aggregated status dataset; Based on the aggregated state dataset of the sub-instances, the transfer rules of the target stage are matched, and automatic transfer paths and legal manual transfer options that meet the triggering conditions are filtered to generate a set of executable transfer schemes. The executable workflow scheme, along with the process instance running status and concurrent sub-instance details, are organized and encapsulated to obtain the process advancement execution result.

7. A generic workflow engine, characterized in that, The generic workflow engine includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for the generic workflow engine as described in any one of claims 1 to 6.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the control method of the generic workflow engine as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Financial expense calculation engine method based on generic implementation

    CN115222502A

  • Security verification control method and system based on workflow and task scene dynamic binding and storage medium

    CN121638848A