Workflow definition processing method, device, and storage medium
By configuring properties that support composite tasks nesting other tasks in the workflow definition, the problem that existing workflow definitions have not been perfected in some dimensions is solved, and the clarity of on-demand nesting between tasks and workflow definitions is improved.
Patent Information
- Application Number
- PCT/CN2024/122608
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-06
- Filing Date
- 2024-09-30
- Publication Date
- 2025-06-12
AI Technical Summary
The existing workflow definitions are not yet perfected in some dimensions, resulting in high user understanding costs and difficulty in meeting the nested needs of complex tasks.
By configuring properties that support composite tasks nesting other tasks in the workflow definition, composite tasks support free nesting, and configuring other tasks nesting composite tasks on demand according to workflow definition requirements.
It realizes on-demand nesting between tasks, expands the ability to define workflows, improves the clarity of workflows, and facilitates users to understand and use workflow services.
Smart Images

Figure CN2024122608_12062025_PF_FP_ABST
Abstract
Description
Workflow definition processing method, device and storage medium Technical Field
[0001] The present disclosure relates to the field of information processing technology, and in particular to a method, device, and storage medium for processing workflow definitions. Background Art
[0002] A workflow is an abstract and general description of the logical rules governing a workflow and its various steps. Workflow definitions use a process definition language to describe and define the logic between steps. During process execution, the workflow service parses the process definition and drives the execution of the relevant tasks. Clearly defining the abstract concept of workflows can reduce user understanding. However, existing workflow definitions still require improvement in several areas. Therefore, improving workflow definitions has become a pressing technical challenge for those skilled in the workflow service field.
[0003] Summary of the Invention
[0004] Various aspects of the present disclosure provide a method, device, and storage medium for processing a workflow definition, which are used to improve the workflow definition and help enhance the clarity of the workflow definition.
[0005] The present disclosure provides a method for processing workflow definitions, including:
[0006] Display the editing interface corresponding to the workflow definition;
[0007] In response to an information editing operation on the workflow definition on the editing interface, generating standard description information of the workflow definition;
[0008] Among them, the standard description information of the workflow definition includes: the definition description information of the composite task; the definition description information of the composite task includes: the attribute information of the composite task; the attribute information of the composite task includes: a first attribute for indicating the starting task of the composite task and a second attribute for supporting the configuration of the composite task to nest other tasks, so as to configure the other tasks nested in the composite task through the second attribute according to the workflow definition requirements; the other tasks include composite tasks and / or atomic tasks.
[0009] The present disclosure also provides a method for processing workflow definitions, including:
[0010] Obtaining workflow definition specification description information and workflow definition requirement information;
[0011] Determine, based on workflow definition requirement information, the name of the target starting task of the target composite task to be defined, the names of other tasks that have a nested relationship with the target composite task, and attribute information of the other tasks;
[0012] Based on the specification description information of the workflow definition, configuring the name of the target starting task for the first attribute of the target complex task, and configuring the names of the other tasks for the second attribute of the target complex task;
[0013] According to the specification description information of the workflow definition and the attribute information of the other tasks, the attributes of the other tasks are configured to obtain the workflow definition of the target complex task.
[0014] The present disclosure also provides a method for processing workflow definitions, including:
[0015] Acquire workflow definition information; the workflow definition information includes: at least one first task and the execution order between the at least one first task; the first task includes at least one execution unit and attribute information guiding the action of the at least one execution unit; the at least one first task includes: a target composite task nested with other second tasks;
[0016] controlling the actions of the execution units in the at least one first task according to the execution order of the at least one first task and based on the attribute information guiding the actions of the at least one execution unit, so as to execute the at least one first task;
[0017] When the target complex task is executed, obtaining the starting task of the target complex task and the task with a completion attribute in the second task from the workflow definition information;
[0018] The target complex task is executed from the start task, and the execution of the target complex task is ended when the task with the completion attribute is executed.
[0019] The present disclosure also provides a computing device, comprising: a memory and a processor; wherein the memory is used to store a computer program;
[0020] The processor is coupled to the memory and configured to execute the computer program to perform the steps in the processing methods defined in the above workflows.
[0021] The embodiment of the present disclosure further provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the steps in the processing methods defined in the above-mentioned workflows.
[0022] In the disclosed embodiments, a property is configured for composite tasks that supports nesting other tasks within them, enabling flexible nesting of composite tasks. Based on this property, when defining a workflow, other tasks can be configured as needed to nest composite tasks within the workflow, enabling on-demand nesting between tasks. This expands and improves workflow definitions, thereby helping to improve the clarity of workflow definitions and making them easier for users of workflow services to understand. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0024] FIG1 is a flow chart of a method for processing workflow definitions provided by an embodiment of the present disclosure;
[0025] FIG2 is an example diagram of an execution unit provided in an embodiment of the present disclosure;
[0026] 3 and 4 are schematic diagrams of the structure of atomic tasks provided by embodiments of the present disclosure;
[0027] FIG5 is a schematic diagram of the structure of a composite task provided by an embodiment of the present disclosure;
[0028] FIG6 is a schematic diagram of the structure of parallel tasks provided by an embodiment of the present disclosure;
[0029] FIG7 is a schematic diagram of the structure of a cyclic task provided by an embodiment of the present disclosure;
[0030] FIG8 is a schematic diagram of the structure of a repetitive task provided by an embodiment of the present disclosure;
[0031] FIG9 is a schematic diagram of the structure of a selection task provided by an embodiment of the present disclosure;
[0032] FIG10 is a flow chart of another method for processing workflow definitions provided by an embodiment of the present disclosure;
[0033] FIG11 is a flow chart of another method for processing workflow definitions provided by an embodiment of the present disclosure;
[0034] FIG12 is a schematic diagram of the structure of a computing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.
[0036] In some embodiments of the present disclosure, a property is configured for composite tasks that supports nesting other tasks within the composite task, enabling flexible nesting of composite tasks. Based on this property, when defining a workflow, other tasks within the composite task can be configured as needed based on workflow definition requirements, enabling on-demand nesting between tasks. This expands the capabilities of workflow definitions and improves workflow definitions, thereby helping to improve the clarity of workflow definitions and facilitate understanding of workflow definitions by users of workflow services.
[0037] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0038] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.
[0039] FIG1 is a flow chart of a method for processing workflow definitions provided by an embodiment of the present disclosure. As shown in FIG1 , the method for processing workflow definitions mainly includes:
[0040] 101. Display the editing interface corresponding to the workflow definition.
[0041] 102. In response to an information editing operation on the workflow definition in the editing interface, generate standard description information of the workflow definition. The standard description information of the workflow definition includes: definition description information of a composite task; the definition description information of the composite task includes: attribute information of the composite task; the attribute information of the composite task includes: a first attribute for indicating the starting task of the composite task and a second attribute for supporting configuration of nested tasks within the composite task, so that the nested tasks within the composite task can be configured according to workflow definition requirements through the second attribute; the other tasks include composite tasks and / or atomic tasks.
[0042] A workflow typically consists of several tasks. These tasks can be simple atomic tasks, such as integration tasks, success, failure, wait, and pass tasks. The integration task state allows you to call services provided by the workflow integration. Pass tasks serve as placeholders for planning the basic structure of the process. If you need to wait for a period of time, you can use the wait task to pause the process. The success state allows you to terminate the process prematurely. The failure state allows you to terminate the process prematurely.
[0043] Among them, the atomic task is the most fine-grained task and may include: a single execution unit (Operation, OP). In this embodiment, the execution unit only has basic execution capabilities and does not have any ability to adjust input and output, or drive transfer. As shown in Figure 2, the execution unit may include: at least one of a service call unit (IntegrationOP), an empty execution unit (NoOP), a failure control execution unit (ErrOP) and a suspension execution unit (SuspendOP). Figure 2 illustrates an example in which the execution unit includes the above four types of execution units, but does not constitute a limitation.
[0044] Among them, the service calling unit is used to call the service integrated by the workflow service. The workflow integrated service includes cloud services and / or local services. Among them, the cloud service is deployed in the cloud server, and the resources or software services can be distributed on the resource pool composed of a large number of computers, so that various application systems can obtain the corresponding resources or software services according to demand. In the embodiment of the present disclosure, the specific content of the service provided by the cloud service is not limited. For example, the cloud service can be a cloud computing service, a cloud communication service, an online education service, an artificial intelligence (AI) service or a live broadcast service, etc. The local service is a service locally integrated with the workflow service, which can be one or more of a local computing service, a local communication service, a local AI service, an empty execution service, a failed execution service and a suspended execution service. Multiple refers to 2 or more. Among them, the empty execution service can be provided by the empty execution unit, the failed execution service can be provided by the failure control unit, and the suspended execution service can be provided by the suspended execution unit.
[0045] The empty execution unit (NoOP) does not perform any actual action, returns the set character, and passes the input of the empty execution unit to the output of the empty execution unit.
[0046] The failure control unit (ErrOP) does not perform actual actions, controls the workflow to fail, returns a set error, and sets the output of the workflow to empty.
[0047] The input of the pause execution unit is duration information, which is used to control the duration of the pause execution unit input of the workflow.
[0048] As shown in Figure 3, the attribute information of an atomic task may include at least one of the following: the name of the atomic task (Name), the transfer node (Next), the completion attribute (End), the skip execution attribute (Skip), the timeout processing attribute (Timeout), and the error handling attribute (OnError). Figure 3 illustrates an example in which the attribute information of an atomic task includes the name of the atomic task (Name), the transfer node (Next), the completion attribute (End), the skip execution attribute (Skip), and the error handling attribute (OnError), and the execution unit included in the atomic task is a service call unit, but this does not constitute a limitation.
[0049] Among them, the name of the atomic task (Name) can be a custom name. The transfer node (Next) indicates the next task to which the atomic task flows after completion. The completion attribute (End) is used to indicate whether the atomic task is the end node of the workflow. The skip execution attribute (Skip) indicates whether to skip the execution of the execution unit that executes the atomic task. The input of the timeout processing attribute (Timeout) is the duration information. If the execution duration of the atomic task exceeds the input duration information, the execution of the atomic task is terminated. The error handling strategy can be set through the error handling attribute (OnError). For example, when a specific error is detected, a specific strategy is retried; or, when a specific error is detected, the task where the error occurs is skipped. Optionally, other tasks can be set to replace the task where the error occurs, that is, when a specific error occurs, the task where the error occurs is skipped and the flow is transferred to the replacement task set for execution. Generally, the tasks of the integration service call unit have error handling attributes. The following is an example of a definition description information of the task of the integration service call unit:
[0050] When defining an actual workflow, the attributes of an atomic task can be flexibly selected based on workflow definition requirements. For example, as shown in Figure 4, an atomic task contains an execution unit called a Pause Execution Unit. The atomic task is named "Test Skip Long Task" and its Skip Execution attribute (Skip) is set to Yes, indicating that the Pause Execution Unit is skipped.
[0051] Accordingly, the workflow definition specification description information may include: atomic task definition description information. Specifically, the atomic task definition description information may include: the name of the execution unit and the atomic task attribute information. The atomic task attribute information is used to guide the actions of the execution unit, such as the Skip execution attribute (Skip) used to guide whether to execute the action of the execution unit; the error handling attribute (OnError) used to guide the termination of the atomic task execution if an error occurs during the execution of the atomic task's execution unit, etc.
[0052] In the disclosed embodiments, in order to improve the workflow definition, it is also possible to support the construction of input parameters and output parameters of tasks at the input and output of tasks. For example, as shown in Figures 3 and 4, an input processing function can be configured at the input end of an atomic task to process the input parameters of the atomic task into input parameters that meet the requirements of the workflow definition. Of course, an output processing function can also be configured at the output end of an atomic task to process the output parameters of the atomic task into output parameters that meet the requirements of the workflow definition. The input processing function and the output processing function can be flexibly set according to the requirements of the workflow definition.
[0053] Optionally, the input processing function and the output processing function can be inline functions, which process input parameters and output parameters, respectively. An inline function is a concept in programming languages that inserts function code directly into the function call location during compilation, rather than executing it through a function call. For example, an inline function can be one or more of a data type conversion function, a string length determination function, a data encoding and decoding function, an array operation function, and a map operation function. "Multiple" refers to two or more types.
[0054] Data type conversion functions are used to convert the data types of input and output parameters. String length functions, such as the Len() function, are used to determine the character length of input and output parameters. Aggregation functions are used to aggregate input and output parameters. Aggregation functions perform calculations on a set of values and return a single value. Examples of aggregation functions include, but are not limited to, average calculation functions (such as the AVG function), maximum calculation functions (such as the MAX function), minimum calculation functions (such as the MIN function), and summation functions (such as the SUM function).
[0055] Map operations are used to establish relationships between objects. For example, a map operation function might be the mapKeys function, which extracts the keys from a JSON object / map[string]any into an array. Alternatively, a map operation function might be the mapValues function, which extracts the values from a JSON object / map[string]any into an array. Alternatively, a map operation function might be the mapValuesPartition function, which extracts the values from a JSON object / map[string]any into an array and partitions the array into multiple arrays in steps.
[0056] Array manipulation functions are functions that operate on arrays. These functions might include the arrayContains function, which determines whether an array contains an element. Alternatively, the arrayUnique function removes duplicate elements from an array. Alternatively, the toArray function converts an input parameter of any length into an array and returns it.
[0057] The implementation forms of the inline functions shown above are merely exemplary and do not constitute a limitation.
[0058] In addition to atomic tasks, workflows can also include complex control tasks, such as Choice tasks, Parallel tasks, MapReduce tasks, and Repeat tasks. Choice tasks allow you to define different execution paths. Parallel states allow you to execute multiple branches in parallel, sharing the same input. MapReduce tasks allow you to process array data in parallel. Repeat tasks accept a count as an input parameter, allowing you to repeat the task for the specified number of times.
[0059] In the disclosed embodiment, in order to improve the workflow definition, some control tasks are abstracted into composite tasks. A composite task refers to an operation step that supports combining and nesting other tasks. A composite task can nest at least one other task. The number of other tasks nested in a composite task can be one or more. "Multiple" means two or more. The multiple other tasks can be tasks of the same type or different types. The other tasks nested in a composite task can be composite tasks or atomic tasks. Of course, the other tasks nested in a composite task can include: atomic tasks and composite tasks.
[0060] For example, as shown in Figure 5, a composite task nests multiple atomic tasks. These multiple atomic tasks can be of the same type or different types. Figure 5 illustrates only two tasks, where both atomic tasks are executed by a service call unit, as an example, but this is not intended to be limiting.
[0061] A composite task and its nested composite tasks (i.e., composite tasks with a nested relationship) can be of the same type. For example, a parallel task can nest other parallel tasks, and a cyclic task can nest other cyclic tasks. Of course, a composite task and its nested composite tasks (i.e., composite tasks with a nested relationship) can also be of different types. For example, a parallel task can nest cyclic tasks, and can also nest repeating tasks; cyclic tasks can also nest repeating tasks, and so on.
[0062] To support task nesting according to workflow definition requirements, a composite task has a first attribute (e.g., the StartAt attribute) that indicates the composite task's starting task. This attribute is used to indicate the composite task's starting task, i.e., the node at which the composite task begins execution. A composite task can also be configured with a second attribute (e.g., the Tasks attribute) that supports the composite task nesting other tasks. The second attribute is a list of other tasks nested within the composite task (e.g., a Task list). Based on this second attribute, other tasks nested within the composite task can be configured according to workflow definition requirements.
[0063] Based on the attribute information of the aforementioned composite tasks, in order to support the ability to nest tasks on demand according to workflow definition requirements, it is necessary to provide standard description information for the relevant workflow definitions. This allows users to edit workflow definitions that meet the workflow definition requirements based on the standard description information. To provide descriptive information for the relevant workflow definitions, in this embodiment, an editing interface corresponding to the workflow definition may be provided. The cloud service provider can use this editing interface to edit the standard description information for the corresponding workflow definition. Accordingly, in step 101, the editing interface corresponding to the workflow definition may be displayed. In the disclosed embodiments, the specific implementation form of the editing interface is not limited. Optionally, the editing interface may be a document editing interface or a domain-specific language (DSL) editing interface. The cloud service provider can use this editing interface to edit the standard description information for the corresponding workflow definition. Accordingly, in step 102, in response to an information editing operation on the editing interface for the workflow definition, standard description information for the workflow definition may be generated. For example, in response to an information editing operation on the editing interface for the workflow definition, the standard description information for the workflow definition edited by the editing operation may be obtained.
[0064] To support the ability to nest tasks as needed based on workflow definition requirements, in this embodiment, the workflow definition's standard description information may include: definition description information for a composite task. The definition description information for a composite task may also include: attribute information for the composite task. The attribute information for the composite task may include: a first attribute (such as the StartAt attribute) indicating the starting task for the composite task, and a second attribute supporting the composite task's nesting of other tasks. The second attribute may be used to configure other tasks within the composite task's nesting based on workflow definition requirements.
[0065] In this embodiment, a property is configured for composite tasks that allows them to nest other tasks, enabling flexible nesting of composite tasks. Based on this property, when defining a workflow, you can configure other tasks within the composite task as needed, based on workflow definition requirements. This allows for on-demand nesting between tasks, expanding and improving workflow definitions. This helps improve the clarity of workflow definitions and facilitates understanding for users of workflow services.
[0066] For a composite task that contains other tasks nested within it, smooth execution requires not only workflow definition for the composite task itself but also workflow definition for the other tasks nested within it. Accordingly, the composite task's definition description information also includes: definition description information for the other tasks nested within it. This definition description information for the other tasks nested within it includes: the execution units contained within the other tasks and attribute information for these other tasks. The attribute information for the other tasks is used to guide the actions of the execution units contained within the task.
[0067] For a composite task, in addition to defining its starting task (i.e., its starting node), it's also necessary to define its ending node, which is the task at which the composite task terminates. Therefore, the attribute information of at least one of the other tasks nested within the composite task includes an ending attribute (i.e., an End attribute), which is used to terminate the composite task when the composite task reaches a task with the ending attribute. The output of the task with the ending attribute is the output of the composite task.
[0068] For a composite task that contains multiple other tasks, the execution order of the composite task must be clarified. Accordingly, the attribute information of the other tasks also includes the transfer node (Next) attribute, which is used to configure the next task to which a task flow transitions. For example, as shown in the following workflow definition of a task named "Task-next", the task is named "Task-next", the type is "Integration Unit", and the execution unit included is: Empty Execution Unit (NoOP). The next task to which the task execution flow transitions is the task named "MyTask2".
[0069] Example of a workflow definition for the "Task-next" task:
[0070] Since composite tasks support combined nesting between tasks, scope is the basis for supporting complex logical nesting. Scope limits the range of availability of names used in a section of program code. If a task contains another task (i.e., a task is nested in another task), the outer task is called the scope of the inner task. If two tasks are tasks of the same level, the scopes of the two tasks are the same. In the scenario where a composite task nests other tasks, the composite task is the scope of the other tasks nested in the composite task. Among them, on-demand flow is supported between other tasks belonging to the same scope. For example, the flow relationship between other tasks belonging to the same scope can be set as needed according to the workflow definition requirements. In this embodiment, the flow relationship between tasks, that is, the order in which tasks are executed, can be set by configuring the transfer node (Next) property of the task.
[0071] Task execution uses and generates a number of data, which are called context. Data is transferred between tasks through input (Input) and output (Output), and each task saves data through context (Context) variables. In the embodiment of the present disclosure, in order to meet the context access requirements, the nested tasks can be set to have a context for accessing their scope. For example, as a context variable of other tasks nested by the composite task, in addition to saving the input parameters and output parameters of the task, it can also save the input parameters of the composite task, and / or the parameters of the workflow where the composite task is located. In this way, other tasks nested by the composite task can access the input parameters of the composite task / or the input parameters of the workflow according to actual needs, thereby expanding the access rights of the nested tasks.
[0072] For example, if task A is nested within task B, then task A is the outer task of task B, and can also be called the parent task. The context variables of task B can save the input parameters and output parameters of task B, as well as the input parameters of the workflow (the workflow where task A and task B are located), and / or the input parameters of task A, etc.
[0073] To enhance workflow definitions, you can also support constructing input and output parameters for compound tasks at their input and output points. Accordingly, you can configure an input processing function at the input of a compound task to process the input parameters into input parameters that meet the workflow definition requirements. Of course, you can also configure an output processing function at the output of a compound task to process the output parameters into output parameters that meet the workflow definition requirements. Input and output processing functions can be flexibly configured to meet workflow definition requirements.
[0074] Based on the characteristics of the aforementioned composite task, in the embodiment of the present disclosure, at least one of a parallel task, a cyclic (MapReduce) task, and a repetitive (Repeat) task can be abstracted as a composite task. That is, the composite task may include: at least one of a parallel task, a cyclic (MapReduce) task, and a repetitive (Repeat) task. Optionally, the composite task may include: a parallel task, a cyclic (MapReduce) task, and a repetitive (Repeat) task. Accordingly, the definition description information of the aforementioned composite task may include: the definition description information of the parallel task, and / or, the definition description information of the cyclic (MapReduce) task, and / or, the definition description information of the repetitive (Repeat) task. The definition description information of the parallel task, the definition description information of the cyclic (MapReduce) task, and the definition description information of the repetitive (Repeat) task are exemplarily described below in conjunction with specific drawings.
[0075] FIG6 is a schematic diagram of the composition of a parallel task provided by an embodiment of the present disclosure. As shown in FIG6 , a parallel task may include multiple parallel branches. Multiple refers to 2 or more. Parallel branches can be implemented as composite tasks, with each parallel branch being a separate scope. A parallel task can be regarded as a task with complex execution units and has the basic attributes of a task. For example, the attribute information of a parallel task may include at least one of: a transfer node (Next) attribute, an error handling (OnError) attribute, a completion attribute (End), a skip execution attribute (Skip), and a timeout handling attribute (Timeout).
[0076] Parallel tasks can also support constructing input and output parameters for parallel tasks at their input and output terminals. Accordingly, an input processing function can be configured at the input terminal of a parallel task to process the input parameters of the parallel task into input parameters that meet the requirements of the workflow definition. Of course, an output processing function can also be configured at the output terminal of a parallel task to process the output parameters of the parallel task into output parameters that meet the requirements of the workflow definition. Regarding the implementation of the input processing function and the output processing function, please refer to the relevant content of the aforementioned embodiment and will not be repeated here.
[0077] Accordingly, the definition description information of the parallel task may include: the attribute information of the parallel task, the parallel branch of the parallel task and the attribute information of the parallel branch. Among them, the attribute information of the parallel task may include: the type (Type) and name (Name) of the parallel task, etc., and of course it may also include the basic attributes of the task, such as at least one of the transfer node (Next) attribute, the error handling (OnError) attribute, the completion attribute (End), the skip execution attribute (Skip) and the timeout handling attribute (Timeout). Since the parallel branch of the parallel task is implemented as a composite task, the attribute information of the parallel branch may include: the attribute information of the composite task, such as the first attribute (used to indicate the starting task of the composite task), that is, the starting node (StartAT) attribute and the second attribute (used to indicate other tasks nested in the composite task), such as the Tasks attribute, etc. The following is an example of the definition description information of a parallel task:
[0078] Example of parallel task definition description:
[0079] Figure 7 is a schematic diagram of the composition of a loop (MapReduce) task provided by an embodiment of the present disclosure. The loop task can process array data in parallel. The input parameters passed into the loop processor (Map Processor) can be aggregated after calculation by the loop processor, and can be processed by the output processing function to obtain the output parameters of the loop task. As shown in Figure 7, the loop task may include multiple loop processors, and multiple means 2 or more. Multiple loop processors are executed in parallel. The loop processor can be implemented as a composite task and have the attributes of a composite task. In the definition description information of the loop task, each loop processor can be implemented as a composite task and defined separately. Accordingly, the attribute information of the loop processor may include: attribute information of the composite task, such as the first attribute (used to indicate the starting task of the composite task), that is, the starting node (StartAT) attribute and the second attribute (used to indicate other tasks nested in the composite task), such as the Tasks attribute, etc.
[0080] The cyclic task can also support the construction of the input parameters and output parameters of the cyclic task at the input and output of the parallel task. Accordingly, an input processing function can be configured at the input end of the cyclic task to process the input parameters of the cyclic task into input parameters that meet the requirements of the workflow definition. Of course, an output processing function can also be configured at the output end of the cyclic task to process the output parameters of the cyclic task into output parameters that meet the requirements of the workflow definition. Regarding the implementation form of the input processing function and the output processing function, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here. The following is an example of a definition description information of a cyclic task:
[0081] Example of a cyclic task definition description:
[0082] Figure 8 is a schematic diagram of the composition of a repetitive (MapReduce) task provided by an embodiment of the present disclosure. As shown in Figure 8, a cyclic task may include multiple repetitive processors, and multiple refers to 2 or more. The number of repetitive processors is determined by the number of times the execution needs to be repeated. The repetitive processor can be implemented as a composite task and has the attributes of a composite task. In the definition description information of the repetitive task, the repetitive processor can be implemented as a composite task. Accordingly, the attribute information of the repetitive processor may include: attribute information of the composite task, such as the first attribute (used to indicate the starting task of the composite task), that is, the starting node (StartAT) attribute and the second attribute (used to indicate other tasks nested in the composite task), such as the Tasks attribute, etc.
[0083] Repeating tasks can also support constructing input parameters and output parameters of repeated tasks at the input and output of repeated tasks. Accordingly, an input processing function can be configured at the input end of the repeated task to process the input parameters of the repeated task into input parameters that meet the requirements of the workflow definition. Of course, an output processing function can also be configured at the output end of the repeated task to process the output parameters of the repeated task into output parameters that meet the requirements of the workflow definition. Regarding the implementation form of the input processing function and the output processing function, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here. The following is an example of a definition description information of a loop task:
[0084] Example of a recurring task description:
[0085] In addition to the aforementioned atomic tasks and composite tasks, a workflow may also include: a choice task. A choice task can define different execution paths. As shown in FIG9 , a choice task only has the function of promoting the occurrence of a transfer according to the execution conditions and is not a composite task. A choice task has multiple branches, where multiple means two or more. Multiple branches may include a default branch, which refers to a branch used to execute a default task, such as executing a certain atomic task by default. The branches of a choice task can be implemented as atomic tasks or as composite tasks. In the present disclosure, multiple branches of a choice task are in the same scope, so different branches support on-demand flow, that is, they can flow according to the workflow definition requirements. For example, in FIG9 , the atomic task of the left branch can point to any task in the composite task of the right branch, that is, the atomic task of the left branch can flow to any task in the composite task of the right branch. The branches of a choice task have two attributes to drive the flow or execution of the choice task. The attribute information of the branches of a choice task includes: an execution condition (Condition) and a transfer node (Next) attribute. The execution condition (Condition) indicates the conditions that need to be met to execute the branch. The transfer node (Next) attribute indicates the next task to which the branch flow transfers.
[0086] In the embodiments of the present disclosure, the specific implementation form of the execution condition is not limited. In some embodiments, the execution condition can be expressed using a logical expression. A logical expression is a formula in which a relational expression or a logical quantity is connected by a logical operator. The value of a logical expression is a logical value, that is, true (true) or false (false). Generally, the Boolean value "1" is used to represent true, and the Boolean value "0" is used to represent false. Accordingly, the execution condition can use a logical expression to calculate the Boolean value, and determine whether to enter a branch based on the Boolean value. For example, the execution condition can be expressed as: $Input.b.b2 == "ready", len("foo")>1 or `b1`in$Input.f&&$Input.b.b1, etc.
[0087] Among them, $Input.b.b2 == "ready" means that the input parameter "b.b2" is true; len("foo")>1 means that the character length of "foo" is greater than 1, which is also true; `b1`in$Input.f&&$Input.b.b1 indicates whether the character "b1" is located in the result of the logical AND of "f" and "b.b1".
[0088] The workflow definition's specification description information may also include: definition description information for a selection task. The definition description information for a selection task is used to describe the attribute information of the multiple branches contained in the selection task. The attribute information of a branch may include: the execution conditions and transfer nodes of the branch. The transfer node is used to configure the task transferred by the branch. The tasks transferred by the branch can be atomic tasks or composite tasks. For example, in Figure 9, the task transferred by the left branch is an atomic task, and the task transferred by the right branch is a composite task.
[0089] The selection task can also support the construction of input parameters and output parameters of the selection task at the input and output of the repetitive task. Accordingly, an input processing function can be configured at the input end of the selection task to process the input parameters of the selection task into input parameters that meet the requirements of the workflow definition. Of course, an output processing function can also be configured at the output end of the selection task to process the output parameters of the selection task into output parameters that meet the requirements of the workflow definition. Regarding the implementation form of the input processing function and the output processing function, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here. The following is an example of a definition description information of the selection task:
[0090] Example of selecting a task's definition description:
[0091] During the actual execution of a workflow, in addition to executing from the start task of the workflow, it can also be executed from a specific target task. The target task can be any task in the workflow. Based on this, in order to realize the execution of the workflow from a specific target task, the workflow definition can be further improved. Accordingly, the specification description information of the workflow definition can also include: the definition description information of the trigger event set for the target task in the workflow. Among them, the definition description information of the trigger event may include: the name of the target task associated with the trigger event and the name of the trigger event, etc. When a trigger event occurs, the workflow can be executed starting from the target task. Among them, an example of the definition description information of the trigger event is as follows:
[0092] The definition description information of the trigger event above indicates that when events event1 and event2 occur, the workflow is executed from the "Pass" task.
[0093] In the embodiments of the present disclosure, the driving form of the trigger event is not limited. In some embodiments, an event-driven architecture (EDA) can be used to drive the trigger event.
[0094] Based on the examples of the execution units and attribute information of each task in the standard description information of the workflow definition provided in the above embodiments, the attribute information of the task and the execution units contained in the task can be configured according to the workflow definition requirements to achieve task expansion. The combination of execution units and attribute information makes the workflow definition more versatile. When calling the execution unit, the execution unit can be called through a network protocol. For example, the execution unit can be called using a protocol such as Hypertext Transfer Protocol (HTTP) or Remote Procedure Call (RPC), but is not limited to this.
[0095] The task-based input processing function and output processing function can realize the construction of input objects and output objects, and improve the scalability of input objects and output objects.
[0096] The above embodiment exemplifies the process of generating the standard description information of the workflow definition and the specific implementation form of the standard description information. Based on the standard description information of the workflow definition, the workflow definition can be generated. The following exemplifies the process of generating the workflow definition.
[0097] FIG10 is a flow chart of another method for processing workflow definitions provided by an embodiment of the present disclosure. The method for processing workflow definitions is mainly used to generate workflow definitions. As shown in FIG10 , the method for processing workflow definitions mainly includes:
[0098] 1001. Obtain workflow definition specification description information and workflow definition requirement information.
[0099] 1002. Obtain, from the workflow definition requirement information, the name of the target starting task of the target composite task to be defined, and the names and attribute information of other tasks that are in a nested relationship with the target composite task.
[0100] 1003. Based on the standard description information of the workflow definition, configure the name of the target start task for the first attribute of the target complex task, and configure the names of other tasks for the second attribute of the target complex task.
[0101] 1004. According to the attribute information of other tasks, configure the attributes of other tasks to obtain a workflow definition of the target complex task.
[0102] In this embodiment, in order to generate a workflow definition that meets the workflow definition requirements, in step 1001, the standard description information of the workflow definition and the workflow definition requirement information can be obtained. For the description of the standard description information of the workflow definition, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here. In this embodiment, the workflow definition requirement information is used to describe the requirements of the workflow definition, including: attribute information of the tasks included in the workflow. Among them, the attribute information of the task includes but is not limited to: type, name, execution unit included in the task and other attribute information that guides the action of the execution unit. The attribute information of different tasks may be different. For the description of the attribute information of different tasks, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here.
[0103] The tasks included in a workflow can include atomic tasks, composite tasks, and / or selection tasks. For atomic tasks, their attribute information can be obtained from the workflow definition requirement information. Based on this attribute information, the atomic task's attributes can be configured to obtain a workflow definition for the atomic task.
[0104] For a composite task, in step 1002, the name of the target starting task of the target composite task to be defined, the names of other tasks that are in a nested relationship with the target composite task, and the attribute information of other tasks can be determined based on the workflow definition requirement information. Among them, the other tasks that are in a nested relationship with the target composite task refer to the other tasks nested by the target composite task. The other tasks nested in the composite task may include: atomic tasks, composite tasks and / or selection tasks. For the description of the implementation form and attribute information of the other tasks nested in the composite task, please refer to the relevant content of the aforementioned embodiment, which will not be repeated here.
[0105] Specifically, the name of the target starting task of the target composite task to be defined and the names of other tasks that are nested within the target composite task can be obtained from the workflow definition requirement information. Furthermore, attribute information of the other tasks nested within the target composite task can be determined based on the workflow definition requirement information. The specific implementation of this step will be described below and will not be elaborated on here.
[0106] Furthermore, in step 1003, based on the standard description information of the workflow definition, the name of the target starting task can be configured for the first attribute of the target composite task, and the names of other tasks nested within the target composite task can be configured for the second attribute of the target composite task. For a description of the first and second attributes of the composite task, please refer to the relevant content of the aforementioned embodiment and will not be repeated here.
[0107] Furthermore, in step 1004, the attributes of other tasks may be configured according to the attribute information of other tasks nested in the target composite task, thereby obtaining a workflow definition of the target composite task.
[0108] In this embodiment, composite tasks are configured with a property that allows them to nest other tasks within them, enabling flexible nesting of composite tasks. This property allows workflows to define tasks based on workflow definition requirements, enabling on-demand nesting of tasks. This expands and improves workflow definitions, helping to improve the clarity of workflow definitions and facilitate understanding for users of workflow services.
[0109] For a composite task, in addition to defining the starting task of the composite task, i.e., the starting node, it is also necessary to define the ending node of the composite task, i.e., which task the composite task ends when it is executed. Therefore, the attribute information of at least one task among the other tasks nested in the composite task includes an ending attribute (i.e., the End attribute), which is used to end the execution of the composite task when the composite task executes a task with the ending attribute. Among them, the output of the task with the ending attribute is the output of the composite task. Accordingly, the workflow definition requirement information may include: the ending node corresponding to the target composite task. Among them, the ending node is at least one task among the other tasks nested in the target composite task.
[0110] For a composite task that nests multiple other tasks, executing the composite task requires clarifying the execution order of the other tasks. Therefore, the workflow definition requirements include attribute information about the other tasks nested within the target composite task, which may include the flow relationships between the other tasks within the target composite task, i.e., the execution order of the other tasks.
[0111] Based on the above analysis, when determining the attribute information of other tasks nested within the target composite task based on workflow definition requirements, the workflow definition requirements can be used to obtain the flow relationships between the other tasks nested within the target composite task and the completion nodes contained in the other tasks. The completion node is at least one task among the other tasks nested within the target composite task.
[0112] Furthermore, the transfer node (Next) attribute information of the other tasks nested within the target composite task can be determined based on the flow relationships between the other tasks within the target composite task; that is, which other task is the transfer node of each other task. Correspondingly, the completion attribute information of the other tasks nested within the target composite task can be determined based on the completion node corresponding to the target composite task, that is, which other task needs to be configured with the completion attribute (End).
[0113] Accordingly, step 1004 can be implemented as follows: configuring the transfer node attributes of other tasks nested within the target composite task based on the transfer node attribute information of these other tasks to determine the execution order of the other tasks nested within the target composite task; and configuring the completion attribute for at least one task serving as a completion node in the other tasks based on the completion attribute (End) information of the other tasks nested within the target composite task. When the target composite task reaches at least one task serving as a completion node, the execution of the target composite task can be terminated.
[0114] In order to improve the workflow definition, it is also possible to support the construction of the input parameters and output parameters of the composite task at the input and output of the composite task. Accordingly, an input processing function can be configured at the input end of the composite task to process the input parameters of the composite task into input parameters that meet the workflow definition requirements. Of course, an output processing function can also be configured at the output end of the composite task to process the output parameters of the composite task into output parameters that meet the workflow definition requirements. The input processing function and the output processing function can be flexibly set according to the workflow definition requirements. Accordingly, the workflow definition requirement information can also include: the input processing function and the output processing function of the target composite task. For the description of the input processing function and the output processing function, please refer to the relevant content of the aforementioned embodiment and will not be repeated here.
[0115] Correspondingly, the input processing function and output processing function of the target composite task can also be obtained from the workflow definition requirement information; the input processing function is configured at the input end of the target composite task to process the input parameters of the target composite task into input parameters that meet the workflow definition requirement information; and the output processing function is configured at the output end of the target composite task to process the output parameters of the composite task into output parameters that meet the workflow definition requirement information.
[0116] For the selection task, the execution conditions and transfer node attribute information of multiple branches of the selection task can be obtained from the workflow definition requirement information; and according to the scale description information of the workflow definition, the execution conditions and transfer nodes of the selection task are configured according to the execution conditions and transfer node attribute information of multiple branches of the selection task to obtain the workflow definition of the selection task.
[0117] Of course, input processing functions and output processing functions can also be configured for atomic tasks and selection tasks. In some embodiments, the workflow includes atomic tasks. The workflow definition requirement information may also include: an input processing function and an output processing function of the atomic task. Based on this, the input processing function and output processing function of the atomic task can be obtained from the workflow definition requirement information; an input processing function can be configured at the input end of the atomic task to process the input parameters of the atomic task into input parameters that meet the workflow definition requirement information; and an output processing function can be configured at the output end of the atomic task to process the output parameters of the atomic task into output parameters that meet the workflow definition requirement information.
[0118] In some other embodiments, a workflow includes a selection task. The workflow definition requirement information may further include an input processing function and an output processing function for the selection task. Based on this, the input processing function and output processing function for the selection task may be obtained from the workflow definition requirement information. The input processing function may be configured at the input end of the selection task to process the input parameters of the selection task into input parameters that meet the workflow definition requirement information. Furthermore, the output processing function may be configured at the output end of the selection task to process the output parameters of the selection task into output parameters that meet the workflow definition requirement information.
[0119] The above embodiments exemplify the generation process of a workflow definition, improve the workflow definition, and enable users to more conveniently understand the workflow definition, thereby improving the clarity of the workflow definition.
[0120] In addition to generating a workflow definition, the embodiment of the present disclosure can also execute a workflow based on the workflow definition. The following is an exemplary description of the execution process of the workflow definition provided by the embodiment of the present disclosure.
[0121] FIG11 is a flow chart of another method for processing workflow definitions provided by an embodiment of the present disclosure. The method is mainly used to execute a workflow based on workflow definition information. As shown in FIG11 , the method mainly includes:
[0122] 1101. Obtain workflow definition information; the workflow definition information includes: at least one first task and the execution order between at least one first task; the first task includes at least one execution unit and attribute information guiding the action of at least one execution unit; at least one first task includes: a target composite task that nests other second tasks.
[0123] 1102. Control the actions of the execution units in the at least one first task according to the execution order of the at least one first task and based on the attribute information guiding the actions of the at least one execution unit, so as to execute the at least one first task.
[0124] 1103. When the target complex task is executed, the starting task of the target complex task and the tasks with completion attributes in the second tasks are obtained from the workflow definition information.
[0125] 1104. Execute the target complex task from the start task, and end the execution of the target complex task when executing a task with a completion attribute.
[0126] In this embodiment, the workflow definition information is a workflow definition generated based on the workflow definition specification description information and workflow definition requirement information. The workflow definition information may include: at least one first task and the execution order between at least one first task. Among them, the execution order between at least one first task is determined by the transfer node (Next) attribute of the first task. The first task includes at least one execution unit and attribute information guiding the action of at least one execution unit. For the description of the execution unit and the attribute information guiding the action of the execution unit, please refer to the relevant content of the aforementioned embodiment and will not be repeated here. Among them, the attribute information guiding the action of the execution unit can also be referred to as the attribute information of the first task.
[0127] Since the workflow definition information defines the execution order between tasks and the guidance information of the execution unit actions contained in the tasks, in order to execute the workflow, the workflow definition information can be obtained in step 1101; and in step 1102, according to the execution order of at least one first task contained in the workflow definition information and based on the attribute information guiding at least one execution unit action contained in the first task, the execution unit action in the first task is controlled to execute the at least one first task and realize the execution of the workflow.
[0128] In this embodiment, the first task may include: an atomic task, a composite task, and / or a selection task. For an embodiment in which the first task includes: a target composite task nested with other second tasks, when the target composite task is executed, in step 1103, the starting task of the target composite task and the tasks with a completion attribute among the second tasks nested within the target composite task may be obtained from the workflow definition information; then, in step 1104, the target composite task may be executed from its actual task, and execution of the target composite task may be terminated when the task with a completion attribute is executed.
[0129] In this embodiment, based on the property that a composite task supports nesting other tasks, other tasks nested within the composite task are configured as needed to obtain workflow definition information. Based on this workflow definition information, the execution of other tasks nested within the composite task can be realized, thus expanding the capabilities of workflow definition and improving workflow definition.
[0130] In some embodiments, the input end and output end of the target composite task are assigned with an input processing function and an output processing function. Accordingly, the workflow definition information may also include: the input processing function and the output processing function of the target composite task. Based on this, the above step 1104 can be implemented as follows: calling the input processing function of the target composite task to process the input parameters of the target composite task to obtain the input parameters of the starting task of the target composite task; inputting the input parameters of the starting task into the starting task and executing the starting task; thereafter, executing the second tasks in sequence according to the flow relationship between other second tasks nested in the target composite task, and when executing a task with a completion attribute, calling the output processing function to process the output parameters of the target composite task to obtain the target output parameters of the target composite task, and ending the execution of the target composite task.
[0131] The above embodiment focuses on the process of executing a complex task based on workflow definition information. Of course, workflow definition information may also include workflow definition information for atomic tasks and / or workflow definition information for selection tasks. For atomic tasks, the execution unit of the atomic task can be executed based on the attribute information of the atomic task. For selection tasks, the branch to be executed can be determined based on the execution conditions of multiple branches of the selection task; and the branch to be executed can be executed based on the workflow definition information of the branch to be executed.
[0132] It should be noted that a workflow can execute first tasks sequentially based on the flow relationship of at least one first task in the workflow definition information. In some embodiments, the first task has a target task configured with a trigger event. The workflow definition information may also include: the name of the target task configured with the trigger event and the trigger event. Accordingly, when a trigger event is detected, the workflow can be executed from the target task, thereby achieving event triggering of the workflow.
[0133] It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 101 and 102 can be device A; for another example, the execution entity of step 101 can be device A, and the execution entity of step 102 can be device B; and so on.
[0134] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The sequence numbers of the operations, such as 101, 102, etc., are merely used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
[0135] Accordingly, an embodiment of the present disclosure further provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the processing methods defined in the above-mentioned workflows.
[0136] Figure 12 is a schematic diagram of the structure of a computing device provided by an embodiment of the present disclosure. As shown in Figure 12, the computing device may include: a memory 12a and a processor 12b. The memory is used to store computer programs.
[0137] The processor 12b is coupled to the memory 12a and is configured to execute the computer program to execute the steps of the workflow definition processing method provided in the above embodiments. Specific implementations of each step can be found in the related descriptions of the above embodiments and will not be repeated here.
[0138] In some optional embodiments, as shown in FIG12 , the computing device may further include optional components such as a power supply component 12d, a display component 12e, and an audio component 12f. FIG12 schematically illustrates only some of the components, and does not imply that the computing device must include all of the components shown in FIG12 , nor does it imply that the computing device can only include the components shown in FIG12 .
[0139] In addition, the components within the dashed box in Figure 12 are optional components, not required components, and their specific configuration depends on the product form factor of the computing device. The computing device of this embodiment can be implemented as a terminal device such as a desktop computer, laptop computer, mobile phone, or IoT device; it can also be various server devices such as a traditional server, cloud server, or server cluster.
[0140] For example, for the embodiment of the workflow definition processing method provided in the aforementioned embodiment for generating standard description information of the workflow definition, the computing device may include: a display component 12e, and displaying an editing interface corresponding to the workflow definition through the display component 12e.
[0141] In the embodiments of the present disclosure, the memory is used to store computer programs and can be configured to store various other data to support operations on the device where it is located. The processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0142] In the embodiments of the present disclosure, the processor may be any hardware processing device that can execute the logic of the above method. Optionally, the processor may be a central processing unit (CPU), a graphics processing unit (GPU), or a microcontroller unit (MCU); or a programmable device such as a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD); or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but is not limited thereto.
[0143] In an embodiment of the present disclosure, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology or other technologies.
[0144] In an embodiment of the present disclosure, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0145] In an embodiment of the present disclosure, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0146] In an embodiment of the present disclosure, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component further includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user may be achieved through the audio component.
[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0148] It should also be noted that the descriptions such as "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types.
[0149] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.
[0150] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0151] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0152] 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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0153] In a typical configuration, a computing device includes one or more processors (CPU, etc.), input / output interfaces, network interfaces, and memory.
[0154] Memory may include non-permanent storage in a computer-readable medium, random-access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0155] Computer storage media is readable storage media, also known as computer-readable media. Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0156] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the aforementioned elements.
[0157] The above contents are merely examples of the present disclosure and are not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure. Industrial Applicability
[0158] The solution provided by the disclosed embodiments can be applied to the process of improving workflow definitions. By configuring a property for a composite task during workflow definition that supports nesting of other tasks within the composite task, composite tasks can be freely nested. Based on this property, during workflow definition, other tasks within the composite task can be configured as needed according to workflow definition requirements, enabling on-demand nesting between tasks. This expands the capabilities of workflow definitions and improves workflow definitions. This helps improve the clarity of workflow definitions and facilitates understanding for users of workflow services.
Claims
1. A method for processing workflow definitions, wherein: include: Display the editing interface corresponding to the workflow definition; In response to an information editing operation on the workflow definition on the editing interface, generating standard description information of the workflow definition; Among them, the standard description information of the workflow definition includes: the definition description information of the composite task; the definition description information of the composite task includes: the attribute information of the composite task; the attribute information of the composite task includes: a first attribute for indicating the starting task of the composite task and a second attribute for supporting the configuration of the composite task to nest other tasks, so as to configure the other tasks nested in the composite task through the second attribute according to the workflow definition requirements; the other tasks include composite tasks and / or atomic tasks.
2. The method according to claim 1, wherein: The definition description information of the composite task also includes: definition description information of the other tasks; The definition description information of the other tasks includes: attribute information of the execution unit and the other tasks; the attribute information of the other tasks is used to guide the actions of the execution unit; the attribute information of at least one of the other tasks includes: a completion attribute, which is used to end the execution of the composite task when the composite task executes to the at least one task.
3. The method according to claim 1, wherein: Any task saves its input parameters and output parameters through context variables; the context variables of other tasks nested by the composite task also save the input parameters of the composite task and / or the input parameters of the workflow where the composite task is located so that the other tasks can access the input parameters of the composite task and / or the workflow.
4. The method according to any one of claims 1 to 3, wherein: The composite task supports configuring an input processing function; the input processing function is used to process the input parameters of the composite task into input parameters that meet the requirements of the workflow definition; The composite task supports configuring an output processing function; the output processing function is used to process the output parameters of the composite task into output parameters that meet the requirements of the workflow definition.
5. The method according to claim 4, wherein: The input processing function and the output processing function are inline functions.
6. The method according to any one of claims 1 to 3, wherein: The specification description information of the workflow definition also includes: definition description information of a selection task, wherein the definition description information of the selection task is used to describe the attribute information of multiple branches included in the selection task; the multiple branches are in the same scope, and the multiple branches support on-demand flow; The attribute information of the multiple branches includes: execution conditions and transfer nodes of the multiple branches; the transfer nodes are used to configure the tasks transferred by the multiple branches; the tasks transferred by the multiple branches are atomic tasks or compound tasks.
7. The method according to claim 6, wherein: The selection task supports configuring an input processing function; the input processing function is used to process the input parameters of the selection task into input parameters that meet the workflow definition requirements; The selection task supports configuring an output processing function; the output processing function is used to process the output parameters of the selection task into output parameters that meet the workflow definition requirements.
8. The method according to any one of claims 1 to 3, wherein: The specification information of the workflow definition also includes: definition description information of atomic tasks; the atomic tasks include a single execution unit and attribute information guiding the action of the single execution unit; The attribute information guiding the action of the single execution unit includes: at least one of the name, transfer node, completion attribute, skip execution attribute, timeout processing attribute and error processing attribute of the single execution unit.
9. The method according to claim 8, wherein: The atomic task supports configuring an input processing function; the input processing function is used to process the input parameters of the atomic task into input parameters that meet the workflow definition requirements; The atomic task supports configuring an output processing function; the output processing function is used to process the output parameters of the atomic task into output parameters that meet the workflow definition requirements.
10. The method according to any one of claims 1 to 3, wherein: The specification description information also includes: definition description information of the trigger event set for the target task in the workflow; the definition description information of the trigger event includes: the name of the target task associated with the trigger event and the name of the trigger event, so that when the trigger event occurs, the workflow is executed starting from the target task.
11. A method for processing workflow definitions, wherein: include: Obtaining workflow definition specification description information and workflow definition requirement information; Determine, according to the workflow definition requirement information, the name of the target starting task of the target composite task to be defined, the names of other tasks that are in a nested relationship with the target composite task, and the attribute information of the other tasks; Based on the specification description information of the workflow definition, configuring the name of the target start task for the first attribute of the target composite task, and configuring the names of the other tasks for the second attribute of the target composite task; According to the specification description information of the workflow definition and the attribute information of the other tasks, the attributes of the other tasks are configured to obtain the workflow definition of the target complex task.
12. The method according to claim 11, wherein: Also includes: Acquire the input processing function and the output processing function of the target complex task from the workflow definition requirement information; configuring the input processing function at the input end of the target complex task to process the input parameters of the target complex task into input parameters that meet the workflow definition requirement information; The output processing function is configured at the output end of the target complex task to process the output parameters of the target complex task into output parameters that meet the workflow definition requirement information.
13. A method for processing workflow definitions, wherein: include: Get workflow definition information; The workflow definition information includes: at least one first task and at least one The execution order between the first tasks; the first task includes at least one execution unit and attribute information guiding the action of the at least one execution unit; the at least one first task includes: a target composite task nested with other second tasks; According to the execution order of the at least one first task and based on the attribute information guiding the action of the at least one execution unit, control the action of the execution unit in the at least one first task to execute the at least one first task; When the target complex task is executed, obtaining the starting task of the target complex task and the tasks with completion attributes in the second tasks from the workflow definition information; The target complex task is executed from the start task, and the execution of the target complex task is terminated when the task with the completion attribute is executed.
14. A computing device, wherein: include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 13.
15. A computer-readable storage medium storing computer instructions, wherein: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
A workflow processing method and device
CN109978380A
Workflow management system supporting complex workflow structure
CN110516000A
Task processing method and device and storage medium
CN112527471A
Work order processing method, device and system and electronic equipment
CN113298331A
Workflow engine implementation method and device, electronic equipment and storage medium
CN113961332A