Workflow scheduling method and system and workflow engine

By creating an independent namespace and assigning a unique identifier to each test object on the workflow engine side, the problem of task distribution errors was solved, and accurate task distribution and efficient execution were achieved.

CN115048192BActive Publication Date: 2026-03-03CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-09
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing workflow management systems, the workflow engine may incorrectly assign tasks to the wrong test objects, causing tasks to fail to execute or malfunction.

Method used

A test object namespace is introduced. An independent namespace is created for each test object on the workflow engine side, and a unique namespace identifier is assigned. Different task queues are created according to different task types. When the task executor sends a request, it carries the namespace identifier of the test object. The workflow engine locates the task queue based on the namespace identifier and the task type to ensure that the task is accurately distributed.

Benefits of technology

This achieves task isolation for different test objects, avoids task distribution errors, and improves the accuracy and efficiency of task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048192B_ABST
    Figure CN115048192B_ABST
Patent Text Reader

Abstract

The disclosure provides a workflow scheduling method and system and a workflow engine, and relates to the field of workflow.The method comprises the following steps: creating an independent namespace for each test object on the side of the workflow engine, and assigning a unique namespace identifier; different task queues are created in the namespace according to different task types, task isolation of different test objects is realized, when a task executor sends a task request to the workflow engine, the task executor carries the namespace identifier of the test object in addition to the task type, when the workflow engine receives the task request, the workflow engine is positioned to a certain test object according to the namespace identifier, and then the corresponding task queue of the test object command space is found according to the task type, and the task is taken out from the task queue and issued to the task executor for execution, so that the workflow task can be accurately issued to the appropriate task executor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of workflow, and in particular to a workflow scheduling method and system and a workflow engine. Background Technology

[0002] The existing workflow management system consists of three parts: a workflow engine, task executors, and test objects. The workflow engine creates different task queues based on task type to store all active tasks. Each task type has a corresponding task executor that requests tasks from the workflow engine in a polling manner and then connects to the test object to complete the task.

[0003] The workflow engine has workflow instances that apply to different test objects, but they are only issued based on the task type. It is possible that the task executor connected to test object A obtains a task that needs to be executed on test object B, causing the task to fail to execute or to malfunction. Summary of the Invention

[0004] To address the aforementioned issues, this disclosure proposes a workflow scheduling method, system, and workflow engine.

[0005] This disclosure provides a workflow scheduling method through several embodiments, including:

[0006] The workflow engine creates a corresponding workflow instance for the test object based on the parameter values ​​of the task input for the selected workflow template and the test object. The workflow template defines at least one task included in the workflow, and each task corresponds to a certain task type TT.

[0007] The workflow engine creates a namespace corresponding to the test object and assigns a namespace identifier (TID). Different task queues corresponding to different task types are created within the namespace. The first task is set as the active task. The active task is placed into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0008] The workflow engine receives a request for the first task from the task executor, which carries the TID and TT of the first task.

[0009] Based on the TID and TT in the request, the workflow engine retrieves the first task from the corresponding namespace and task queue, and sends it to the task executor. The task executor then performs the corresponding operation on the test object according to the instructions in the first task and returns the execution result.

[0010] In some embodiments, it also includes:

[0011] The workflow engine receives the execution result of the first task returned by the task executor. If the first task has been completed, it removes the first task from the corresponding namespace and task queue.

[0012] The workflow engine determines whether all tasks in the workflow instance corresponding to the test object have been completed. If not, it sets the unexecuted second task after the first task as the active task and puts the active task into the corresponding task queue in the corresponding namespace according to the test object and task type of the active task.

[0013] The workflow engine receives a request for a second task from the task executor, which carries the TID and TT of the second task.

[0014] Based on the TID and TT in the request, the workflow engine retrieves the second task from the corresponding namespace and task queue, and issues it to the task executor. The task executor then performs the corresponding operation on the test object according to the instructions in the second task and returns the execution result.

[0015] In some embodiments, the method further includes: if all tasks in the workflow instance corresponding to the test object have been completed, the workflow engine sets the workflow instance corresponding to the test object to a completed state.

[0016] In some embodiments, task executors are deployed in a distributed manner on the test object side, with at least one task executor deployed on each test object. Each task executor sends task requests only for the test objects it is responsible for, or only sends task requests for the test objects and task types it is responsible for.

[0017] In some embodiments, at least one task executor is deployed for each test object, including: different task executors are deployed for different task types of the test object, or one task executor is deployed for different task types of the test object.

[0018] In some embodiments, the input test object for the selected workflow template includes:

[0019] The global test object is input for the selected workflow template by specifying the global test object in the workflow's global variables;

[0020] Alternatively, you can input local test objects for the selected workflow template by specifying local test objects for individual workflow templates.

[0021] This disclosure provides embodiments of a workflow engine, including:

[0022] Memory; and

[0023] A processor coupled to the memory is configured to execute a workflow scheduling method based on instructions stored in the memory.

[0024] This disclosure provides embodiments of a workflow engine, including:

[0025] The workflow instance creation module is configured to create a corresponding workflow instance for the test object based on the parameter values ​​of the task input for the selected workflow template and the test object. The workflow template defines at least one task included in the workflow, and each task corresponds to a certain task type TT.

[0026] The namespace creation module is configured to create a namespace corresponding to the test object and assign a namespace identifier (TID). Within the namespace, different task queues corresponding to different task types are created. The first task is set as the active task. The active task is placed into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0027] The task processing module is configured to receive a request for the first task sent by the task executor. The request carries the TID and TT of the first task. Based on the TID and TT in the request, the module retrieves the first task from the corresponding namespace and task queue and sends it to the task executor. The task executor then performs the corresponding operation on the test object according to the instructions in the first task and returns the execution result.

[0028] In some embodiments, the task processing module is further configured to

[0029] Receive the execution result of the first task returned by the task executor. If the first task has been completed, remove the first task from the corresponding namespace and task queue.

[0030] Determine whether all tasks in the workflow instance corresponding to the test object have been completed. If yes, set the workflow instance corresponding to the test object to the completed state. If no, set the unexecuted second task after the first task as the active task. Place the active task into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0031] Receive a request for the second task from the task executor, the request carrying the TID and TT of the second task;

[0032] Based on the TID and TT in the request, the second task is retrieved from the corresponding namespace and task queue and sent to the task executor so that the task executor can perform the corresponding operation on the test object according to the instructions in the second task and return the execution result.

[0033] This disclosure provides some embodiments of a workflow scheduling system, including:

[0034] Workflow engine; and

[0035] Task executors are deployed in a distributed manner on the test object side. At least one task executor is deployed for each test object. Each task executor is configured to send task requests only for the test objects it is responsible for, or to send task requests only for the test objects and task types it is responsible for.

[0036] Some embodiments of this disclosure propose a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of a workflow scheduling method.

[0037] This disclosure modifies the task queue implementation by introducing a test object namespace. An independent namespace is created for each test object on the workflow engine side, and a unique namespace identifier is assigned. Different task queues are then created within each namespace based on different task types, achieving task isolation for different test objects. The communication mode between the task executor and the workflow engine is also modified. When the task executor sends a task request to the workflow engine, it carries not only the task type but also the namespace identifier of the test object. Upon receiving the task request, the workflow engine first locates a specific test object based on the namespace identifier, then finds the corresponding task queue under the test object's namespace based on the task type, and retrieves the task from the queue and assigns it to the task executor for execution. This allows for the simultaneous management of distributed workflows acting on multiple independent and isolated test objects, ensuring that workflow tasks are accurately assigned to the appropriate task executors and preventing task distribution errors. Attached Figure Description

[0038] The accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. This disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings.

[0039] Obviously, the accompanying drawings described below are merely some embodiments of this disclosure. Those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0040] Figure 1 The diagram illustrates a workflow template creation process according to some embodiments of this disclosure.

[0041] Figure 2 A flowchart illustrating a workflow scheduling method according to some embodiments of this disclosure is shown.

[0042] Figure 3The diagram illustrates a deployment example of an application of a workflow scheduling method according to some embodiments of the present disclosure.

[0043] Figure 4 A schematic diagram of a workflow scheduling system according to some embodiments of the present disclosure is shown.

[0044] Figure 5 A schematic diagram of a workflow engine according to some embodiments of the present disclosure is shown.

[0045] Figure 6 A schematic diagram of a workflow engine according to some embodiments of the present disclosure is shown. Detailed Implementation

[0046] The technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0047] Unless otherwise stated, the terms "first," "second," etc., used in this disclosure are used to distinguish different objects and are not used to indicate size or sequence.

[0048] This disclosure includes components such as a workflow engine, workflow templates, tasks, workflow instances, task executors, and test objects. These are described below.

[0049] The workflow engine is responsible for storing workflow templates, creating, scheduling, and storing workflow instances.

[0050] A workflow template defines several tasks and task types contained in the workflow, but does not specify a specific test object.

[0051] A task refers to a set of instructions that includes several operational instructions and can complete a specific business task.

[0052] A workflow instance is a workflow created based on a workflow template, specifying the specific parameter values ​​of the task and the test object.

[0053] A task executor is a client that can complete a certain type of task; different types of tasks can have different task executors.

[0054] The test object is the target of the instructions in the workflow task.

[0055] Figure 1 The diagram illustrates a workflow template creation process according to some embodiments of this disclosure.

[0056] like Figure 1 As shown, the method of this embodiment includes: 110-120.

[0057] In step 110, the user creates a workflow template containing several tasks according to business needs. The workflow template does not contain specific test object information and can be used for any test object. It is then submitted to the workflow engine.

[0058] In step 120, the workflow engine stores the workflow template.

[0059] This completes the creation and storage of workflow templates.

[0060] Figure 2 A flowchart illustrating a workflow scheduling method according to some embodiments of this disclosure is shown.

[0061] like Figure 2 As shown, the method of this embodiment includes steps 210-260.

[0062] In step 210, the user submits a workflow instance request.

[0063] In the workflow engine, users select a workflow template, input the task parameter values ​​and test objects, and then submit a workflow instance request. A workflow template defines at least one task contained in the workflow, and each task corresponds to a specific task type (TT).

[0064] Methods for inputting test objects for the selected workflow template include: inputting global test objects for the selected workflow template by specifying global test objects in the workflow's global variables; or inputting local test objects for the selected workflow template by specifying local test objects for a single workflow template. The latter method takes precedence over the former method. If a latter method exists, it is executed according to the latter method; otherwise, the former method is executed by default.

[0065] In step 220, the workflow engine creates a corresponding workflow instance for the test object based on the parameter values ​​of the task input for the selected workflow template and the test object.

[0066] In step 230, the workflow engine creates a namespace corresponding to the test object and assigns a namespace identifier (TID). Different task queues corresponding to different task types are created within the namespace. The active task is placed into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0067] A Test Object Command Space (TONS) is introduced on the workflow engine side. Different task queues are then created within the command space based on the task type, which allows for the categorized management of different tasks applied to each test object.

[0068] In step 240, each task executor polls the workflow engine to request job tasks. Assuming the active task is the first task, the workflow engine receives a request for the first task from a task executor, which carries the TID and TT of the first task.

[0069] Each task executor is deployed in a distributed manner on the test object side, with at least one task executor deployed for each test object. Different task types of the test object correspond to different task executors, and each task executor only sends task requests for the test object and task type it is responsible for. Alternatively, one task executor can be deployed for each different task type of the test object, and each task executor only sends task requests for the test object it is responsible for.

[0070] Each task executor is deployed in a distributed manner on the test object side. Each task executor will only receive tasks from its own test object (or its own test object and its own task type), which avoids the situation where task executors are centrally deployed and compete for resources with each other, thus improving the execution efficiency of the task executors.

[0071] When the task executor polls the workflow engine for tasks, it carries the TID and TT, so that the workflow engine can accurately distribute tasks.

[0072] The implementation of task executors is more flexible and not limited by programming languages. They only need to comply with the interface specifications between task executors and workflow engines.

[0073] The task executor actively requests tasks from the workflow engine. Its workload is determined by the methods it implements. The workflow engine only manages and schedules workflows and tasks. The number and existence of task executors are transparent to the workflow engine. The workflow engine focuses on workflow management, while the task executor focuses on task execution, thus decoupling workflow management from task execution.

[0074] In step 250, the workflow engine retrieves the first task from the corresponding namespace and task queue based on the TID and TT in the request, and sends it to the task executor.

[0075] In step 260, the task executor performs the corresponding operation on the test object according to the instructions in the first task, and returns the execution result to the workflow engine.

[0076] Repeat steps 240-260 above to perform other tasks. The following description uses the execution of the second task as an example.

[0077] The workflow engine receives the execution result of the first task returned by the task executor. If the first task is completed, it removes it from the corresponding namespace and task queue. The workflow engine determines whether all tasks in the workflow instance corresponding to the test object have been completed. If yes, the workflow engine sets the workflow instance corresponding to the test object to a completed state. If not, it sets the unexecuted second task after the first task as an active task and places it into the corresponding task queue in the corresponding namespace according to the test object and task type of the active task. The workflow engine receives a request for the second task sent by the task executor, carrying the TID and TT of the second task. Based on the TID and TT in the request, the workflow engine retrieves the second task from the corresponding namespace and task queue and sends it to the task executor. The task executor executes the corresponding operation on the test object according to the instructions in the sent second task and returns the execution result to the workflow engine. If all tasks in the workflow instance corresponding to the test object have been completed, the workflow engine sets the workflow instance corresponding to the test object to a completed state.

[0078] The above embodiments modify the task executor deployment method: changing the task executor deployment from centralized to distributed, deploying the task executor on the test object side to avoid multiple executors competing for resources on a single host. Simultaneously, granting the task executor permission to connect to the workflow engine enables network connectivity.

[0079] The above embodiment modifies the task queue implementation by introducing a test object namespace. An independent namespace is created for each test object on the workflow engine side, and a unique namespace identifier is assigned. Within each namespace, different task queues are created based on different task types, achieving task isolation for different test objects. The communication mode between the task executor and the workflow engine is also modified: when the task executor sends a task request to the workflow engine, it carries not only the task type but also the namespace identifier of the test object. Upon receiving the task request, the workflow engine first locates a specific test object based on the namespace identifier, then finds the corresponding task queue under the test object's namespace based on the task type, and retrieves the task from the queue and assigns it to the task executor for execution. This allows for the simultaneous management of distributed workflows acting on multiple independent and isolated test objects, ensuring that workflow tasks are accurately assigned to the appropriate task executors and preventing task distribution errors.

[0080] This disclosure is applicable, for example, to the management of multiple cloud nodes (such as deployment, testing, etc.), where each cloud node is independent and isolated from the others, all workflows are managed by a unified workflow engine (public platform), and task executors are deployed on jump servers of each cloud node, thereby achieving centralized management and distributed execution of workflows.

[0081] Figure 3 The diagram illustrates a deployment example of an application of a workflow scheduling method according to some embodiments of the present disclosure.

[0082] like Figure 3 As shown, the meanings of each symbol are as follows:

[0083] WP1 – Work Template 1

[0084] AT1-A Mission 1

[0085] BT1-B Type Mission 1

[0086] WP1WI1 - Example 1 created using Workflow Template 1

[0087] WP1WI2 - Example 2 created using Workflow Template 1

[0088] TO1AT1 – Type A Task 1 executed on test object 1

[0089] TO1BT1 – Type B Task 1 executed on test object 1

[0090] TO2AT1 – Type A Task 1 performed on test subject 2

[0091] TO2BT1 – Type B Task 1 performed on test subject 2

[0092] ATQ-A type task queue

[0093] BTQ-B type task queue

[0094] TO1NS – Namespace for Test Object 1

[0095] TO2NS – Namespace for Test Object 2

[0096] TO1AW - Type A task executor on test object 1

[0097] TO1BW-Type B Task Executor on Test Object 1

[0098] TO2AW - Type A task executor on test object 2

[0099] TO2BW-Type B Task Executor on Test Object 2

[0100] The workflow scheduling process is as follows:

[0101] 1) Workflow template WP1 contains two sequentially executed tasks, AT1 and BT1. Two workflow instances, WP1WI1 and WP1WI2, are created based on WP1. The target object of WP1WI1 is test object 1, and the target object of WP1WI2 is test object 2.

[0102] 2) The workflow engine creates namespaces TO1NS and TO2NS for test object 1 and test object 2 respectively. Within these namespaces, two task queues, ATQ and BTQ, are created. The two active tasks, TO1AT1 and TO2AT1, are added to the ATQ queues of TO1NS and TO2NS respectively, entering a waiting state. According to WP1's design, BT1 follows the AT1 task, therefore, TO1BT1 and TO2BT1 are inactive tasks, and the BTQ queues are empty.

[0103] 3) Deploy two task executors, TO1AW and TO1BW, on test object 1 to handle type A and type B tasks respectively. Deploy two task executors, TO2AW and TO2BW, on test object 2 to handle type A and type B tasks respectively. Each task executor polls the workflow engine to obtain tasks.

[0104] 4) TO1AW and TO2AW receive the TO1AT1 and TO2AT1 tasks respectively. After they are executed on their respective test objects, they return the results to the workflow engine.

[0105] 5) When the workflow engine receives the message that task TO1AT1 is complete, it marks TO1AT1 as completed, removes it from the ATQ queue, and sets task TO1BT1 of WP1WI1 as active, adding it to the BTQ queue of TO1NS. Similarly, it adds TO2BT1 to the BTQ queue of TO2NS. At this point, both ATQ queues in both namespaces become empty queues.

[0106] 6) TO1BW polls to obtain the TO1BT1 task, and TO2BW polls to obtain the TO2BT1 task. After they are executed on their respective test objects, they return the results to the workflow engine.

[0107] 7) When the workflow engine receives the message that task TO1BT1 is complete, it sets TO1BT1 to complete and removes it from the BTQ queue. At this point, all tasks of WP1WI1 are completed, and WP1WI1 is set to complete. Similarly, WP1WI2 is set to complete, and all workflow instances are completed.

[0108] Figure 4 A schematic diagram of a workflow scheduling system according to some embodiments of the present disclosure is shown.

[0109] like Figure 4As shown, the workflow scheduling system 400 of this embodiment includes: a workflow engine 500; and task executors 600 deployed in a distributed manner on the test object side. At least one task executor is deployed for each test object, and each task executor is configured to send task requests only for the test objects it is responsible for, or to send task requests only for the test objects and task types it is responsible for.

[0110] Figure 5 A schematic diagram of a workflow engine according to some embodiments of the present disclosure is shown.

[0111] like Figure 5 As shown, the workflow engine 500 of this embodiment includes a memory 510 and a processor 520 coupled to the memory 510. The processor 520 is configured to execute the workflow scheduling method of any of the foregoing embodiments based on instructions stored in the memory 510.

[0112] For example, the workflow engine creates a corresponding workflow instance for the test object based on the parameter values ​​of the task input for the selected workflow template and the test object. The workflow template defines at least one task included in the workflow, and each task corresponds to a certain task type TT. The workflow engine creates a corresponding namespace for the test object and assigns a namespace identifier TID. Different task queues corresponding to different task types are created within the namespace. The first task is set as the active task. According to the test object and task type of the active task, the active task is placed into the corresponding task queue of the corresponding namespace. The workflow engine receives a request for the first task sent by the task executor. The request carries the TID and TT of the first task. Based on the TID and TT in the request, the workflow engine retrieves the first task from the corresponding namespace and task queue and sends it to the task executor so that the task executor can perform the corresponding operation on the test object according to the instructions in the sent first task and return the execution result.

[0113] For example, the workflow engine receives the execution result of the first task returned by the task executor. If the first task is completed, it removes it from the corresponding namespace and task queue. The workflow engine determines whether all tasks in the workflow instance corresponding to the test object have been completed. If not, it sets the unexecuted second task after the first task as the active task and places it into the corresponding task queue in the corresponding namespace according to the test object and task type. The workflow engine receives a request for the second task sent by the task executor, carrying the TID and TT of the second task. Based on the TID and TT in the request, the workflow engine retrieves the second task from the corresponding namespace and task queue and sends it to the task executor, so that the task executor can perform the corresponding operation on the test object according to the instructions in the sent second task and return the execution result. If all tasks in the workflow instance corresponding to the test object have been completed, the workflow engine sets the workflow instance corresponding to the test object to a completed state.

[0114] The memory 510 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, the operating system, application programs, boot loader, and other programs.

[0115] The workflow engine 500 may also include input / output interfaces 530, network interfaces 540, and storage interfaces 550. These interfaces 530, 540, and 550, as well as the memory 510 and processor 520, can be connected via, for example, a bus 560. Specifically, the input / output interface 530 provides a connection interface for input / output devices such as monitors, mice, keyboards, and touchscreens. The network interface 540 provides a connection interface for various networked devices. The storage interface 550 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0116] Figure 6 A schematic diagram of a workflow engine according to some embodiments of the present disclosure is shown.

[0117] like Figure 6 As shown, the workflow engine 500 of this embodiment includes modules 570-590.

[0118] The workflow instance creation module 570 is configured to create a corresponding workflow instance for the test object based on the parameter values ​​of the task input for the selected workflow template and the test object. The workflow template defines at least one task included in the workflow, and each task corresponds to a certain task type TT.

[0119] The namespace creation module 580 is configured to create a namespace corresponding to the test object and assign a namespace identifier TID. Within the namespace, different task queues corresponding to different task types are created. The first task is set as the active task. The active task is placed into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0120] The task processing module 590 is configured to receive a request for the first task sent by the task executor. The request carries the TID and TT of the first task. Based on the TID and TT in the request, the first task is retrieved from the corresponding namespace and task queue and sent to the task executor so that the task executor can perform the corresponding operation on the test object according to the instructions in the sent first task and return the execution result.

[0121] Task processing module 590 is also configured as follows:

[0122] Receive the execution result of the first task returned by the task executor. If the first task has been completed, remove the first task from the corresponding namespace and task queue.

[0123] Determine whether all tasks in the workflow instance corresponding to the test object have been completed. If yes, set the workflow instance corresponding to the test object to the completed state. If no, set the unexecuted second task after the first task as the active task. Place the active task into the corresponding task queue of the corresponding namespace according to the test object and task type of the active task.

[0124] Receive a request for the second task from the task executor, the request carrying the TID and TT of the second task;

[0125] Based on the TID and TT in the request, the second task is retrieved from the corresponding namespace and task queue and sent to the task executor so that the task executor can perform the corresponding operation on the test object according to the instructions in the second task and return the execution result.

[0126] This disclosure provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a workflow scheduling method.

[0127] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more non-transitory computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer program code.

[0128] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0131] The above description is only a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A workflow scheduling method, characterized in that, comprising: the workflow engine creates a workflow instance corresponding to the test object according to the parameter values of the tasks input for the selected workflow template and the test object, the workflow template defining at least one task included in the workflow, each task corresponding to a certain task type TT; the workflow engine creates a namespace corresponding to the test object and assigns a namespace identifier TID, creates different task queues corresponding to different task types in the namespace, sets the first task as an active task, and puts the active task into the corresponding task queue of the corresponding namespace according to the test object and the task type of the active task; the workflow engine receives a request for the first task sent by the task executor, the request carrying the TID and TT of the first task; the workflow engine takes out the first task from the corresponding namespace and task queue according to the TID and TT in the request, and delivers it to the task executor, so that the task executor performs corresponding operations on the test object according to the instructions in the delivered first task, and returns the execution result.

2. The method of claim 1, wherein, Further comprising: the workflow engine receives the execution result of the first task returned by the task executor, and removes the first task from the corresponding namespace and task queue if the first task is executed; the workflow engine judges whether all tasks in the workflow instance corresponding to the test object have been executed, and if not, sets the second task after the first task as an active task, and puts the active task into the corresponding task queue of the corresponding namespace according to the test object and the task type of the active task; the workflow engine receives a request for the second task sent by the task executor, the request carrying the TID and TT of the second task; the workflow engine takes out the second task from the corresponding namespace and task queue according to the TID and TT in the request, and delivers it to the task executor, so that the task executor performs corresponding operations on the test object according to the instructions in the delivered second task, and returns the execution result.

3. The method of claim 2, wherein, Further comprising: if all tasks in the workflow instance corresponding to the test object have been executed, the workflow engine sets the workflow instance corresponding to the test object to a completed state.

4. The method of claim 1, wherein the task executor is distributed and deployed on the test object side, each test object is deployed with at least one task executor, and each task executor only sends task requests of test objects it is responsible for or only sends task requests of test objects and task types it is responsible for.

5. The method of claim 4, wherein, Each test object is deployed with at least one task executor, comprising: different task types of a test object correspond to different task executors, or different task types of a test object correspond to one task executor.

6. The method of claim 1, wherein, Inputting the test object for the selected workflow template comprises: inputting a global test object for the selected workflow template by specifying the global test object in the global variable of the workflow; or, inputting a local test object for the selected workflow template by specifying the local test object for a single workflow template.

7. A workflow engine, comprising: a memory; and a processor coupled to the memory, the processor configured to perform the workflow scheduling method of any one of claims 1-6 based on instructions stored in the memory.

8. A workflow engine characterized by, comprising: a workflow instance creation module configured to create a workflow instance corresponding to the test object according to the parameter values of the tasks input for the selected workflow template and the test object, the workflow template defining at least one task included in the workflow, each task corresponding to a certain task type TT; a namespace creation module configured to create a namespace corresponding to the test object and assign a namespace identifier TID, create different task queues corresponding to different task types in the namespace, set the first task as an active task, and put the active task into the corresponding task queue of the corresponding namespace according to the test object and the task type of the active task; a task processing module configured to receive a request for the first task sent by the task executor, the request carrying the TID and the TT of the first task, take the first task from the corresponding namespace and task queue according to the TID and the TT in the request, and deliver the first task to the task executor, so that the task executor performs a corresponding operation on the test object according to the instructions in the delivered first task and returns an execution result.

9. The workflow engine of claim 8, wherein, the task processing module is further configured to receive the execution result of the first task returned by the task executor, remove the first task from the corresponding namespace and task queue if the first task is executed completely; determine whether all tasks in the workflow instance corresponding to the test object have been executed completely, set the workflow instance corresponding to the test object to a completed state if yes, and set an unexecuted second task after the first task as an active task and put the active task into the corresponding task queue of the corresponding namespace according to the test object and the task type of the active task if no; receive a request for the second task sent by the task executor, the request carrying the TID and the TT of the second task; take the second task from the corresponding namespace and task queue according to the TID and the TT in the request, and deliver the second task to the task executor, so that the task executor performs a corresponding operation on the test object according to the instructions in the delivered second task and returns an execution result.

10. A workflow scheduling system, characterized in that, comprising: the workflow engine of any one of claims 7-9; and the task executor distributed on the test object side, at least one task executor being deployed for each test object, each task executor being configured to send only the task request of the test object responsible for by the task executor or send only the task request of the test object and the task type responsible for by the task executor.

11. A non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the workflow scheduling method of any one of claims 1-6. ​

Citation Information

Patent Citations

  • Security aspects of soa

    US20100162406A1

  • Deep Learning Job Scheduling Method and System and Related Device

    US20210011762A1