A method, device, medium and equipment for scheduling process engine trigger tasks

Through the trigger task orchestration method of the process engine, the problem of insufficient event subscription management and multi-condition combination orchestration capabilities in the existing technology is solved, and more powerful asynchronous task configuration capabilities are achieved.

CN117632416BActive Publication Date: 2025-04-15CHINA ELECTRONICS INVESTMENT HLDG LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311586438.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-04-15
Estimated Expiration
2043-11-27

AI Technical Summary

Technical Problem

In the prior art, the event subscription management support for process and branch conditions is insufficient, the ability to combine and orchestrate multiple conditions and actions is insufficient, and the ability to configure asynchronous tasks is weak.

Method used

A trigger task orchestration method is provided through the process engine, including subscribing to the trigger event through the front-end visual interface according to the event type of the task, selecting the trigger's trigger conditions, and triggering the dispatch to execute the task according to the trigger conditions according to the trigger event.

Benefits of technology

It realizes the improvement of event subscription management of process and branch conditions, supports the combination and orchestration of multiple conditions and actions, and enhances the ability to configure asynchronous tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632416B_ABST
    Figure CN117632416B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, medium and equipment for scheduling a process engine trigger task. The task scheduling method includes: subscribing to a trigger event through a front-end visual interface according to the event type of the task, wherein the event type includes a node event, a branch event and a process event; selecting a trigger condition of the trigger according to the trigger event; and triggering and scheduling the trigger event according to the trigger condition according to the task. In the embodiment of the present invention, different types of event definitions such as process events, branch events and node events are introduced, so that the trigger can subscribe to multiple events as needed, and each trigger event can be configured with a trigger condition separately, which solves the technical problems of insufficient support for event subscription management of processes and branch conditions and insufficient ability to combine and schedule multiple conditions and actions in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, medium and equipment for scheduling process engine trigger tasks. Background Art

[0002] Trigger task scheduling configuration is mainly used in the fields of Internet of Things, big data processing and automated operation platform to improve the usability of trigger event subscription and the scalability of task scheduling. Traditional trigger configuration is mainly aimed at the integration of rule engines, aiming to solve event triggering in office approval scenarios.

[0003] The existing technical solutions for task scheduling and configuration only solve the form processing during process operation. The scheduling capability for task execution is mainly reflected in the configuration of single conditions and actions. It can be seen that the existing technical solutions have technical problems such as insufficient support for event subscription management of processes and branch conditions, insufficient combination scheduling capabilities for multiple conditions and actions, and weak asynchronous task configuration capabilities. Summary of the invention

[0004] In view of this, the purpose of the embodiments of the present invention is to provide a method, device, medium and equipment for process engine trigger task orchestration to solve the technical problems in the prior art of insufficient support for event subscription management of processes and branch conditions and insufficient ability to orchestrate the combination of multiple conditions and actions.

[0005] To achieve the above-mentioned purpose, in a first aspect, an embodiment of the present invention provides a method for scheduling a process engine trigger task, the method comprising:

[0006] Subscribe to the trigger event of the trigger through the front-end visual interface according to the event type of the task, wherein the event type includes node event, branch event and process event;

[0007] Selecting a trigger condition of the trigger according to the trigger event;

[0008] The trigger is triggered and scheduled to execute the task according to the trigger event and the trigger condition.

[0009] In some possible implementations, the method further includes:

[0010] The trigger number is associated with the task number and persisted in the database.

[0011] In some possible implementations, the subscription trigger event includes:

[0012] During the running of the task, a trigger event is sent to the outside according to the node, branch or process of the task, and the trigger event carries the number, form data and context data of the task, and is associated with the number of the trigger in the database to trigger the execution of the trigger; wherein the trigger event includes:

[0013] Create a process: The trigger is triggered when the user creates a process;

[0014] End the process, when the process execution is completed, the process execution fails or the process is actively closed, the trigger is triggered;

[0015] Cancel process, when the user cancels the process, the trigger is triggered;

[0016] Suspend process, when the user suspends the process, the trigger is triggered;

[0017] Resume process: the trigger is triggered when the user resumes the suspended process.

[0018] In some possible implementations, the triggering condition includes: form field judgment, global context judgment, task execution result judgment, multiple conditions, or any one or more of multiple conditions and multiple conditions; wherein,

[0019] Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed;

[0020] Global context judgment refers to the context content of the configuration execution field. When the configuration execution field of the process meets the context content, the trigger is executed;

[0021] The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed;

[0022] Multi-conditional OR refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of OR to determine whether the trigger conditions are met; multi-conditional AND refers to configuring multiple judgment conditions in the conditional engine, and multiple judgment conditions are judged in the form of AND to determine whether the trigger conditions are met.

[0023] In a second aspect, an embodiment of the present invention further provides a device for scheduling process engine trigger tasks, the device comprising:

[0024] A trigger configuration module, used to subscribe to trigger events through a front-end visual interface according to the event type of the task, wherein the event type includes node events, branch events and process events;

[0025] A conditional rule engine module, used for selecting a trigger condition of the trigger according to the trigger event;

[0026] The task scheduling engine module is used to trigger and schedule the trigger to execute the task according to the trigger event and the trigger condition.

[0027] In some possible implementations, the device further includes:

[0028] The association module is used to associate the number of the trigger with the number of the task and persist them in the database.

[0029] In some possible implementations, the trigger configuration module is specifically used to:

[0030] During the running of the task, a trigger event is sent to the outside according to the node, branch or process of the task, and the trigger event carries the number, form data and context data of the task, and is associated with the number of the trigger in the database to trigger the execution of the trigger; wherein the trigger event includes:

[0031] Create a process: The trigger is triggered when the user creates a process;

[0032] End the process, when the process execution is completed, the process execution fails or the process is actively closed, the trigger is triggered;

[0033] Cancel process, when the user cancels the process, the trigger is triggered;

[0034] Suspend process, when the user suspends the process, the trigger is triggered;

[0035] Resume process: the trigger is triggered when the user resumes the suspended process.

[0036] In some possible implementations, the triggering conditions selected by the conditional rule engine module specifically include: form field judgment, global context judgment, task execution result judgment, multiple conditions, or any one or more of multiple conditions and; wherein,

[0037] Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed;

[0038] Global context judgment refers to the context content of the configuration execution field. When the configuration execution field of the process meets the context content, the trigger is executed;

[0039] The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed;

[0040] Multi-conditional OR refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of OR to determine whether the trigger conditions are met; multi-conditional AND refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of AND to determine whether the trigger conditions are met.

[0041] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the process engine trigger task scheduling methods described above.

[0042] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising:

[0043] processor;

[0044] a memory for storing instructions executable by the processor;

[0045] The processor is configured to execute the instructions to implement any one of the process engine trigger task scheduling methods.

[0046] The above technical solution has the following beneficial effects:

[0047] The present invention provides a method, device, medium and equipment for arranging tasks of a process engine trigger. The task arrangement method includes: subscribing to a trigger event through a front-end visual interface according to the event type of the task, wherein the event type includes a node event, a branch event and a process event; selecting a trigger condition of the trigger according to the trigger event; and triggering a scheduling trigger to execute the task according to the trigger condition according to the trigger event. In the embodiment of the present invention, different types of event definitions such as process events, branch events and node events are introduced, so that the trigger can subscribe to multiple events as needed, and each trigger event can be configured with a trigger condition separately, which solves the technical problems of insufficient support for event subscription management of processes and branch conditions and insufficient ability to choreograph the combination of multiple conditions and actions in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. It is obvious that the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 It is a flow chart of a method for scheduling process engine trigger tasks according to an embodiment of the present invention;

[0050] Figure 2It is an architectural diagram of a process engine trigger task arrangement according to an embodiment of the present invention;

[0051] Figure 3 is a flow diagram of a configuration node trigger according to an embodiment of the present invention;

[0052] Figure 4 is a flow diagram of configuring a branch trigger according to an embodiment of the present invention;

[0053] Figure 5 This is a flow diagram of the configuration process trigger of an embodiment of the present invention.

[0054] Figure 6 It is a structural block diagram of a device for scheduling tasks of a process engine trigger according to an embodiment of the present invention;

[0055] Figure 7 It is a structural block diagram of another device for scheduling task of process engine trigger according to an embodiment of the present invention;

[0056] Figure 8 is a functional block diagram of a computer-readable storage medium according to an embodiment of the present invention;

[0057] Fig. 9 It is a functional block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Embodiment 1

[0060] Figure 1 is a flow chart of a method for scheduling task of a process engine trigger according to an embodiment of the present invention. Figure 1 As shown, the task scheduling method includes the following steps:

[0061] Step S11, subscribing to the trigger event of the trigger through the front-end visual interface according to the event type of the task, wherein the event type includes node event, branch event and process event.

[0062] Step S12: selecting a trigger condition of a trigger according to the trigger event.

[0063] Step S13, triggering a scheduling trigger to execute a task according to a triggering event and a triggering condition.

[0064] Figure 2is an architecture diagram of a process engine trigger task arrangement according to an embodiment of the present invention, such as Figure 2 As shown, in this embodiment, the task scheduling includes the following steps:

[0065] S1, trigger configuration: the process configuration personnel configure the trigger in advance, select the configured trigger according to the event type, configure the node trigger for the node event, configure the branch trigger for the branch event, and configure the process trigger for the process event;

[0066] S2, trigger condition configuration: Each trigger has a corresponding trigger condition, which can be configured through the conditional rule engine, such as form field judgment, global context judgment, task execution result judgment, multiple conditions or and multiple conditions and.

[0067] S3, execute task scheduling: When the process is initiated externally, the event type of the task can be determined by the event scheduler. The task scheduling engine schedules the configured trigger according to the event type to execute the task according to the triggering conditions.

[0068] In this embodiment, each task will be configured with multiple nodes, and each node will be packaged as a different event type according to the processing of specific tasks. There will be connections between nodes, and each connection will be associated with a branch condition. The process event will associate the trigger with the node, the process itself, and the branch to trigger it. During the task running process, it will be executed in this defined order.

[0069] Figure 3 is a flow diagram of the configuration node trigger of an embodiment of the present invention, such as Figure 2 and Figure 3 As shown, in this embodiment, the node event can configure the node trigger, by configuring the process, selecting the process node, and then configuring the node trigger, that is, the trigger configured in the process node, will be triggered when the process flows to the corresponding process node. A process node can be configured with multiple trigger events, and each trigger event can be executed independently according to the trigger conditions configured by itself. Specifically, the trigger event can be, but is not limited to, as follows:

[0070] The trigger event is the entry node: when the process flows to the corresponding node in the node event, the trigger of the node is triggered;

[0071] The trigger event is leaving the node: the process flows to the corresponding node in the node event and the task is successfully executed through the node. The trigger is triggered when the process leaves the current node and is about to flow to the next node;

[0072] The trigger event is the dispatch node: the trigger is triggered when the process flows to the corresponding node in the node event and the "dispatcher" of the node completes the action of dispatching the node.

[0073] Figure 4 is a flow chart of configuring a branch trigger according to an embodiment of the present invention, such as Figure 2 and Figure 4 As shown, branch events can configure branch triggers by configuring the process, selecting the process branch, and then configuring the branch trigger, that is, configuring the trigger event in the process line. For example, the trigger event is entering the branch, and the process will be triggered only when it flows to the corresponding process branch.

[0074] Figure 5 is a flow chart of the configuration process trigger of an embodiment of the present invention, such as Figure 2 and Figure 5 As shown, process events can configure process triggers. By configuring the process, you can configure process triggers, that is, triggers configured in the process, which will be triggered only when the process performs a certain operation.

[0075] Multiple trigger events can be configured in the process event. Each trigger can be executed independently according to its configured trigger conditions. The trigger events can be, but are not limited to, the following:

[0076] The trigger event is the creation of a process: the trigger is triggered when the user creates a process;

[0077] The trigger event is the end of the process: the trigger is triggered when the process execution is completed, failed, or actively closed;

[0078] The trigger event is the cancellation process: the trigger is triggered when the user cancels the process;

[0079] The trigger event is suspending the process: the trigger is triggered when the user suspends the process;

[0080] The trigger event is the resume process: the trigger is triggered when the user resumes the suspended process.

[0081] In this embodiment, different types of event definitions such as process events, branch events, and node events are introduced in the process of trigger event subscription management, so that the trigger can subscribe to multiple events as needed.

[0082] In this embodiment, after subscribing to the trigger event of the trigger in step S11, in step S12, the trigger condition of the trigger will be managed through the conditional rule engine, which is referred to as condition management. Condition management specifically refers to using rule judgment and context parameters as condition configuration. After the configuration is completed, the condition configuration will be converted into a string expression and persisted in the database. When the process runs to the specified node, an event will be issued. At this time, a rule judgment will be made based on the data of the current node, the context parameters of the process, etc. before the specific action is executed.

[0083] The conditional rule engine is mainly used to configure trigger conditions, parameter parsing of trigger conditions, and execution of trigger condition rules. Through the conditional rule engine, condition groups can be set to implement the judgment of multiple conditions, multiple condition expressions can be associated with each condition, and the trigger conditions can be classified to realize the dynamic trigger mechanism under complex conditions. In this embodiment, the trigger conditions can include: form field judgment, global context judgment, task execution result judgment, multiple conditions, or, and multiple conditions, and any one or more of them, specifically:

[0084] Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed;

[0085] Global context judgment refers to the context content of the configuration execution field. When the configuration execution field of the process meets the context content, the trigger is executed;

[0086] The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed;

[0087] Multiple conditions or refers to configuring multiple judgment conditions in the conditional rule engine. Multiple judgment conditions are judged in the form of or to determine whether the trigger conditions are met; trigger condition is multiple conditions and: configuring multiple judgment conditions in the conditional rule engine. Multiple judgment conditions are judged in the form of and to determine whether the trigger conditions are met, that is, the trigger is executed when all conditions are met.

[0088] In this embodiment, different conditional expressions are executed and parameter parsing is completed according to different trigger conditions. Each trigger condition rule corresponds to a conditional expression. All trigger conditions are traversed according to the conditional calculation expression. When the conditional calculation expression returns true, it means that the rule is hit, that is, the trigger is triggered to execute. Returning false indicates that the rule fails, and the trigger is not triggered at this time. The conditional calculation expression may include: contains, equals, equals (ignore case), regular match, does not contain, is not empty, starts with a set value, ends with a set value, is not equal to, is not within the value, etc.

[0089] In this embodiment, a task scheduling strategy based on multi-condition combination and concurrency is adopted, allowing users to customize the conditions for task triggering and the execution order, supporting multiple conditions and / or, and supporting serial and parallel execution of multiple tasks.

[0090] In addition, in step S13, when the user initiates a task, the event scheduler can determine the type of the task, such as whether the task is a node event, a branch event, or a process event. Then, the task scheduling engine will perform task scheduling according to the event type. Figure 2 As shown in S3, the execution of task scheduling mainly includes:

[0091] Task parsing: It can also be called parameter parsing. Parameter parsing includes task request parameter parsing and task context parameter parsing. Task request parameter parsing refers to parsing the task name and task number according to the parameters in the task definition by matching the process form data, and filling them into the task request parameters; task context parameter parsing refers to injecting the task upper and lower parameters into the process context data, such as the node names contained in the process, the process number, the process information, the current operator, and the process global variable information.

[0092] Resource allocation: In this embodiment, tasks are scheduled to different work nodes according to their priorities to meet the isolation control of tasks. Some tasks require quick response, while some tasks require long execution. In order to ensure that high-priority tasks are executed quickly and without backlog, a task priority scheduling algorithm is designed. For example, two message queues (e.g., task_high_priority and task_default_priority) can be designed to receive task messages and execute tasks;

[0093] Synchronous execution and asynchronous execution: This embodiment adopts a task scheduling strategy based on multi-condition combination and concurrency, allowing users to customize the conditions for task triggering and the execution order, supporting multiple conditions and / or, and supporting synchronous execution (parallel execution) and asynchronous execution (serial execution) of multiple tasks;

[0094] Task polling and failure compensation: In this embodiment, the execution results can be associated with the process nodes, providing synchronous and asynchronous task execution capabilities, capturing task exceptions, completing task retries through polling configuration, and recording the results of task failures. System administrators can query failure records for manual execution and complete task compensation.

[0095] The embodiment of the present invention allows to execute tasks cyclically according to specific conditions during the task execution process, thereby realizing more complex process control. At the same time, a context management mechanism is introduced for the trigger, so that the task execution result can be conveniently associated with the conditions of the subsequent tasks, thereby realizing more precise triggering conditions.

[0096] For example, in a certain industrial IoT temperature control scenario, a task pipeline for a temperature sensor is configured, which mainly includes three nodes: sensor parameter parsing, preprocessing, and data storage. During the configuration process, a process trigger is configured. The process trigger triggers the task according to multiple conditions such as sensor temperature, season, and device threshold. Each action can be independently associated with a condition. The task mainly includes three actions: 1. Send a notification to a designated person; 2. Execute a control command of a certain device to reduce the load; 3. Send an alarm notification to the production line. The process is defined as a thread (Pipeline), and three nodes (node) are defined (including parameter parsing, preprocessing, and data storage). Each thread contains a trigger (TriggerPublisher), which can be associated with the thread by configuring a trigger configuration (TriggeConfig) and stored persistently in the database. There is an external task scheduling and execution module, which mainly includes task registration, task scheduling, and execution. Sending notifications, executing IOT commands (IoT device control commands), and sending API (Application Program Interface) requests to the outside are all tasks.

[0097] In some embodiments, the task scheduling method further includes: associating the trigger number with the task number and persisting it in a database. In an embodiment of the present invention, the event type and trigger condition can be selected in the interface, and then whether to trigger the execution can be selected. After the configuration is completed, the trigger number and the process number are associated and persisted in the database.

[0098] In addition, in this embodiment, the trigger event of the subscription trigger includes: during the task running process, according to the node, branch or process of the task, a trigger event is sent to the outside, the trigger event carries the task number, form data and context data, and is associated with the trigger number in the database to trigger the execution of the trigger. During the pipeline running process, according to the pipeline running to a certain node, branch and running completion, an event is sent to the outside, the event carries the process number, the form data of the process and the context data of the process, and is associated with the trigger number in the database to finally trigger the execution of the trigger.

[0099] Figure 6 is a structural block diagram of a device for scheduling task of a process engine trigger according to an embodiment of the present invention, such as Figure 6 As shown, the device 100 includes:

[0100] A trigger configuration module 110, for subscribing to trigger events through a front-end visual interface according to the event type of the task, wherein the event type includes node events, branch events and process events;

[0101] Specifically, in this embodiment, each task will be configured with multiple nodes, and each node will be packaged as a different event type according to the processing of specific tasks. There will be connections between nodes, each connection will be associated with branch conditions, and triggers will be associated with nodes, the process itself, and branches to trigger. During the task running process, it will be executed in this defined order.

[0102] Each task will be configured with multiple nodes, and each node will be packaged as a different event type according to the processing of specific tasks. There will be connections between nodes, and each connection will be associated with branch conditions. The process event will associate the trigger with the node, the process itself, and the branch to trigger. During the task running process, it will be executed in this defined order.

[0103] Specifically, in this embodiment, the node event can be configured with a node trigger. The trigger configuration module 110 configures the process, selects the process node, and then configures the node trigger, that is, the trigger configured in the process node, which will be triggered only when the process flows to the corresponding process node. A process node can be configured with multiple trigger events, and each trigger event can be executed independently according to the trigger condition configured by itself. Specifically, the trigger event can be, but is not limited to, as follows:

[0104] The trigger event is the entry node: when the process flows to the corresponding node in the node event, the trigger of the node is triggered;

[0105] The trigger event is leaving the node: the process flows to the corresponding node in the node event and the task is successfully executed through the node. The trigger is triggered when the process leaves the current node and is about to flow to the next node;

[0106] The trigger event is the dispatch node: the trigger is triggered when the process flows to the corresponding node in the node event and the "dispatcher" of the node completes the action of dispatching the node.

[0107] Branch events can configure branch triggers. The trigger configuration module 110 configures the process, selects the process branch, and then configures the branch trigger, that is, configures the trigger event in the process line. For example, the trigger event is entering the branch, and the process will be triggered only when it flows to the corresponding process branch.

[0108] The process event can configure the process trigger. The trigger configuration module 110 configures the process and then configures the process trigger, that is, the trigger configured in the process will be triggered when the process performs a certain operation.

[0109] Multiple trigger events can be configured in the process event. Each trigger can be executed independently according to its configured trigger conditions. The trigger events can be, but are not limited to, the following:

[0110] The trigger event is the creation of a process: the trigger is triggered when the user creates a process;

[0111] The trigger event is the end of the process: the trigger is triggered when the process execution is completed, failed, or actively closed;

[0112] The trigger event is the cancellation process: the trigger is triggered when the user cancels the process;

[0113] The trigger event is suspending the process: the trigger is triggered when the user suspends the process;

[0114] The trigger event is the resume process: the trigger is triggered when the user resumes the suspended process.

[0115] In this embodiment, different types of event definitions such as process events, branch events, and node events are introduced in the process of trigger event subscription management, so that the trigger can subscribe to multiple events as needed.

[0116] The conditional rule engine module 120 is used to select a trigger condition of a trigger according to a trigger event.

[0117] In this embodiment, after the trigger configuration module 110 subscribes to the trigger event of the trigger, the conditional rule engine module 120 will manage the triggering conditions of the trigger through the conditional rule engine, which is referred to as conditional management. Conditional management specifically refers to using rule judgment and context parameters as conditional configuration. After the configuration is completed, the conditional configuration will be converted into a string expression and persisted in the database. When the process runs to the specified node, an event will be issued. At this time, a rule judgment will be made based on the data of the current node, the context parameters of the process, etc. before the specific action is executed.

[0118] The conditional rule engine module 120 is mainly used to configure trigger conditions, parameter parsing of trigger conditions, and execution of trigger condition rules. The conditional rule engine can set condition groups to implement the judgment of multiple conditions, and each condition is associated with multiple conditional expressions and the trigger conditions are classified, which can realize a dynamic trigger mechanism under complex conditions. In this embodiment, the trigger conditions may include: form field judgment, global context judgment, task execution result judgment, multiple conditions or and multiple conditions and any one or more of them, specifically:

[0119] Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed;

[0120] Global context judgment refers to the context content of the configuration execution field. When the configuration execution field of the process meets the context content, the trigger is executed;

[0121] The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed;

[0122] Multiple conditions or refers to configuring multiple judgment conditions in the conditional rule engine. Multiple judgment conditions are judged in the form of or to determine whether the trigger conditions are met; trigger condition is multiple conditions and: configuring multiple judgment conditions in the conditional rule engine. Multiple judgment conditions are judged in the form of and to determine whether the trigger conditions are met, that is, the trigger is executed when all conditions are met.

[0123] In this embodiment, different conditional expressions are executed and parameter parsing is completed according to different trigger conditions. Each trigger condition rule corresponds to a conditional expression. All trigger conditions are traversed according to the conditional calculation expression. When the conditional calculation expression returns true, it means that the rule is hit, that is, the trigger is triggered to execute. Returning false indicates that the rule fails, and the trigger is not triggered at this time. The conditional calculation expression may include: contains, equals, equals (ignore case), regular match, does not contain, is not empty, starts with a set value, ends with a set value, is not equal to, is not within the value, etc.

[0124] In this embodiment, the conditional rule engine module 120 executes different conditional expressions and completes parameter parsing according to different trigger conditions. Each trigger condition rule corresponds to a conditional expression, and all trigger conditions are traversed according to the conditional calculation expression. When the conditional calculation expression returns true, it means that the rule is hit, that is, the trigger is triggered to execute. Returning false indicates that the rule fails, and the trigger is not triggered at this time. The conditional calculation expression may include: contains, equals, equals (ignore case), regular match, does not contain, is not empty, starts with a set value, ends with a set value, is not equal to, is not within the value, etc.

[0125] In this embodiment, a task scheduling strategy based on multi-condition combination and concurrency is adopted, allowing users to customize the conditions for task triggering and the execution order, supporting multiple conditions and / or, and supporting serial and parallel execution of multiple tasks.

[0126] The task scheduling engine module 130 is used to trigger a scheduling trigger to execute a task according to a triggering event and the triggering condition.

[0127] Specifically, when a user initiates a task, the task scheduling engine module 130 can determine the type of the task through the event scheduler, for example, whether the task is a node event, a branch event, or a process event, and then the task scheduling engine will execute the task according to the event type. Figure 2 As shown in step S3, the execution tasks mainly include:

[0128] Task parsing: It can also be called parameter parsing. Parameter parsing includes task request parameter parsing and task context parameter parsing. Task request parameter parsing refers to parsing the task name and task number according to the parameters in the task definition by matching the process form data, and filling them into the task request parameters; task context parameter parsing refers to injecting the task upper and lower parameters into the process context data, such as the node names contained in the process, the process number, the process information, the current operator, and the process global variable information.

[0129] Resource allocation: In this embodiment, tasks are scheduled to different work nodes according to their priorities to meet the isolation control of tasks. Some tasks require quick response, while some tasks require long execution. In order to ensure that high-priority tasks are executed quickly and without backlog, a task priority scheduling algorithm is designed. For example, two message queues (e.g., task_high_priority and task_default_priority) can be designed to receive task messages and execute tasks;

[0130] Synchronous execution and asynchronous execution: This embodiment adopts a task scheduling strategy based on multi-condition combination and concurrency, allowing users to customize the conditions for task triggering and the execution order, supporting multiple conditions and / or, and supporting synchronous execution (parallel execution) and asynchronous execution (serial execution) of multiple tasks;

[0131] Task polling and failure compensation: In this embodiment, the execution results can be associated with the process nodes, providing synchronous and asynchronous task execution capabilities, capturing task exceptions, completing task retries through polling configuration, and recording the results of task failures. System administrators can query failure records for manual execution and complete task compensation.

[0132] The embodiment of the present invention allows to execute tasks cyclically according to specific conditions during the task execution process, thereby realizing more complex process control. At the same time, a context management mechanism is introduced for the trigger, so that the task execution result can be conveniently associated with the conditions of the subsequent tasks, thereby realizing more precise triggering conditions.

[0133] Figure 7 is a structural block diagram of another process engine trigger task scheduling device according to an embodiment of the present invention, such as Figure 7 As shown, in some embodiments, the task scheduling device 100' further includes:

[0134] The association module 140 is used to associate the trigger number with the task number and persist it in the database. In the embodiment of the present invention, the event type and trigger condition can be selected in the interface, and then whether to trigger the execution can be selected. After the configuration is completed, the trigger number and the process number are associated and persisted in the database.

[0135] In some embodiments, the trigger configuration module 110 is specifically used to: during the task running process, according to the node, branch or process of the task, send a trigger event to the outside, the trigger event carries the task number, form data and context data, and triggers the execution of the trigger by associating with the trigger number in the database. During the pipeline running process, according to the pipeline running to a certain node, branch and running completion, an event is sent to the outside, the event carries the process number, the form data of the process and the context data of the process, and finally triggers the execution of the trigger by associating with the trigger number in the database.

[0136] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0137] Embodiment 3

[0138] Figure 8 is a functional block diagram of a computer-readable storage medium according to an embodiment of the present invention. Figure 8 As shown, the embodiment of the present invention further provides a computer-readable storage medium 300, in which a computer program 310 is stored. When the computer program 310 is executed by a processor, the following is implemented:

[0139] Subscribe to the trigger event of the trigger through the front-end visual interface according to the event type of the task, wherein the event type includes node event, branch event and process event;

[0140] Selecting a trigger condition of the trigger according to the trigger event;

[0141] The trigger is triggered and scheduled to execute the task according to the trigger event and the trigger condition.

[0142] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. Of course, there are other forms of readable storage media, such as quantum memory, graphene memory, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0143] Embodiment 4

[0144] Fig. 9 is a functional block diagram of an electronic device according to an embodiment of the present invention. The present invention also provides an electronic device, please refer to Fig. 9 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0145] The processor, network interface and memory can be connected to each other through an internal bus, which can be an industrial standard architecture ISA bus, a peripheral component interconnect standard PCI bus or an extended industrial standard architecture EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0146] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a method for scheduling process engine trigger tasks at the logical level.

[0147] The processor executes the program stored in the memory and is specifically used to execute Figures 1 to 4 The illustrated embodiment discloses a method for orchestrating process engine trigger tasks.

[0148] The above Figures 1 to 4 The method for scheduling a process engine trigger task disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0149] Of course, in addition to the software implementation, the electronic device of the present invention does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices. The system, device, module or unit described in the above embodiments can be implemented by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0150] Although the present invention provides method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment).

[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0154] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the statement "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0155] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, and readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for scheduling process engine trigger tasks, characterized in that: The method comprises: Subscribe to the trigger event of the trigger through the front-end visual interface according to the event type of the task, wherein the event type includes node event, branch event and process event; The triggering condition of the trigger is selected according to the triggering event, and the triggering condition is managed through the conditional rule engine, with rule judgment and context parameters as condition configuration. After the configuration is completed, the condition configuration is converted into a string expression and persisted in the database. When the process runs to the specified node, an event will be issued, and a rule judgment will be made according to the data of the current node and the context parameters of the process before the specific triggering action is executed; wherein, the conditional rule engine is used to configure the triggering condition, the parameter parsing of the triggering condition and the execution of the triggering condition rule. The conditional rule engine sets the condition group to realize the judgment of multiple conditions, and each condition is associated with multiple conditional expressions and the triggering conditions are classified, so as to realize the dynamic trigger mechanism under complex conditions; Scheduling the trigger to execute the task according to the trigger event and the trigger condition; The step of scheduling the trigger to execute the task according to the trigger event and the trigger condition specifically includes: Execute task scheduling according to the event type, wherein the task scheduling includes: parameter parsing, resource allocation, synchronous execution and asynchronous execution, as well as task polling and failure compensation; Among them, the parameter parsing includes task request parameter parsing and task context parameter parsing. The task request parameter parsing refers to parsing the task name and task number in the task definition by matching the process form data according to the parameters in the task definition, and filling them into the task request parameters; the task context parameter parsing refers to injecting the task upper and lower parameters into the process context data; the resource allocation includes scheduling to different work nodes according to the priority of the task; the synchronous execution and asynchronous execution include task scheduling strategies based on multi-condition combination and concurrency, allowing users to customize the conditions and execution order of task triggering; the task polling and failure compensation include associating the execution result with the process node, completing the task retry through polling configuration, and recording the result of task failure; the method also includes: Associating the number of the trigger with the number of the task and persisting them in the database; The method further comprises: During the running of the task, a trigger event is sent to the outside according to the node, branch or process of the task. The trigger event carries the number, form data and context data of the task, and is associated with the number of the trigger in the database to trigger the execution of the trigger. Different conditional expressions are executed and parameter parsing is completed according to different trigger conditions. Each trigger condition rule corresponds to a conditional expression. All trigger conditions are traversed according to each conditional expression. When the condition calculation expression returns true, it means that the rule is hit, that is, the trigger is triggered to execute. Returning false means that the rule fails and the trigger is not triggered at this time.

2. The method for task scheduling according to claim 1, characterized in that: The triggering events include: Create a process: The trigger is triggered when the user creates a process; End the process, when the process execution is completed, the process execution fails or the process is actively closed, the trigger is triggered; Cancel process, when the user cancels the process, the trigger is triggered; Suspend process, when the user suspends the process, the trigger is triggered; Resume process: the trigger is triggered when the user resumes the suspended process.

3. The method for task scheduling according to claim 1, characterized in that: The triggering conditions include: form field judgment, global context judgment, task execution result judgment, multiple conditions or any one or more of multiple conditions and; wherein, Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed; Global context judgment refers to configuring the execution field context content. When the context field of the process meets the context content, the trigger is executed; The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed; Multiple conditions or refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of or to determine whether the trigger condition is met; Multi-condition AND refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are combined in the form of AND to determine whether the trigger condition is met.

4. A device for scheduling process engine trigger tasks, characterized in that: The task scheduling device comprises: The trigger configuration module is used to subscribe to the trigger event of the trigger through the front-end visual interface according to the event type of the task, wherein the event type includes node events, branch events and process events; it is also used to send a trigger event to the outside according to the node, branch or process of the task during the running of the task, wherein the trigger event carries the number, form data and context data of the task, and triggers the execution of the trigger by associating it with the number of the trigger in the database; the conditional rule engine module is used to select the trigger condition of the trigger according to the trigger event, and manage the trigger condition through the conditional rule engine, using rule judgment and context parameters as conditional configuration. After the configuration is completed, the conditional configuration is converted into a string expression and persisted in the database. When the process runs to the specified node, it will An event is issued, and a specific trigger action is executed only after a rule judgment is made based on the data of the current node and the context parameters of the process; wherein the conditional rule engine is used to configure the triggering conditions, parameter parsing of the triggering conditions and execution of the triggering condition rules. The conditional rule engine sets the condition group to realize the judgment of multiple conditions, and each condition is associated with multiple conditional expressions and the triggering conditions are classified, so as to realize the dynamic triggering mechanism under complex conditions; it is also used to execute different conditional expressions and complete parameter parsing according to different triggering conditions. Each of the triggering condition rules corresponds to a conditional expression, and all the triggering conditions are traversed according to each of the conditional expressions. When the conditional calculation expression returns true, it means that the rule is hit, that is, the trigger is triggered to execute. Returning false means that the rule fails, and the trigger is not triggered at this time. A task scheduling engine module, used to trigger and schedule the trigger to execute the task according to the trigger event and the trigger condition; The task scheduling engine module is specifically used to: perform task scheduling according to the event type, and the task scheduling includes: parameter parsing, resource allocation, synchronous execution and asynchronous execution, as well as task polling and failure compensation; The parameter parsing includes task request parameter parsing and task context parameter parsing. The task request parameter parsing refers to parsing the task name and task number in the task request parameter by matching the process form data according to the parameters in the task definition, and filling them into the task request parameters; the task context parameter parsing refers to injecting the task upper and lower parameters into the process context data; the resource allocation includes scheduling to different work nodes according to the priority of the task; the synchronous execution and asynchronous execution include task scheduling strategies based on multi-condition combination and concurrency, allowing users to customize the conditions and execution order of task triggering; the task polling and failure compensation include associating the execution result with the process node, completing the task retry through polling configuration, and recording the result of task failure; the task scheduling device also includes: The association module is used to associate the number of the trigger with the number of the task and persist them in the database.

5. The task scheduling device according to claim 4, characterized in that: The triggering events include: Create a process: The trigger is triggered when the user creates a process; End the process, when the process execution is completed, the process execution fails or the process is actively closed, the trigger is triggered; Cancel process, when the user cancels the process, the trigger is triggered; Suspend process, when the user suspends the process, the trigger is triggered; Resume process: the trigger is triggered when the user resumes the suspended process.

6. The task scheduling device according to claim 4, characterized in that: The triggering conditions selected by the conditional rule engine module specifically include: form field judgment, global context judgment, task execution result judgment, multiple conditions or any one or more of multiple conditions and; wherein, Form field judgment refers to the configuration parameters of task execution. When the node input data meets the configuration parameters, the trigger is executed; Global context judgment refers to the context content of the configuration execution field. When the configuration execution field of the process meets the context content, the trigger is executed; The task execution result judgment refers to the return value of the task execution. When the return result of the node task execution meets the return value, the trigger is executed; Multi-conditional OR refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of OR to determine whether the trigger conditions are met; multi-conditional AND refers to configuring multiple judgment conditions in the conditional rule engine, and multiple judgment conditions are judged in the form of AND to determine whether the trigger conditions are met.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for scheduling process engine trigger tasks as described in any one of claims 1 to 3 is implemented.

8. An electronic device, characterized in that: It includes: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement a method for orchestrating process engine trigger tasks as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Distributed task scheduling method and device based on event triggering

    CN106980543A

  • Visual trigger configuration method and storage medium

    CN113900638A