Workflow processing method and device, equipment and storage medium

By pre-constructing a decoupled command set to execute code for work nodes associated tasks, the problem that the existing technology cannot expand work node tasks is solved, and the flexibility and customization requirements of workflow configuration are realized.

CN119107045APending Publication Date: 2024-12-10BEIJING 58 INFORMATION TTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411261919.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing workflow configuration engine cannot meet user customization needs, cannot perform additional business logic in the work node, and cannot expand the work tasks that the work node can perform.

Method used

A decoupled command set is pre-built. The commands are encapsulated with task execution code and associate corresponding commands to the work nodes according to the work task execution requirements, so that the work nodes can perform tasks associated with them in addition to executing pre-configured tasks.

Benefits of technology

It realizes the flexibility of workflow configuration, meets users' customized workflow needs, and allows various work tasks to be performed on different work nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107045A_ABST
    Figure CN119107045A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a workflow processing method and device, equipment and a storage medium, and the method comprises the steps: determining a plurality of work nodes corresponding to a to-be-configured target workflow, enabling every two of the plurality of work nodes to have a cascade relation, and enabling each work node to be pre-configured with a first work task; according to the flow type of the target workflow, a plurality of commands are obtained from a pre-constructed command set, and task execution codes corresponding to the second work tasks are packaged in each command; in response to a command configuration operation executed by a user on a target working node according to a plurality of commands, determining an association relationship between the target working node and at least one target command, the target working node being any one of the plurality of working nodes, and the plurality of commands including at least one target command; and generating a configuration result of the target workflow according to the association relationships corresponding to the plurality of working nodes. Through the scheme, the flexibility of workflow configuration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a workflow processing method, apparatus, device and storage medium. Background Art

[0002] A workflow is a process that combines multiple cascading tasks to complete a specific purpose. Generally, a workflow contains multiple work nodes, and each work node requires a corresponding workflow participant to perform the work task corresponding to the work node. During the execution of the workflow, the work tasks corresponding to the work nodes are completed in sequence according to the cascading order of the work nodes in the workflow.

[0003] For example, in the leave approval scenario, a workflow may contain three work nodes in the cascade order of leave application node, supervisor approval node, and manager approval node. In the leave application node, the leave applicant needs to submit a leave application, in the supervisor approval node, the corresponding supervisor needs to make an approval decision to agree or disagree with the leave application, and in the manager approval node, the corresponding manager needs to make an approval decision to agree or disagree with the leave application. After executing the work tasks corresponding to all work nodes in sequence, the leave approval is completed.

[0004] As business scenarios become more complex, the workflow configuration functions provided by existing workflow engines such as Activiti are unable to meet user customization needs. For example, when configuring workflows based on existing workflow engines, each work node can only execute the work tasks pre-configured by the workflow engine developer for the work node. When additional business logic needs to be executed on the work node, it cannot be implemented. Summary of the invention

[0005] Embodiments of the present invention provide a workflow processing method, apparatus, device and storage medium to improve the flexibility of workflow configuration.

[0006] In a first aspect, an embodiment of the present invention provides a workflow processing method, the method comprising:

[0007] Determine a plurality of work nodes corresponding to the target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task;

[0008] According to the process type of the target workflow, multiple commands are obtained from a pre-built command set, each command encapsulating a task execution code corresponding to the second work task;

[0009] In response to a command configuration operation performed by a user on a target working node according to the multiple commands, determining an association relationship between the target working node and at least one target command, the target working node being any one of the multiple working nodes, and the multiple commands including the at least one target command;

[0010] According to the association relationships respectively corresponding to the multiple working nodes, a configuration result of the target workflow is generated, and the configuration result includes the multiple working nodes and at least one target command respectively associated with the multiple working nodes.

[0011] In a second aspect, an embodiment of the present invention provides a workflow processing device, the device comprising:

[0012] A processing module is used to determine a plurality of work nodes corresponding to a target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task; and according to a process type of the target workflow, obtain a plurality of commands from a pre-built command set, wherein each command encapsulates a task execution code corresponding to a second work task;

[0013] A configuration module is used to determine, in response to a command configuration operation performed by a user on a target working node according to the multiple commands, an association relationship between the target working node and at least one target command, wherein the target working node is any one of the multiple working nodes, and the multiple commands include the at least one target command; and generate a configuration result of the target workflow according to the association relationships respectively corresponding to the multiple working nodes, wherein the configuration result includes the multiple working nodes and at least one target command respectively associated with the multiple working nodes.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the workflow processing method described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the workflow processing method described in the first aspect.

[0016] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising: a computer program, when the computer program is executed by a processor of an electronic device, the processor can at least implement the workflow processing method as described in the first aspect.

[0017] An embodiment of the present invention provides a workflow processing method to improve the flexibility of workflow configuration. Specifically, first, multiple work nodes corresponding to the target workflow to be configured are determined, wherein the multiple work nodes have a cascade relationship between each other, and each work node is pre-configured with a first work task. Afterwards, according to the process type of the target workflow, multiple commands are obtained from a pre-built command set, each command encapsulating a task execution code corresponding to a second work task; in response to the command configuration operation performed by the user on the target work node according to the multiple commands, the association relationship between the target work node and at least one target command is determined, the target work node is any one of the multiple work nodes, and the multiple commands include at least one target command. Finally, according to the association relationship between the multiple work nodes and the at least one target command respectively corresponding to each other, a configuration result of the target workflow is generated, and the configuration result includes multiple work nodes and at least one target command respectively associated with the multiple work nodes.

[0018] In this solution, a command set is pre-constructed, and each command of the command set encapsulates the task execution code corresponding to the second work task, wherein the second work task is different from the first work task pre-configured for each work node in the target workflow. In the process of configuring the target workflow, corresponding commands can be associated with each work node according to the work task execution requirements, so that in addition to executing the pre-configured first work task, the work node also executes the second work task corresponding to the command associated with the work node. In this solution, since the commands in the command set are decoupled from the work nodes of the workflow, the command set can be used to flexibly configure commands for each work node, thereby realizing the configuration requirements of executing various work tasks at different work nodes in different workflows, and meeting the user's customized requirements for workflow configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a workflow processing method provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a configuration process of a regularization application workflow provided by an embodiment of the present invention;

[0022] Figure 3 A flowchart of another workflow processing method provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a work task execution process provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of a workflow processing device provided by an embodiment of the present invention;

[0025] Figure 6 For Figure 5 A schematic diagram of the structure of an electronic device corresponding to the workflow processing device provided in the illustrated embodiment. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] 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 the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to 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.

[0028] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0029] Workflow, also known as workflow, is a process that combines multiple work tasks with cascading relationships to complete a specific purpose. Generally, a workflow contains multiple work nodes, and each work node requires a corresponding workflow participant to perform the work task corresponding to the work node. During the execution of the workflow, the work tasks corresponding to the work nodes are completed in sequence according to the cascading order of the work nodes in the workflow.

[0030] In actual applications, there are many open source workflow configuration engines, such as Activit i, Camunda, Flowable, etc. Among them, in the workflow engine, the work tasks to be executed at each work node are pre-configured by the workflow engine developer. In the process of configuring the workflow based on the existing workflow engine, the user can customize the configuration of different work nodes in the workflow to execute the corresponding work tasks at these work nodes. For example: in application scenarios such as personnel management and financial approval, the user can customize the number of work nodes corresponding to a workflow in a specific application scenario, the execution order between work nodes (that is, the cascade relationship between work nodes), and the node information of the work node (for example: in the leave approval workflow, the approver corresponding to a work node), etc. based on the work nodes provided by the workflow configuration engine.

[0031] As enterprise business scenarios become more complex, users have more and more customized needs in the process of configuring workflows. For example, for work nodes used in approval scenarios, users hope that in addition to the approval tasks, they can also perform work tasks corresponding to business logic other than approval tasks (that is, additional work tasks) at a certain work node. For example, in the onboarding scenario, in addition to the approval tasks, at the onboarding approval node, they also hope to be able to perform work tasks such as opening new employee accounts and opening data access rights. However, the existing workflow configuration engine cannot meet the user's customization needs because it cannot expand the work tasks that can be performed at the work node. For example, when it is necessary to execute business logic other than the pre-configured work tasks through a certain work node, it cannot be achieved.

[0032] In order to solve at least one of the above technical problems, an embodiment of the present invention provides a workflow processing method, which pre-constructs a command set decoupled from a work node, wherein the command set includes multiple commands, and each command encapsulates a task execution code corresponding to a work task. In the process of configuring the workflow, corresponding commands can be associated with each work node in the workflow according to the work task execution requirements, so that in addition to executing pre-configured work tasks, the work node can also execute work tasks corresponding to the commands associated with the work node, thereby meeting the user's customized needs for workflow configuration.

[0033] The workflow processing method provided in the embodiment of the present invention can be executed by an electronic device, which can be a terminal device such as a PC, a laptop, a smart phone, or a server. The server can be a physical server including an independent host, or a virtual server, or a cloud server or a server cluster.

[0034] Figure 1A flowchart of a workflow processing method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the following steps may be included:

[0035] 101. Determine a plurality of work nodes corresponding to a target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task.

[0036] 102. According to the process type of the target workflow, multiple commands are obtained from a pre-built command set, each command encapsulating a task execution code corresponding to the second work task.

[0037] 103. In response to a command configuration operation performed by a user on a target working node according to multiple commands, determine an association relationship between the target working node and at least one target command, where the target working node is any one of the multiple working nodes, and the multiple commands include at least one target command.

[0038] 104. Generate a configuration result of the target workflow according to the association relationship between the multiple working nodes and the at least one target command respectively corresponding to the multiple working nodes, where the configuration result includes the multiple working nodes and the at least one target command respectively associated with the multiple working nodes.

[0039] It should be noted that the workflow processing method provided in the embodiment of the present invention is suitable for various scenarios using workflows, such as personnel management and financial approval. The workflow-related examples in this embodiment are only for illustrative purposes and are not used to limit the applicable scenarios of the workflow processing method.

[0040] In the embodiment of the present invention, the task execution code corresponding to the work task written by the developer is encapsulated (for example, the task execution code is encapsulated into an instruction object), and the encapsulation result is a command. By executing the task logic code encapsulated in the command, the execution of the corresponding work task can be realized.

[0041] The command set is a collection of various commands that encapsulate task execution codes of different work tasks. Optionally, through the corresponding application programming interface (API), users can register the commands encapsulated according to the preset encapsulation specifications to the command set; correspondingly, through the corresponding command calling interface, users can associate the commands in the command set with each work node in the workflow, so as to realize the execution of the work tasks corresponding to the commands on the work nodes.

[0042] In the embodiment of the present invention, for the sake of distinction, the work task preconfigured for each work node in the workflow engine is called the first work task, and the work task corresponding to the task execution code encapsulated in each command in the command set is called the second work task.

[0043] In the process of configuring the target workflow, first, multiple work nodes corresponding to the target workflow to be configured are determined. Among them, the multiple work nodes corresponding to the target workflow have a cascade relationship between each other, and the cascade relationship is used to describe the order of flow between multiple work nodes. For example, assuming that the target workflow is an approval flow corresponding to leave approval, the approval flow includes three work nodes: leave application node, supervisor approval node, and manager approval node. Among them, first, the person who needs to take leave submits the leave application at the leave application node; then, enter the supervisor approval node, and the supervisor corresponding to the supervisor approval node makes an approval decision to agree or disagree with the leave application; finally, enter the manager approval node, and the manager corresponding to the manager approval node makes an approval decision to agree or disagree with the leave application. After the manager makes an approval decision to agree or disagree with the leave application at the manager approval node, the approval flow corresponding to the leave approval is completed. In the approval process, the order of flow between the three working nodes, namely, the leave application node, the supervisor approval node, and the manager approval node, is the cascade relationship between the three working nodes. Specifically, the end of the leave application node triggers the start, and the end of the supervisor approval node triggers the start of the manager approval node.

[0044] As a method of optionally determining multiple work nodes corresponding to a target workflow, a workflow configuration interface can be displayed on the interface in response to a target workflow configuration operation triggered by a user. The workflow configuration interface includes multiple work nodes for users to customize, and each work node is pre-configured with a first work task. In response to a work node configuration operation triggered by a user in the workflow configuration interface, such as a selection operation of a work node in the workflow configuration interface, multiple work nodes corresponding to the target workflow to be configured are determined.

[0045] After determining multiple work nodes corresponding to the target workflow to be configured, if there is a work node among the multiple work nodes that needs to execute a second work task in addition to the first work task, a corresponding command is configured for the work node so that the first work task and the second work task can be executed on the work node.

[0046] In an optional embodiment, in order to improve the configuration efficiency between the work node and the command, any command included in the command set encapsulates the process type to which the command applies; when the commands are stored in the command set, they are classified and stored according to the process type. Among them, the process types include but are not limited to: resignation process, leave process, regularization process, transfer process, etc. Optionally, the process type can be customized according to the application scenario of the workflow. Among them, one process type can correspond to multiple commands, and one command belongs to only one process type.

[0047] Based on this, when it is necessary to configure commands for a working node in a target workflow, multiple commands can be obtained from a pre-built command set according to the process type of the target workflow, wherein the process type corresponding to the multiple commands is the same as the process type of the target workflow. Based on the filtering operation of obtaining multiple commands from the command set, the user only needs to select commands configured for the working node from the multiple commands obtained, rather than selecting commands configured for the working node from the full amount of commands in the command set. Therefore, it can effectively reduce the number of commands that users need to process when configuring commands for working nodes, thereby improving the configuration efficiency of commands.

[0048] In the process of configuring commands for the work nodes included in the target workflow, for any one of the multiple work nodes (hereinafter referred to as the target work node), in response to a command configuration operation performed by a user on the target work node according to multiple commands, such as: selecting a command from multiple commands for the target work node to associate, an association relationship between the target work node and at least one target command is determined. The multiple commands include at least one target command, and the at least one target command is also a command selected by the user to associate with the target work node.

[0049] In another optional embodiment, in order to further improve the configuration efficiency between the working nodes and the commands, any command included in the command set also encapsulates the node type to which the command is applicable. The working node configuration operation triggered by the user in the workflow configuration interface also includes: configuring the node types corresponding to the multiple working nodes.

[0050] Among them, optionally, the node type of the work node can be classified according to the function implemented by the work node. For example, the node type may include: approval, questionnaire, instruction document, approval chain, etc. Among them, the approval node is used for process approval. For example, in application scenarios such as leave approval and financial approval, the work nodes that require specific personnel to perform the corresponding approval tasks can all be classified as the "approval" node type. The questionnaire node is used to fill in the questionnaire. In application scenarios such as resignation approval and regularization approval, the work nodes that require applicants or some supervisors to fill in the questionnaire for self-evaluation or leadership evaluation can all be classified as the "questionnaire" node type. The instruction document node is used to download or print relevant documents, such as: resignation certificate. The approval chain node is used to approve upward step by step according to the reporting relationship. In application scenarios such as resignation approval and regularization approval, if a certain node requires multiple people to perform the corresponding approval tasks in a certain order, the node type corresponding to the work node can be determined as "approval chain".

[0051] Based on this, when it is necessary to configure commands for the working node in the target workflow, multiple commands can be obtained from the pre-built command set according to the process type of the target workflow, wherein the process type corresponding to the multiple commands is the same as the process type of the target workflow. Afterwards, multiple first commands are determined from multiple commands according to the node type of the target working node, wherein the node type applicable to the first command is the same as the node type of the target working node. Finally, in response to the command configuration operation performed by the user on the target working node according to the multiple first commands, at least one second command associated with the target working node is determined from the multiple first commands as at least one target command, and the association relationship between the target working node and the at least one target command is determined. Based on the screening operation of obtaining multiple first commands from multiple commands, the user only needs to select commands configured for the working node from the obtained multiple first commands, rather than selecting commands configured for the working node from the commands of the full amount of the command set or from the multiple hits with the same process type as the target workflow screened from the command set. Therefore, the number of commands that the user needs to process when configuring commands for the working node can be further reduced, thereby improving the configuration efficiency of the command.

[0052] After configuring corresponding commands for multiple work nodes of the target workflow, a configuration result of the target workflow is generated according to the association relationship between the multiple work nodes and at least one target command, for example, a configuration instance of the target workflow is generated. The configuration result includes multiple work nodes and at least one target command respectively associated with the multiple work nodes.

[0053] For ease of understanding, let's take the target workflow as the regularization application workflow as an example. Figure 2 Provide explanation. Figure 2 The following is a schematic diagram of the configuration process of a conversion application workflow provided by an embodiment of the present invention. Figure 2 As shown, the command set includes commands corresponding to the resignation process, leave process, and regularization process. The commands corresponding to the resignation process include: C1, C2, C3, and C4, the commands corresponding to the leave process include: C5, C6, C7, and C8, and the commands corresponding to the regularization process include: C9, C10, C11, and C12. Among them, the node type applicable to C9 and C10 is questionnaire, and the node type applicable to C11 and C12 is approval.

[0054] Assuming that the regularization application requires the applicant's self-evaluation, the direct supervisor's evaluation of the applicant, and the approval of the department leader in sequence, in the process of configuring the regularization application workflow, determine the three work nodes corresponding to the regularization application workflow: work node 1, work node 2, and work node 3. Among them, at work node 1, the regularization applicant needs to submit a self-evaluation, and the node type is a questionnaire; at work node 2, the direct supervisor of the regularization applicant needs to submit a leadership evaluation of the regularization applicant, and the node type is a questionnaire; at work node 3, the approval of the department leader is required, that is, whether to agree to the regularization application of the regularization applicant, and the node type is approval.

[0055] When it is necessary to configure commands for work node 1, work node 2, and work node 3, first, according to the process type of the regularization application workflow - regularization process, the commands corresponding to the regularization process are obtained from the command set: C9, C10, C11, and C12. Afterwards, if you want to configure commands for work node 1 or work node 2, according to the node type corresponding to work node 1 or work node 2 - questionnaire, obtain the commands applicable to the node type of questionnaire, namely C9 and C10, from C9, C10, C11 and C12, and determine the corresponding configuration commands for work node 1 or work node 2 based on C9 and C10, for example: configure C9 for work node 1 and configure C10 for work node 2; if you want to configure commands for work node 3, according to the node type corresponding to work node 3 - approval, obtain the commands applicable to the node type of approval, namely C11 and C12 from C9, C10, C11 and C12, and determine the corresponding configuration commands for work node 3 based on C11 and C12, for example: configure C11 and C12 for work node 3. Finally, based on the above configuration operations, determine the association relationship between work node 1 and C9, the association relationship between work node 2 and C10, and the association relationship between work node 3 and C11 and C12; and based on the association relationship between work node 1 and C9, the association relationship between work node 2 and C10, and the association relationship between work node 3 and C11 and C12, determine the configuration result of the regularization application workflow.

[0056] In summary, in an embodiment of the present invention, a command set is pre-constructed, and each command of the command set encapsulates a task execution code corresponding to the second work task, wherein the second work task is different from the first work task pre-configured for each work node in the target workflow. In the process of configuring the target workflow, corresponding commands can be associated with each work node according to the work task execution requirements, so that in addition to executing the pre-configured first work task, the work node also executes the second work task corresponding to the command associated with the work node. In this solution, since the commands in the command set are decoupled from the work nodes of the workflow, the command set can be used to flexibly configure commands for each work node, thereby realizing the configuration requirements of executing various work tasks in different work nodes of different workflows, and meeting the user's customized requirements for workflow configuration.

[0057] The above describes the workflow configuration process. The following describes the workflow application process.

[0058] Figure 3 A flowchart of another workflow processing method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the following steps may be included:

[0059] 301. In response to a target workflow initiation operation triggered by a user, a configuration result of the target workflow is obtained.

[0060] In the embodiment of the present invention, the configuration result of the target workflow may be stored in the workflow execution engine. The workflow execution engine provides a corresponding target workflow initiation interface, through which the user may initiate the target workflow.

[0061] Optionally, before initiating the target workflow, a target workflow initiation verification operation is also included, such as verifying whether the identity information of the user initiating the target workflow meets the preset target workflow initiation conditions, etc. After the verification is passed, the corresponding target workflow initiation interface is called to obtain the configuration result of the target workflow and initiate the target workflow.

[0062] 302. According to the cascading relationship between the multiple work nodes in the configuration result of the target workflow, first work tasks corresponding to the multiple work nodes and second work tasks corresponding to at least one associated target command are executed in sequence.

[0063] It can be understood that the second work task corresponding to at least one target command associated with the target work node in the target workflow may need to be executed before or after executing the first work task corresponding to the target work node in different application scenarios.

[0064] In the embodiment of the present invention, the execution time of the second work task is defined in the command through the do Act ion method and the do After method. Optionally, the command may encapsulate the task execution code of the second work task corresponding to the do Act ion method and / or the task execution code of the second work task corresponding to the do After method.

[0065] For ease of description, in the embodiment of the present invention, the task execution code of the second work task corresponding to the do Act ion method is called the task execution code corresponding to the third work task; the task execution code of the second work task corresponding to the do After method is called the task execution code corresponding to the fourth work task. The task execution code corresponding to the third work task is executed before the first work task, and the task execution code corresponding to the fourth work task is executed after the first work task.

[0066] In a specific implementation process, executing first work tasks corresponding to a plurality of work nodes and second work tasks corresponding to at least one associated target command respectively includes:

[0067] In response to the execution process of the target workflow reaching the target work node, determine whether at least one target command corresponding to the target work node encapsulates the task execution code corresponding to the third work task; if at least one target command corresponding to the target work node encapsulates the task execution code corresponding to the third work task, then before executing the first work task corresponding to the target work node, execute the third work task according to the task execution code corresponding to the third work task.

[0068] In response to the execution process of the target workflow reaching the target work node, determine whether at least one target command corresponding to the target work node encapsulates the task execution code corresponding to the fourth work task; if at least one target command corresponding to the target work node encapsulates the task execution code corresponding to the fourth work task, then after executing the first work task corresponding to the target work node, execute the fourth work task according to the task execution code corresponding to the fourth work task.

[0069] For example, Figure 4 A schematic diagram of a work task execution process provided by an embodiment of the present invention. Figure 4As shown, it is assumed that at least one target command corresponding to the target work node encapsulates the task execution code corresponding to the third work task and the task execution code corresponding to the fourth work task. When the execution process of the target workflow reaches the target work node, that is, after entering the target work node, first, call the do Act ion method to execute the task execution code corresponding to the third work task; after the third work task is executed, execute the first work task preconfigured by the target work node; after the first work task is executed, call the do After method to execute the task execution code corresponding to the fourth work task; after the fourth work task is executed, exit the target work node and enter the next work node cascaded with the target work node in the target workflow.

[0070] Based on the execution process of the above work tasks, it can be known that the third work task and / or the fourth work task included in the second execution task corresponding to a certain work node may have the task execution result transferred between the first work task corresponding to the work node, the work task of the previous work node of the work node (including the first work task and the second work task) or the work task of the next work node (including the first work task and the second work task). Therefore, the command provided in the embodiment of the present invention also includes an object for transferring the context of the work node in the workflow.

[0071] In summary, in the embodiments of the present invention, on the one hand, different work tasks are written into different commands. Since the writing of the commands corresponding to the work tasks is independent of the workflow and decoupled from the workflow, it is convenient and flexible to associate with the work nodes in the workflow to expand the work tasks that can be executed at the work nodes. On the other hand, different commands are configured to the work nodes of the target workflow through a low-code configuration method, which realizes the flexible association of the second work task with the work node. Users can realize specific workflow customization requirements by configuring different command associations for the work nodes. In addition, during the workflow execution process, by configuring the corresponding execution method in the command (for example: do Act ion method, doAfter method), it can ensure that the first work task and the second work task corresponding to the target work node are executed in order at the target work node.

[0072] The workflow processing device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these devices can be configured using commercially available hardware components through the steps taught in this solution.

[0073] Figure 5 A schematic diagram of the structure of a workflow processing device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes: a processing module 11 and a configuration module 12.

[0074] The processing module 11 is used to determine a plurality of work nodes corresponding to the target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task; and according to the process type of the target workflow, a plurality of commands are obtained from a pre-built command set, wherein each command encapsulates a task execution code corresponding to a second work task;

[0075] The configuration module 12 is used to determine the association relationship between the target working node and at least one target command in response to a command configuration operation performed by a user on the target working node according to the multiple commands, wherein the target working node is any one of the multiple working nodes, and the multiple commands include the at least one target command; and generate a configuration result of the target workflow according to the association relationships respectively corresponding to the multiple working nodes, wherein the configuration result includes the multiple working nodes and at least one target command respectively associated with the multiple working nodes.

[0076] Optionally, any one of the commands included in the command set encapsulates a process type and a node type to which the command is applicable.

[0077] Optionally, the configuration module 12 is specifically used to determine multiple first commands from the multiple commands according to the node type of the target working node; in response to the command configuration operation performed by the user on the target working node according to the multiple first commands, determine at least one second command associated with the target working node from the multiple first commands as the at least one target command; and determine the association relationship between the target working node and at least one target command.

[0078] Optionally, the processing module 11 is specifically used to display a workflow configuration interface; in response to a work node configuration operation triggered by a user in the workflow configuration interface, determine multiple work nodes corresponding to the target workflow to be configured, and the node types corresponding to the multiple work nodes respectively.

[0079] Optionally, the processing module 11 is also used to initiate an operation on a target workflow triggered by a user, obtain a configuration result of the target workflow, and execute the first work tasks corresponding to the multiple work nodes and the second work tasks corresponding to the at least one target command in sequence according to the cascade relationship between the multiple work nodes in the configuration result.

[0080] Optionally, the processing module 11 is also specifically used to determine, in response to the execution process of the target workflow reaching the target work node, whether at least one target command corresponding to the target work node encapsulates a task execution code corresponding to a third work task, and the second work task includes the third work task; if at least one target command corresponding to the target work node encapsulates a task execution code corresponding to the third work task, then before executing the first work task corresponding to the target work node, the third work task is executed according to the task execution code corresponding to the third work task.

[0081] Optionally, the processing module 11 is also specifically used to determine, in response to the execution process of the target workflow reaching the target work node, whether at least one target command corresponding to the target work node encapsulates a task execution code corresponding to a fourth work task, and the second work task includes the fourth work task; if at least one target command corresponding to the target work node encapsulates a task execution code corresponding to the fourth work task, then after executing the first work task corresponding to the target work node, the fourth work task is executed according to the task execution code corresponding to the fourth work task.

[0082] Figure 5 The device shown can execute the steps introduced in the aforementioned embodiments. For detailed execution process and technical effects, please refer to the description in the aforementioned embodiments, which will not be repeated here.

[0083] In one possible design, the above Figure 5 The structure of the workflow processing device shown can be implemented as an electronic device, such as Figure 6 As shown, the electronic device may include: a memory 21, a processor 22, and a communication interface 23. The memory 21 stores executable codes, and when the executable codes are executed by the processor 22, the processor 22 can at least implement the workflow processing method provided in the above embodiments.

[0084] In addition, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the workflow processing method provided in the aforementioned embodiment.

[0085] An embodiment of the present invention provides a computer program product, including: a computer program, when the computer program is executed by a processor of an electronic device, the processor is caused to execute the workflow processing method provided in the above-mentioned embodiment.

[0086] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.

[0087] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A workflow processing method, characterized in that: include: Determine a plurality of work nodes corresponding to the target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task; According to the process type of the target workflow, multiple commands are obtained from a pre-built command set, each command encapsulating a task execution code corresponding to the second work task; In response to a command configuration operation performed by a user on a target working node according to the multiple commands, determining an association relationship between the target working node and at least one target command, the target working node being any one of the multiple working nodes, and the multiple commands including the at least one target command; According to the association relationships respectively corresponding to the multiple working nodes, a configuration result of the target workflow is generated, and the configuration result includes the multiple working nodes and at least one target command respectively associated with the multiple working nodes.

2. The method according to claim 1, characterized in that: In response to a command configuration operation performed by a user on the target working node according to the multiple commands, determining an association relationship between the target working node and at least one target command includes: Determining a plurality of first commands from the plurality of commands according to a node type of the target working node; In response to a command configuration operation performed by a user on the target working node according to the plurality of first commands, determining at least one second command associated with the target working node from the plurality of first commands as the at least one target command; Determine an association relationship between the target working node and at least one target command.

3. The method according to claim 1, characterized in that The step of determining a plurality of working nodes corresponding to the target workflow to be configured includes: Display the workflow configuration interface; In response to a work node configuration operation triggered by a user in the workflow configuration interface, a plurality of work nodes corresponding to the target workflow to be configured and node types corresponding to the plurality of work nodes are determined.

4. The method according to claim 1, characterized in that: The method further comprises: In response to a target workflow initiation operation triggered by a user, obtaining a configuration result of the target workflow; According to the cascade relationship between the multiple working nodes in the configuration result, the first working tasks corresponding to the multiple working nodes and the second working tasks corresponding to the at least one target command are executed in sequence.

5. The method according to claim 4, characterized in that The executing the first work tasks respectively corresponding to the multiple work nodes and the second work task corresponding to the at least one target command includes: In response to the execution process of the target workflow reaching the target work node, determining whether at least one target command corresponding to the target work node encapsulates a task execution code corresponding to a third work task, wherein the second work task includes the third work task; If at least one target command corresponding to the target work node encapsulates a task execution code corresponding to the third work task, then before executing the first work task corresponding to the target work node, the third work task is executed according to the task execution code corresponding to the third work task.

6. The method according to claim 4, characterized in that The executing the first work tasks respectively corresponding to the multiple work nodes and the second work task corresponding to the at least one target command includes: In response to the execution process of the target workflow reaching the target work node, determining whether at least one target command corresponding to the target work node encapsulates a task execution code corresponding to a fourth work task, wherein the second work task includes the fourth work task; If at least one target command corresponding to the target work node encapsulates a task execution code corresponding to the fourth work task, then after executing the first work task corresponding to the target work node, the fourth work task is executed according to the task execution code corresponding to the fourth work task.

7. The method according to any one of claims 1 to 6, characterized in that Any command included in the command set encapsulates a process type and a node type to which the command is applicable.

8. A workflow processing device, characterized in that: include: A processing module, used for determining a plurality of work nodes corresponding to a target workflow to be configured, wherein the plurality of work nodes are in a cascade relationship with each other, and each work node is pre-configured with a first work task; According to the process type of the target workflow, multiple commands are obtained from a pre-built command set, each command encapsulating a task execution code corresponding to the second work task; a configuration module, configured to determine, in response to a command configuration operation performed by a user on a target working node according to the multiple commands, an association relationship between the target working node and at least one target command, wherein the target working node is any one of the multiple working nodes, and the multiple commands include the at least one target command; According to the association relationships respectively corresponding to the multiple working nodes, a configuration result of the target workflow is generated, and the configuration result includes the multiple working nodes and at least one target command respectively associated with the multiple working nodes.

9. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the workflow processing method as described in any one of claims 1 to 7.

10. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the workflow processing method according to any one of claims 1 to 7.