Task flow management and scheduling method based on XXL-JOB framework
By introducing task flow execution mode and monitoring into the XXL-JOB framework, configuring task dependencies and concurrency control, the multi-task flow configuration and resource control problems in the XXL-JOB framework in task flow management are solved, and the execution success rate of the task flow and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202510716126.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-19
AI Technical Summary
The existing XXL-JOB framework lacks visual configuration management of multiple task flows, task flow nesting, task failure strategy, task resource control, etc. in task scheduling, resulting in the scheduling manager being unable to meet the task flow configuration and scheduling requirements of complex multi-task dependencies.
Add task flow execution mode and monitoring in the XXL-JOB framework, configure task dependencies and common parameters, manage task flows through a visual interface, add task concurrency controllers, support task flow tracking, operation and monitoring, realize task flow pause, skip or re-execution, and control the number of concurrent tasks.
It achieves efficient configuration and scheduling of complex multi-task dependent task flows, improves the success rate of task flow execution, meets the business requirements of acceptable failure scenarios, and optimizes server resource usage.
Smart Images

Figure CN120670111A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed task scheduling, and more particularly to a task flow management and scheduling method based on the XXL-JOB framework. Background Art
[0002] Currently, the XXL-JOB framework is widely used in the distributed task scheduling framework on the market. The XXL-JOB framework meets the basic task scheduling execution requirements and implements subtask dependencies by manually filling in the childJobId of the task XXL_TRIGGER_INFO. However, it cannot configure complex multi-task flows, nor can it configure task flows through a good visual interface. When executing subtasks, it does not determine the completion status of the predecessor tasks. As a result, the scheduling manager cannot meet the task flow configuration and scheduling business scenarios with complex multi-task dependencies.
[0003] The existing task scheduling solution has the following problems:
[0004] 1. Lack of visualization of multi-task flows, graphical configuration management pages and calling scenarios.
[0005] 2. The configuration management scenario and calling scenario of nested sub-task flows in the missing task flow.
[0006] 3. The task "skip if failed" and "force pass if failed" strategies are not configured according to the business rules of the task node to control the execution completion rate of the task flow.
[0007] 4. The post-pause task handling process is missing. Only the task status is changed, but the actual task is still executing; for example: shell type tasks.
[0008] 5. Lack of transmission of common parameters between multiple tasks.
[0009] 6. Lack of concurrent control on the executor side results in excessive usage of server resources such as CPU and memory on the executor side.
[0010] Therefore, providing a task flow management and scheduling method to solve at least one of the above problems is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0011] In view of this, the present invention provides a task flow management and scheduling method based on the XXL-JOB framework, which realizes the configuration, scheduling, tracking, operation and maintenance and monitoring of complex multi-task dependent task flows, and improves the execution efficiency and management level of task flows.
[0012] In order to achieve the above object, the present invention adopts the following technical solutions:
[0013] The present invention provides a task flow management and scheduling method based on the XXL-JOB framework, comprising the following steps:
[0014] S1. In the XXL-JOB admin service, add task flow execution mode and task flow monitoring, and create a task flow;
[0015] S2. Configure the task dependencies, common parameters and transmission methods of the task flow;
[0016] S3. Create a task flow instance according to step S1, schedule tasks according to the task dependencies and execution order configured in step S2, and transmit common parameters at the same time;
[0017] S4. Track, maintain and monitor the execution status of the task flow instance, and pause, skip or re-execute the corresponding task node according to the execution status.
[0018] Furthermore, it also includes:
[0019] S5. In the XXL-JOB executor service, add a task concurrency controller to control the number of concurrent tasks.
[0020] Furthermore, step S1 specifically includes:
[0021] Add fields for task flow table attributes in the XXL_TRIGGER_INFO table, including: task flow number, task node ID, predecessor dependent task, successor task, node type, task execution mode, subtask flow number, failure forced pass flag, and flowchart storage field;
[0022] When creating a task flow, set the single-instance or multi-instance task flow execution mode and task flow monitoring configuration, and initialize the task records of the start node and end node.
[0023] Furthermore, step S2 specifically includes:
[0024] S21. Configure the dependencies between tasks in the task flow and configure task failure management through a visual interface;
[0025] S22. Use cache or database persistence technology to configure public parameters, and set the transmission method of public parameters.
[0026] Furthermore, step S21 specifically includes:
[0027] A flowchart creation tool that integrates business process modeling annotation specifications, defines selection components, dependency components, task components, and task flow components, and uses different icons to distinguish and identify them;
[0028] The flowchart making tool converts the flowchart in the start task node record into a visual task flowchart;
[0029] When the selection component is triggered, the task node information is modified and the task node is moved to the corresponding coordinate position;
[0030] When the task component is triggered, a minimum unit task node is created, and a task failure management method is configured in the task details; the task failure management method includes: a failure skip management method and a failure forced pass management method;
[0031] When the task flow component is triggered, a subtask flow node is created and connected to the created task flow;
[0032] When the dependency component is triggered, the execution order or dependency relationship between the two tasks is linked, and the predecessor task dependency and successor task field values of the tasks are updated;
[0033] When the task flow flowchart is completed, it is stored in the XXL_TRIGGER_INFO table.
[0034] Furthermore, step S22 specifically includes:
[0035] For the created task flow, common parameters are configured in sequence, and the common parameters are transmitted to each task node in the task flow using cache or database persistence technology; wherein the common parameters include batch processing date and task flow instance flag;
[0036] Add a BatchParams parameter list in the TriggerParam class to load and pass the common parameters when scheduling each task node of the task flow instance.
[0037] Furthermore, in step S3, creating a task flow instance specifically includes:
[0038] Create a task flow instance based on the execution mode of the task flow and define multiple task node states; the task node states include: not executed, executing, failed, successful, paused, and conditionally passed;
[0039] Register the instance information of each task node in the XXL_TRIGGER_STATUS task instance table, including task flow instance number, task number, task status, task flow number, subtask flow number and parent task number;
[0040] Determine whether each task node contains a subtask flow. If it contains a subtask flow, the corresponding task node is registered again according to the task flow number of the included subtask flow, where the parent task number is the task number of the corresponding task node.
[0041] Furthermore, in step S4, tracking the execution status of the task flow instance specifically includes:
[0042] By querying the XXL_TRIGGER_STATUS task instance table in the database, the latest log status of each task node of the task flow instance and its bound subtask flow nodes are obtained; and the task node status is displayed in different colors in the front-end flow chart;
[0043] If the current task node contains subtask flows, find the execution status of each subtask node within it; the status of the parent task flow node is determined by the status of its internal subtasks to ensure state synchronization.
[0044] Furthermore, in step S4, the execution status of the task flow instance is maintained, specifically including:
[0045] Send a pause command to the executing task node to terminate the corresponding business logic program; update the status of the corresponding task node to the pause state;
[0046] For task nodes that fail to execute, the task will be forced to pass or skipped according to the task failure management method;
[0047] For task nodes that have been completed or failed, a re-run command is issued; after the task is re-run, subsequent task nodes are continued to be executed to ensure the integrity of the task flow.
[0048] Furthermore, the sending of a pause instruction to the executing task node to terminate the corresponding business logic program specifically includes:
[0049] Send a pause command to the executing Bean type task node, and it will be terminated directly;
[0050] Send a pause command to the Shell type task node being executed, then rewrite the destroy method of the ScriptJobHandler class of the XXL-JOB executor service to terminate all parent and child processes of the corresponding Shell task layer by layer to prevent the omission of newly generated child processes.
[0051] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a task flow management and scheduling method based on the XXL-JOB framework, which has the following beneficial effects:
[0052] 1. Modify the source code of the XXL-JOB admin service, establish the dependency relationship between tasks through the visual and graphical configuration management page, form a task flow chart, and support nesting another sub-task flow to prevent a task flow chart from being too bloated and difficult to maintain. You can clearly view the execution order and dependent tasks between tasks or task flows, which facilitates task management.
[0053] 2. Read and schedule tasks according to the dependencies and execution order of the task flow diagram. By implementing a "failure-skip" blocking mechanism, the task flow execution success rate is improved, meeting business and maintenance scenarios where failure is acceptable. Furthermore, public parameters are passed between multiple tasks in the task flow.
[0054] 3. Task flow tracking and operation and maintenance methods can clearly track the execution status of task flows. Due to business and operation and maintenance scenario requirements, re-execution instructions can be issued for completed or failed task nodes of task flow instances to meet the needs of task re-running. Pause instructions can be issued for the currently executing tasks of task flow instances to truly terminate the running of Bean and shell type tasks.
[0055] 4. XXL-JOB executor-side concurrency control can flexibly adjust the concurrency of the thread pool according to the executor-side CPU, memory and other server resource usage to improve the success rate of task execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0057] Figure 1 A flowchart of a task flow management and scheduling method based on the XXL-JOB framework is provided in an embodiment of the present invention.
[0058] Figure 2 This is an example diagram of a task flow visualization configuration provided by an embodiment of the present invention.
[0059] Figure 3 This is an example diagram of the tracking task flow provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0061] The embodiment of the present invention discloses a task flow management and scheduling method based on the XXL-JOB framework, referring to Figure 1 As shown, the following steps are included:
[0062] S1. In the XXL-JOB admin service, add task flow execution mode and task flow monitoring, and create a task flow;
[0063] S2. Configure the task dependencies, common parameters and transmission methods of the task flow;
[0064] S3. Create a task flow instance according to step S1, schedule tasks according to the task dependencies and execution order configured in step S2, and transmit common parameters at the same time;
[0065] S4. Track, maintain and monitor the execution status of the task flow instance, and pause, skip or re-execute the corresponding task node according to the execution status.
[0066] S5. In the XXL-JOB executor service, add a task concurrency controller to control the number of concurrent tasks.
[0067] XXL-JOB admin is one of the core components of the XXL-JOB distributed task scheduling framework, responsible for controlling and managing the operation of the entire XXL-JOB framework. The task flow management and scheduling steps of this embodiment are:
[0068] Step 1: XXL-JOB admin service introduces single / multi-task execution mode and task flow monitoring solution to create task flow.
[0069] Step 2: XXL-JOB admin service provides visual dependency configuration and task failure management configuration functions between tasks in the task flow, configures dependent tasks or subtask flows of the task flow, and task failure management strategies.
[0070] Step 3: Use cache or database persistence technology to configure the common parameter configuration and transmission scheme of the task flow.
[0071] Step 4. XXL-JOB admin service creates a task flow instance according to the execution mode of the task flow in "Step 1"; schedules the tasks of the task flow according to the dependency order of the task flow diagram configured in "Step 2", and transmits the common parameters in multiple task nodes of the task flow according to the common parameters in "Step 3".
[0072] Step 5: Track and maintain task flow instances.
[0073] Step 6: Monitor the execution of the task flow instance and generate monitoring notification records.
[0074] Step 7. Add a task concurrency controller to the XXL-JOB executor service to control the number of concurrent tasks.
[0075] This embodiment implements the configuration and scheduling of complex multi-task dependent task flows, improving the success rate of task flow execution and meeting business scenarios where failure is acceptable. It also supports task rerunning and pausing to meet operation and maintenance requirements, improving the success rate of task execution and optimizing server resource usage.
[0076] The above steps are described in detail below.
[0077] Step 1 specifically includes:
[0078] Expand the main fields of the task flow table attributes of the existing XXL_TRIGGER_INFO table, including task flow number, task node ID, predecessor dependent task, successor task, node type, task execution mode, subtask flow number, failure skip flag and failure forced pass flag, and flowchart storage field;
[0079] When creating a new task flow model, set the single / multi-instance task execution mode and task flow monitoring configuration. The XXL-JOBadmin service first initializes the "start" and "end" task records by default; among them, the task flow number field value is consistent, while the other task node ID, node type, and task execution mode field values are inconsistent.
[0080] Step 2, refer to Figure 2 As shown, specifically including:
[0081] The XXL-JOB admin service page integrates the mainstream business process modeling notation standard flowchart making tool (BPMN, Business Process Modeling Notation), and defines the page to provide "selection", "dependency", "task", "task flow" components, and uses different icons to distinguish and identify them.
[0082] When you open the task flowchart configuration, the flowchart maker will parse the JSON or XML format flowchart stored in the "Start" task node record and convert it into a visual task flowchart.
[0083] Select the "Select" control to modify the task node information and drag the coordinate position of the task node.
[0084] In the "Task" control, select the task node that can create the smallest unit, and add and configure the "Skip on Failure" and "Force Pass on Failure" strategies in the original task details. The record is stored in the XXL_TRIGGER_INFO table.
[0085] Select the "Task Flow" control to create a subtask flow node and select a task flow created in the system to bind to the subtask flow number field value of the task flow. The record is stored in the XXL_TRIGGER_INFO table. Select the task flow node to view the details of the subtask flow and the task flow configuration diagram.
[0086] The "Dependency" control can flexibly link the execution order or dependency relationship between two tasks, and simultaneously update the predecessor task dependency and successor task field values of the two tasks. If there are multiple dependent tasks in the predecessor and successor, the "xx task node id + separator + aa task node id" combination is used. For example: the predecessor task value of the xxx subtask flow is "xxx task 2 node id, xxx task 3 node id, xxx task 4 node id".
[0087] For all flowchart creation results in step 2 above, the flowchart creation tool converts the flowchart information into JSON or XML definitions and stores them in the flowchart storage field of the "Start" task node record.
[0088] Step three specifically includes:
[0089] For the created task flow, configure some custom parameters in a certain order; for example, batch date, task flow instance flag, etc.
[0090] In the trigger parameter TriggerParam class of the XXL-JOB admin service, a new batch parameter BatchParams parameter list property is added. When scheduling each task node of the task flow instance, the BatchParams parameter obtains and loads all custom parameters of the task flow. When initiating an execution instruction to the XXL-JOB executor service, the BatchParams parameter list is passed to satisfy the business code of each task node to obtain or modify public parameters. After the business code modifies the parameter value, the XXL-JOB admin service can read the latest parameter value when executing the next schedule and transmit it to the next task node.
[0091] Step 4 specifically includes:
[0092] 1) Create a task flow instance.
[0093] The XXL-JOB admin service defines the task node statuses of "Not Executed", "Executing", "Failed", "Successful", "Paused", and "Conditionally Passed (Skip)";
[0094] When the XXL-JOB admin service's XxlJobTrigger.trigger method triggers a task flow manually or by Cron scheduling, if it's in "single-instance task mode" and a task flow instance of that same flow is already executing in the system, the system won't trigger the generation of a task flow instance in the "pending task queue" until the current task flow instance is executed in the system, at which point a new task flow instance will be generated. If it's in "multi-instance task mode," a new task flow instance is immediately triggered and recorded in the XXL_TRIGGER_STATUS task instance table. Instance information for each task node includes: task flow instance / batch number, task number, task status, task flow number, subtask flow number, and parent task number. The task flow instance number is encoded using the "UUID_timestamp" encoding format.
[0095] Method for XXL-JOB admin service to initialize task flow instance:
[0096] a. Generate a unique task flow instance number;
[0097] b. Get all task nodes of the task flow according to the task flow number, and
[0098] The XXL_TRIGGER_STATUS task instance table registers each task node instance information one by one:
[0099] Task flow instance / batch number: the task flow instance number of step a;
[0100] Task number: the task node number;
[0101] Task status: Not executed;
[0102] Task flow number: the task flow number of this task flow;
[0103] Subtask flow number: the task flow number that references the subtask flow;
[0104] ParentTaskId: parent task number;
[0105] Determine whether the task nodes are of task flow type one by one. If yes, proceed to step c.
[0106] c. Re-execute step b according to the task flow number of the subtask flow referenced by this task, where the parent task number is the task number of this task.
[0107] 2) Schedule the tasks of the task flow according to the dependency order of the configured task flow graph, and conduct common parameters at multiple task nodes of the task flow according to the configured common parameters.
[0108] The XXL_TRIGGER_LOG table of the extended XXL-JOB admin service has fields related to task flows, including task flow instance / batch number, task flow / subtask flow number, and parameter list value, which are used to bind the execution logs of task flow instances and their subtask flows.
[0109] The XXL-JOB admin service executes the task flow instance starting from the "Start" task node in the XXL_TRIGGER_STATUS task instance table, obtains the "Start" task, and calls XxlJobTriggerPoolHelper.trigger to trigger the "Start" task.
[0110] The trigger of the XXL-JOB admin service obtains the task to be executed, loads the task flow common parameters and task custom parameters into the TriggerParam.BatchParams parameter list; the XXL-JOB admin service sends an execution instruction to the XXL-JOB executor, updates the task node record status in the XXL_TRIGGER_STATUS table to "Executing"; the XXL-JOB admin service asynchronously waits for the executor to notify the execution result.
[0111] After the XXL-JOB admin service AdminBizImpl instance receives the XXL-JOB executor service's task completion information, it updates the current task node's record status in the XXL_TRIGGER_STATUS table to "Executed Successfully." If the task node is the "End" node of the task flow and references a parent task number, it updates the referenced parent task's status to "Executed Successfully" and switches the current task to the parent task. It then queries the execution status of the current task's subsequent dependent tasks and all of its predecessor dependent tasks. If any predecessor dependent tasks are unexecuted, the task is not executed. If all predecessor dependent tasks are completed or conditionally passed, it determines whether the subsequent dependent task is of the "Task Flow" type. If "No," the subsequent dependent task is triggered. If "Yes," the "Start" task node of the subsequent dependent task's subtask flow is triggered and the subsequent dependent task's status is updated to "Executing." If there are no subsequent dependent tasks, the entire task flow is executed to completion.
[0112] After the AdminBizImpl instance of the XXL-JOB admin service receives notification of a task failure from the XXL-JOB executor service, if the task node has "skippable on failure" set to "yes", the business code responds with a conditional pass status through the XXL-JOB executor service, and the XXL-JOB admin service records the task node status as "conditionally passed", triggering the scheduling of the next task node. If the task node has "skippable on failure" set to "no", the XXL-JOB admin service registers the task status as "failed", and does not trigger the scheduling of the next task node.
[0113] Step 5, refer to Figure 3 As shown, specifically including:
[0114] Track the task flow instances that are being executed or have been completed, query the log status of each task node and bound subtask flow node of the task flow instance in the database, and present the task nodes of "Executing", "Not Executed", "Failed to Execute", "Successful to Execute", "Paused", and "Conditionally Passed (Skip)" in the task flow diagram and display the corresponding status in the color. Figure 3 Medium blue indicates execution in progress, green indicates successful execution, red indicates failed execution, and purple indicates conditional pass.
[0115] If the node is a task flow node, you can view the status of each task node in the subtask flow; the task flow node status is synchronized with the status of the bound subtask.
[0116] Through the XXL-JOB admin service, a pause command is sent to the XXL-JOB executor service for the executing task node, and the executor service terminates the business logic program.
[0117] If it is a Bean type task, terminate it directly; if it is a Shell type task, rewrite the destroy method of the ScriptJobHandler class of the XXL-JOB executor service, query all parent and child processes of the Shell business task, and terminate the processes "layer by layer" from parent to child; to avoid the situation where after a child process is terminated, the parent process generates other child processes and cannot terminate the new child processes.
[0118] After the task is successfully paused, the XXL-JOB admin service records the task node status as "paused".
[0119] If a task node that is set to "force pass" fails, you can initiate a "force pass" command to pass the task node without affecting the business and continue to execute the next task node.
[0120] For task nodes that have been completed or failed, you can initiate a re-run command through the XXL-JOB admin service. After the task is re-run, the subsequent task flow tasks of the task will continue to be triggered.
[0121] Step six specifically includes:
[0122] Using database stored procedure technology, we can find monitored and effectively operational task flows. In the task flow instance execution log table, we collect statistics on the latest task flow instance execution status by task flow, unexecuted, failed, skipped, and successful, generating monitoring records. For example, if a task flow [batch yyyymmdd] has x unexecuted items, x failed, and x skipped items, or if a task flow [batch yyyymmdd] is running x days late.
[0123] Create a task node that can be called regularly by the XXL-JOB admin service.
[0124] Step seven specifically includes:
[0125] In the start method of the XxlJobExecutor class of the XXL-JOB executor service, add a task concurrency controller and expose the core concurrency number, maximum expansion concurrency number, and idle survival time parameters for operation and maintenance modification.
[0126] In the registJobThread method of the XxlJobExecutor class of the XXL-JOB executor service, the steps are executed immediately after the JobThread instance is abandoned, and the JobThread instance is included in the task concurrency controller, and the operation is managed by the task concurrency controller.
[0127] In the destroy method of the XxlJobExecutor class of the XXL-JOB executor service, add the resource recycling operation of the task concurrency controller.
[0128] This example fully describes the key capabilities of the XXL-JOB framework-based task flow management system, including visual status tracking and refined operational control for task flow instances, such as pause, forced pass, and rerun. These features enhance the flexibility, controllability, and fault tolerance of task flow scheduling, making them suitable for task scheduling needs in complex business scenarios.
[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0130] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A task flow management and scheduling method based on the XXL-JOB framework, characterized in that: The following steps are involved: S1. In the XXL-JOB admin service, add task flow execution mode and task flow monitoring, and create a task flow; S2. Configure the task dependencies, common parameters and transmission methods of the task flow; S3. Create a task flow instance according to step S1, schedule tasks according to the task dependencies and execution order configured in step S2, and transmit common parameters at the same time; S4. Track, maintain and monitor the execution status of the task flow instance, and pause, skip or re-execute the corresponding task node according to the execution status.
2. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 1, characterized in that: Also includes: S5. In the XXL-JOB executor service, add a task concurrency controller to control the number of concurrent tasks.
3. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 1, characterized in that: Step S1 specifically includes: Add fields for task flow table attributes in the XXL_TRIGGER_INFO table, including: task flow number, task node ID, predecessor dependent task, successor task, node type, task execution mode, subtask flow number, failure forced pass flag, and flowchart storage field; When creating a task flow, set the single-instance or multi-instance task flow execution mode and task flow monitoring configuration, and initialize the task records of the start node and end node.
4. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 1, characterized in that: Step S2 specifically includes: S21. Configure the dependencies between tasks in the task flow and configure task failure management through a visual interface; S22. Use cache or database persistence technology to configure public parameters, and set the transmission method of public parameters.
5. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 4, characterized in that: Step S21 specifically includes: A flowchart creation tool that integrates business process modeling annotation specifications, defines selection components, dependency components, task components, and task flow components, and uses different icons to distinguish and identify them; The flowchart making tool converts the flowchart in the start task node record into a visual task flowchart; When the selection component is triggered, the task node information is modified and the task node is moved to the corresponding coordinate position; When the task component is triggered, a minimum unit task node is created, and a task failure management method is configured in the task details; the task failure management method includes: a failure skip management method and a failure forced pass management method; When the task flow component is triggered, a subtask flow node is created and connected to the created task flow; When the dependency component is triggered, the execution order or dependency relationship between the two tasks is linked, and the predecessor task dependency and successor task field values of the tasks are updated; When the task flow flowchart is completed, it is stored in the XXL_TRIGGER_INFO table.
6. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 4, characterized in that: Step S22 specifically includes: For the created task flow, common parameters are configured in sequence, and the common parameters are transmitted to each task node in the task flow using cache or database persistence technology; wherein the common parameters include batch processing date and task flow instance flag; A batch parameter list is added to the trigger parameters to load and transfer the common parameters when scheduling each task node of the task flow instance.
7. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 3, characterized in that: In step S3, creating a task flow instance specifically includes: Create a task flow instance based on the execution mode of the task flow and define multiple task node states; the task node states include: not executed, executing, failed, successful, paused, and conditionally passed; Register the instance information of each task node in the XXL_TRIGGER_STATUS task instance table, including task flow instance number, task number, task status, task flow number, subtask flow number and parent task number; Determine whether each task node contains a subtask flow. If it contains a subtask flow, the corresponding task node is registered again according to the task flow number of the included subtask flow, where the parent task number is the task number of the corresponding task node.
8. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 7, characterized in that: In step S4, tracking the execution status of the task flow instance specifically includes: By querying the XXL_TRIGGER_STATUS task instance table in the database, the latest log status of each task node of the task flow instance and its bound subtask flow nodes are obtained; and the task node status is displayed in different colors in the front-end flow chart; If the current task node contains subtask flows, find the execution status of each subtask node within it; the status of the parent task flow node is determined by the status of its internal subtasks to ensure state synchronization.
9. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 7, characterized in that: In step S4, the execution status of the task flow instance is maintained, specifically including: Send a pause command to the executing task node to terminate the corresponding business logic program; update the status of the corresponding task node to the pause state; For task nodes that fail to execute, the task will be forced to pass or skipped according to the task failure management method; For task nodes that have been completed or failed, a re-run command is issued; after the task is re-run, subsequent task nodes are continued to be executed to ensure the integrity of the task flow.
10. A task flow management and scheduling method based on the XXL-JOB framework as claimed in claim 9, characterized in that: The method sends a pause instruction to the executing task node to terminate the corresponding business logic program; specifically includes: Send a pause command to the executing Bean type task node, and it will be terminated directly; Send a pause command to the Shell type task node being executed, then rewrite the destroy method of the ScriptJobHandler class of the XXL-JOB executor service to terminate all parent and child processes of the corresponding Shell task layer by layer to prevent the omission of newly generated child processes.