A workflow instance submission method, system, device and storage medium
By pre-drawing and publishing workflow information, setting up standardized interfaces, and performing permission checks and data consistency verification, the workflow instance creation and startup efficiency and security issues under the requirements of external systems are solved, and efficient and secure workflow instance management is achieved.
Patent Information
- Application Number
- CN202411151310.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the construction of enterprise informationization, how to efficiently and securely create and start workflow examples according to external system needs poses problems such as poor flexibility, high cost and data security risks.
By pre-drawing and publishing workflow information, setting up standardized interfaces, receiving requests from external systems and performing permission verification, ensuring data consistency and integrity, and achieving efficient creation and startup of workflow instances.
Improve the efficiency and flexibility of creating workflow instances, ensure data security and correct execution of business processes, and reduce the risk of data security risks and business process execution errors.
Smart Images

Figure CN119046361B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of workflow management and enterprise informatization, and specifically to a workflow instance submission method, system, device and storage medium. Background Art
[0002] With the continuous deepening of enterprise informatization construction, workflow technology has been widely used in various business scenarios to realize the automated management of business processes. However, in actual applications, due to the differences between different systems, how to create, start and submit workflow instances according to the requirements of external systems has become an urgent problem to be solved.
[0003] At present, some enterprises use customized interfaces to achieve the interaction between external systems and workflow engines in internal systems, but this approach has poor flexibility, high costs, and is difficult to adapt to business changes. Other enterprises use standardized interfaces, but due to the lack of effective permission verification and data integrity verification mechanisms, there are risks of data security risks and business process execution errors.
[0004] Therefore, how to efficiently and securely create, start and submit workflow instances based on the needs of external systems for workflow instances is an important challenge facing the current field of workflow technology. Summary of the invention
[0005] In order to efficiently and securely create and start a workflow instance and submit it to an external system to meet the needs of the external system, the present application provides a workflow instance submission method, system, device and storage medium.
[0006] In a first aspect, the present application provides a method for submitting a workflow instance, comprising:
[0007] Draw the workflow in advance and define the workflow ID, register and store the information of the external system and its users, and set up a standardized interface for connecting with the external system; after each workflow is drawn, publish the workflow information containing the workflow ID to the pre-registered external system;
[0008] Receive a workflow instance creation request uploaded by an external system through a standardized interface, and workflow instance data associated with the workflow instance creation request; the workflow instance data associated with the workflow instance creation request includes a workflow definition ID, an external system ID, a user account ID, external system business data, and an external system business data ID;
[0009] When a request for workflow instance creation is received, a permission check is performed on the workflow instance data associated with the request for workflow instance creation; the permission check includes: checking whether it originates from a pre-registered external system, checking whether it originates from a pre-registered user, and checking whether the user account ID has the permission to create and start the workflow instance; if the check result shows that the request for workflow instance creation originates from a registered system and a registered user, and the user account ID has the corresponding permission, then the workflow instance is created and started according to the received workflow definition ID, external system business data and external system business data ID, and the generated workflow instance is returned to the external system.
[0010] By adopting the above solution, the workflow is pre-set and relevant information is published to the external system, which achieves the goal of efficiently creating and starting workflow instances based on external system requests, improving work efficiency and flexibility. At the same time, the mechanism design of permission verification ensures the security and accuracy of data received from the external system and reduces data security risks.
[0011] Preferably, it also includes:
[0012] Update the version of the drawn workflow and define the workflow ID of the version update;
[0013] Each time a workflow is updated, a mapping table is created, which contains the mapping relationship between the workflow ID after the version update and the workflow ID before the version update; each time a workflow is updated, the workflow information containing the workflow ID of the version update is published to the external system that has been pre-registered and stored;
[0014] When creating and starting a workflow instance, if the workflow ID corresponding to the current update version is not found, the process definition ID corresponding to the current update version that has a mapping relationship with the received workflow definition ID is searched based on the mapping table to create and start the workflow instance.
[0015] By adopting the above solution, in order to optimize the workflow, version updates will be continuously performed and published to external systems in a timely manner. However, considering that some users of external systems have not viewed the version update information in a timely manner, a mapping table of different version mapping relationships is created accordingly, thereby facilitating the timely generation of more optimized workflow instances.
[0016] Preferably, it also includes:
[0017] Before creating and starting a workflow instance, verify and pre-process the workflow instance data associated with the workflow instance creation request for data consistency and integrity;
[0018] The data consistency and integrity verification and preprocessing include: performing data consistency verification on the workflow instance data associated with the request for workflow instance creation according to preset data fields and format rules, and adjusting the data that does not conform to the preset data fields and format rules; performing data integrity verification on the workflow instance data associated with the request for workflow instance creation according to the data required for workflow creation and startup, and performing compensation processing on the missing data, including: calculation compensation, historical query compensation and interaction compensation;
[0019] The calculation compensation includes: calling the corresponding calculation script for the partially missing business data, and calculating the received part of the business data to fill the missing data; the historical query compensation includes: searching the historical cache database for the business data uploaded historically with the same external system ID and user account ID for the partially missing business data, and using the found historical uploaded business data to fill the missing business data; the interactive compensation includes: generating data compensation information for the missing data, and receiving compensation data uploaded by an external system with the same external system ID through a standardized interface.
[0020] By adopting the above solution, taking into account the possibility that external users fail to upload the data required for the workflow instance according to the relevant information published in the pre-set workflow, a data consistency and complete verification mechanism is designed to ensure the smooth creation and startup of the workflow instance and reduce the risk of business process execution errors.
[0021] Preferably, it also includes:
[0022] Constructing a business data adaptive process model, wherein the model adopts a deep learning model and is generated by training using a workflow ID and business data required by the workflow corresponding to the workflow ID;
[0023] If it is found during the data integrity verification process that the missing data is the workflow ID, the received external business data is input into the business data adaptive process model to obtain the output workflow ID.
[0024] By adopting the above solution, considering that external users fail to upload the workflow ID according to the relevant information published in the pre-set workflow, the relevant workflow is adaptively matched according to the uploaded business data to reduce the steps of repeated interaction with users and generate workflow instances more efficiently.
[0025] Preferably, it also includes:
[0026] After starting the workflow instance, monitor in real time whether there are any errors in the workflow instance generation process; once an error is detected in the workflow instance generation process, save the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks;
[0027] When each workflow is pre-drawn, a backup workflow is generated and the ID of the backup workflow is defined. The corresponding backup workflow ID is searched based on the current workflow ID.
[0028] Switch the backup workflow according to the backup workflow ID, continue to execute the tasks of the workflow instance based on the task execution status of the workflow instance and the intermediate calculation data, external system business data and external system business data ID corresponding to the executed tasks, generate a workflow instance, and return the generated workflow instance to the external system.
[0029] By adopting the above solution, the workflow instance generation process is monitored in real time to see if there are any errors. When an error occurs, the backup workflow is promptly switched to continue generating the workflow instance to ensure the submission progress of the workflow instance.
[0030] Preferably, the method further comprises: when an error occurs in the workflow instance generation process and when a creation request of the currently received workflow instance is detected to be in a high concurrency state;
[0031] Based on the current version of the workflow ID, the corresponding simplified version of the workflow ID is searched to replace the backup workflow ID; wherein, when the drawn workflow is updated, the number of tasks of each version of the workflow is divided into levels of version complexity, and workflows in different task number ranges are matched with corresponding levels of version complexity, and the simplified version of the workflow is a workflow with a lower level of version complexity than the current version of the workflow;
[0032] Switch the simplified version of the workflow according to the simplified version of the workflow ID, continue to execute the tasks of the workflow instance based on the task execution status of the workflow instance and the intermediate calculation data, external system business data and external system business data ID corresponding to the executed tasks, generate a workflow instance, and return the generated workflow instance to the external system.
[0033] By adopting the above solution, when an error occurs in the workflow instance generation process and it is detected that the workflow instance creation request is in a high concurrency state, in order to generate the workflow instance as quickly as possible, a simplified version of the workflow is switched to ensure efficient creation and submission of the workflow instance.
[0034] Preferably, it also includes: counting the frequency of repeated requests for creating workflow instances uploaded with the same external system ID and user account ID; when the counted frequency of repeated requests is greater than a preset frequency, it is determined that an abnormality exists in the external system corresponding to the external system ID and the user account ID, an abnormality reminder message is generated and returned to the corresponding external system, and requests for creating workflow instances are temporarily stopped from being received.
[0035] By adopting the above solution, the frequency of repeated workflow instance creation requests sent by external users is monitored, abnormal status of the external system is discovered in time, and invalid creation of work implementation examples is prevented, which causes waste of resources.
[0036] In a second aspect, the present application provides a workflow instance submission system, comprising:
[0037] The workflow instance generation pre-configuration module is used to pre-draw the workflow and define the workflow ID, register and store the information of the external system and its users, and set up a standardized interface for connecting with the external system; each time a workflow is drawn, the workflow information containing the workflow ID is published to the pre-registered external system;
[0038] A workflow instance creation request receiving module, used to receive a workflow instance creation request uploaded by an external system through a standardized interface, and workflow instance data associated with the workflow instance creation request; the workflow instance data associated with the workflow instance creation request includes a workflow definition ID, an external system ID, a user account ID, external system business data, and an external system business data ID;
[0039] The workflow instance generation and submission module is used to perform permission verification on the workflow instance data associated with the workflow instance creation request when a workflow instance creation request is received; the permission verification includes: verifying whether it comes from a pre-registered external system, verifying whether it comes from a pre-registered user, and verifying whether the user account ID has the workflow instance creation permission and startup permission; if the verification result shows that the workflow instance creation request comes from a registered system and a registered user, and the user account ID has the corresponding permission, then the workflow instance is created and started according to the received workflow definition ID, external system business data and external system business data ID, and the generated workflow instance is returned to the external system.
[0040] By adopting the above solution, it is possible to efficiently and securely create and start workflow instances and submit feedback based on requests from external systems.
[0041] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method as described above.
[0042] In a fourth aspect, the present application provides a computer device, comprising a memory, a processor, and a program stored and executable on the memory, wherein the program implements the steps of the above method when executed by the processor.
[0043] In summary, this application has the following beneficial effects:
[0044] 1. By pre-setting and publishing workflow information, ensure that external systems can understand and efficiently create corresponding workflow instances based on demand requests; receive requests and data through standardized interfaces to meet the requests of multiple external systems for workflow instance creation, with universality and scalability; through permission verification and data consistency and integrity mechanism design, ensure that authorized external systems and users have the permission to request the creation of work implementation examples, reducing data security risks and the risk of business process execution errors;
[0045] 2. By creating a mapping table, the correlation between workflow versions before and after the update is realized, and the optimized workflow instances are provided to users in a timely manner;
[0046] 3. By building a business data adaptive process model and using deep learning technology for training and optimization, when data integrity verification finds that the workflow definition ID is missing, the possible workflow ID can be predicted based on the received business data, further improving the system's intelligence and data processing capabilities, and ensuring the correct creation of workflow instances;
[0047] 4. Through intelligent error detection, flexible process switching, data synchronization and other aspects of the workflow instance generation process, the continuity and robustness of workflow instance generation are ensured, and various sudden error situations can be effectively dealt with. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flowchart of a workflow instance submission method described in a specific embodiment;
[0049] Figure 2 It is a diagram of data flow in the workflow instance submission method described in the specific embodiment;
[0050] Figure 3 It is a structural diagram of the workflow instance submission system described in the specific embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] Example 1
[0053] like Figure 1 As shown, the embodiment of the present application discloses a workflow instance submission method, and the specific steps are as follows:
[0054] S1. Pre-configure and publish the basic content for workflow instance creation and submission.
[0055] Specifically, a plurality of workflows are pre-drawn, including workflow nodes, tasks corresponding to each workflow node, etc., and a workflow ID is defined for each workflow.
[0056] Pre-register and store information about external systems and their users; the information about external systems includes the unique identifier of the external system, such as the ID, name, address, etc. of the external system; the user information about external systems includes the user account ID and the permissions granted to the user account, such as the permission to create a workflow instance and the permission to start a workflow instance.
[0057] Pre-set standardized interfaces for connecting to external systems, such as API interfaces.
[0058] In addition, in order to facilitate users of external systems to obtain workflow information in a timely manner to select the required workflow instances and achieve efficient workflow instance acquisition; during the pre-configuration process, each time a workflow is drawn, the corresponding workflow information containing the workflow ID is published to the pre-registered external system; the workflow information also includes: workflow node information, task information corresponding to each workflow node, and data required for workflow creation and startup, etc.
[0059] S2. Receive requests and data for workflow instance creation uploaded by external systems through standardized interfaces.
[0060] Specifically, Figure 2 As shown, the external system generates a request for workflow instance creation based on the workflow instance required by itself, and transmits the workflow instance data associated with the request for workflow instance creation. The workflow instance data associated with the request for workflow instance creation includes: the workflow definition ID selected and input by the user, the external system ID, the user account ID, the external system business data and the external system business data ID; wherein the external business data also includes: other business field data for constructing form data.
[0061] Receive workflow instance creation requests uploaded by external systems through standardized interfaces, and store the workflow instance data associated with the workflow instance creation requests accordingly; taking into account the reception of multiple workflow instance creation requests, adopt a queue mechanism to sort the obtained workflow instance creation requests in the order of reception.
[0062] S3. When a request for creating a workflow instance is received, permission verification is performed on the workflow instance data associated with the request for creating the workflow instance.
[0063] Specifically, the permission verification includes:
[0064] Verify whether it originates from a pre-registered external system; that is, compare the ID of the stored external system with the ID of the received external system. If the ID of the stored external system contains an external system ID that is the same as the ID of the currently received external system, the verification result shows that the request to create the workflow instance originates from the registered system.
[0065] Verify whether it comes from a pre-registered user; that is, compare the stored user account ID with the received user account ID. If the stored user account ID contains the same user account ID as the currently received user account ID, the verification result shows that the request to create the workflow instance comes from a registered user.
[0066] And verify whether the user account ID has the permission to create and start workflow instances; that is, compare the permissions of the user account corresponding to the stored user account ID according to the received user account ID. If there is a user account ID in the stored user account ID that is the same as the currently received user account ID and the user account ID has the permission to create and start workflow instances, the verification result shows that the user account ID has the corresponding permissions.
[0067] In addition, considering that the permission verification of the workflow instance data associated with the request for workflow instance creation also includes verifying the working status of the external system to ensure that it is in a normal operating state; therefore, the method also includes: counting the frequency of repeated requests for workflow instance creation (the same workflow instance data) uploaded by the same external system ID and user account ID; when the frequency of repeated requests for workflow instance creation uploaded by the same external system ID and user account ID that meets the statistics is greater than a preset frequency (manually set), it is determined that there is an abnormality in the external system corresponding to the external system ID and the user account ID, and an abnormal reminder message is generated and returned to the corresponding external system, and the request for workflow instance creation is temporarily stopped, and the request for workflow instance creation is resumed when the normal operating status information feedback from the external system is received.
[0068] S4. Create and start a workflow instance based on the verification result, and return the generated workflow instance to the external system.
[0069] Specifically, when the verification result shows that the request for creating a workflow instance comes from a registered system and a registered user, and the user account ID has the authority to create a workflow instance, the workflow instance is created according to the received workflow definition ID, external system business data, and external system business data ID; when the verification result shows that the request for creating a workflow instance comes from a registered system and a registered user, and the user account ID has the authority to start the workflow instance, the workflow instance is started according to the received workflow definition ID, external system business data, and external system business data ID; after starting, the workflow instance can be started according to business needs
[0070] The request flows downward and returns the generated workflow instance to the external system.
[0071] By adopting the solution described in this embodiment, a workflow instance can be efficiently and securely created and generated according to a request from an external system, and submitted to the external system, thereby meeting the external system's need to efficiently and securely obtain the workflow instance.
[0072] Example 2
[0073] The difference between this embodiment and embodiment 1 is that it also includes a step of updating the version of the workflow.
[0074] Specifically, the drawn workflow is updated and the workflow ID of the version update is defined; for example, for the order approval workflow, version 1.0, version 2.0, and version 3.0 are drawn, and the corresponding defined workflow IDs are: D0253, V1.0, D0253, V2.0, and D0253, V3.0.
[0075] Each time a workflow is updated, a corresponding mapping table is created, which includes the mapping relationship between the workflow ID after the version update and the workflow ID before the version update; for further query convenience, the generated mapping table can be further integrated, such as: D0253, V1.0-D0253, V2.0-D0253, V3.0.
[0076] Every time a version of a workflow is updated, the workflow information including the workflow ID of the updated version is published to the pre-registered external system; that is, the external system can obtain the updated workflow information in a timely manner.
[0077] When creating and starting a workflow instance, if the workflow ID corresponding to the current update version is not found, for example, the workflow ID uploaded by the external system is D0253, V2.0, and the workflow ID of the order approval process corresponding to the current update version is D0253, V3.0; the process definition ID corresponding to the current update version that has a mapping relationship with the received workflow definition ID is searched according to the mapping table, so as to create and start the workflow instance.
[0078] The solution described in this embodiment is adopted to enhance the flexibility and adaptability of efficiently and securely creating and generating workflow instances according to requests from external systems.
[0079] Example 3
[0080] The difference between this embodiment and embodiment 1 or embodiment 2 is that before creating and starting a workflow instance, it also includes the steps of verifying and preprocessing the data consistency and integrity of the associated workflow instance data.
[0081] Specifically, according to preset data fields and format rules, such as data format, range, length and other preset rules, the associated workflow instance data is verified, and the data that does not meet the rules is adjusted.
[0082] At the same time, the data required for workflow creation and startup is obtained based on the workflow information, and the associated workflow instance data is verified. If missing data is found, corresponding compensation processing is performed. For example, the data required for order approval process creation and startup includes: order information, customer information, product information, inventory information, payment information and other business data.
[0083] Data compensation processing includes various methods, such as calculation compensation, historical query compensation and interactive compensation.
[0084] Calculation compensation refers to calling calculation scripts to calculate and fill in the missing data for some missing business data, where some missing business data refers to business data with corresponding calculation scripts. For example, if the remaining inventory data information is missing, the remaining inventory data information calculation script can be called to determine that the remaining inventory data is the total inventory data minus the sold inventory data, then the total inventory data and the sold inventory data are searched and subtracted to obtain the missing business data.
[0085] Historical query compensation refers to searching the historically uploaded business data with the same external system ID and user account ID from the historical cache database to fill in the missing data. The partially missing business data refers to the business data with corresponding historical uploads. In addition, in order to ensure the timeliness of business data as much as possible, the historical cache database caches business data uploaded within a period of time adjacent to different external system IDs and user account IDs, and the cached business data corresponding to each separate external system ID and user account ID is stored in chronological order, with the latest data at the top of the cache for quick search and access.
[0086] Interactive compensation refers to generating corresponding data compensation information for missing data and receiving corresponding compensation data for missing data uploaded by an external system with the same external system ID.
[0087] By adopting the solution described in this embodiment, the accuracy and completeness of the received data can be ensured, thereby reducing the risk of business process execution errors caused by data problems and ensuring the correct creation and execution of workflow instances.
[0088] Example 4
[0089] The difference between this embodiment and Embodiment 3 is that, considering the situation that the workflow definition ID is missing in the workflow instance data associated with the workflow instance creation request uploaded by the external system, a step of designing and constructing a business data adaptive process model is correspondingly performed.
[0090] Specifically, a business data adaptive process model is constructed. Considering that the business data required for creating and starting different workflows are different and relatively specific, the model adopts a deep learning model and is trained and generated using the workflow ID and the business data required by the workflow corresponding to the workflow ID; the input of the model is the received business data, and the output of the model is the workflow ID corresponding to the workflow that requires the received business data.
[0091] If it is found during the data integrity verification process that the missing data is the workflow ID, the business data received from the external system is input into the business data adaptive process model to obtain the output workflow ID; the output workflow ID is combined with other received associated workflow instance data to realize the creation and start of the workflow instance.
[0092] The solution described in this embodiment is adopted to further improve the intelligence level and data processing capability, and ensure the efficient and correct creation of workflow instances.
[0093] Example 5
[0094] The difference between this embodiment and Embodiment 3 is that a step of handling errors in the generation process of the workflow instance is added.
[0095] Specifically, after starting the workflow instance, the error detection model is used to monitor in real time whether errors occur in the workflow instance generation process; once an error is detected in the workflow instance generation process, the task execution status of the workflow instance (executed tasks, tasks being executed, and tasks to be executed) and the intermediate calculation data corresponding to the executed tasks are saved. Among them, the error detection model is constructed using deep learning technology, and is specifically generated by training historical workflow instances marked with specific error types, including the existence of some unexecuted tasks, errors in the order of executing different tasks, etc.
[0096] When each workflow is pre-drawn, a corresponding backup workflow is generated and the ID of the backup workflow is defined, and the corresponding backup workflow ID is searched based on the current workflow ID; the backup workflow and the corresponding workflow are identical in workflow nodes and tasks corresponding to each workflow node, and other details may differ in the requirements for some business data.
[0097] Switch the backup workflow according to the backup workflow ID, and continue to circulate the workflow instance based on the task execution status of the workflow instance and the intermediate calculation data, external system business data and external system business data ID corresponding to the executed tasks, that is, continue to execute the remaining unexecuted tasks, generate workflow instances, and return the generated workflow instances to the external system.
[0098] In addition, considering that the creation request of the workflow instance by the external system may be in a high-concurrency state (high-concurrency request state), in order to further improve the efficiency of workflow instance submission and relieve the pressure of computing resources, the method further includes: when an error occurs in the workflow instance generation process and when a creation request of the workflow instance currently received is detected to be in a high-concurrency request state;
[0099] Based on the current version of the workflow ID, the corresponding simplified version of the workflow ID is searched to replace the backup workflow ID; wherein, when the drawn workflow is updated, the version complexity level is divided according to the number of tasks of each version of the workflow, and workflows in different task number ranges are matched with corresponding levels of version complexity; the simplified version of the workflow is a workflow with a lower version complexity level than the current version of the workflow.
[0100] In this embodiment, the version complexity levels are divided into the first level to the fourth level. The first level of the corresponding version complexity is when the number of tasks in the workflow is [x1, x2), the second level of the corresponding version complexity is when the number of tasks in the workflow is [x2, x3), the third level of the corresponding version complexity is when the number of tasks in the workflow is [x3, x4), and the fourth level of the corresponding version complexity is when the number of tasks in the workflow is greater than x4.
[0101] Switch the simplified version of the workflow according to the simplified version of the workflow ID, continue to circulate the workflow instance based on the task execution status of the workflow instance and the intermediate calculation data, external system business data and external system business data ID corresponding to the executed tasks, continue to execute the remaining unexecuted tasks, generate a workflow instance, and return the generated workflow instance to the external system.
[0102] The solution described in this embodiment is adopted to further improve the intelligence level and ensure efficient and correct creation of workflow instances.
[0103] like Figure 3 As shown, the embodiment of the present application also discloses a workflow instance submission system, which is recorded as an internal system and specifically includes:
[0104] The workflow instance generation pre-configuration module 101 is used to pre-draw the workflow and define the workflow ID, register and store the information of the external system and its users, and set the standardized interface for connecting with the external system; each time a workflow is drawn, the workflow information containing the workflow ID is correspondingly published to the pre-registered external system;
[0105] It is also used to perform version updates on the drawn workflow and define the workflow ID for the version update;
[0106] Each time a workflow is updated, a mapping table is created, which contains the mapping relationship between the workflow ID after the version update and the workflow ID before the version update; each time a workflow version is updated, the workflow information containing the workflow ID of the version update is published to an external system that is pre-registered and stored.
[0107] The workflow instance creation request receiving module 102 is used to receive a workflow instance creation request uploaded by an external system through a standardized interface, and workflow instance data associated with the workflow instance creation request; the workflow instance data associated with the workflow instance creation request includes a workflow definition ID, an external system ID, a user account ID, external system business data, and an external system business data ID;
[0108] It is also used to count the frequency of repeated requests for creating workflow instances uploaded with the same external system ID and user account ID. When the counted frequency of repeated requests is greater than the preset frequency, it is determined that an abnormality exists in the external system corresponding to the external system ID and the user account ID, and an abnormality reminder message is generated and returned to the corresponding external system, and requests for creating workflow instances are temporarily stopped.
[0109] The workflow instance generation and submission module 103 is used to perform permission verification on the workflow instance data associated with the workflow instance creation request when receiving the workflow instance creation request; the permission verification includes: verifying whether it comes from a pre-registered external system, verifying whether it comes from a pre-registered user, and verifying whether the user account ID has the workflow instance creation permission and start permission; if the verification result shows that the workflow instance creation request comes from a registered system and a registered user, and the user account ID has the corresponding permission, then the workflow instance is created and started according to the received workflow definition ID, external system business data and external system business data ID, and the generated workflow instance is returned to the external system;
[0110] Also used for creating and starting a workflow instance, if the workflow ID corresponding to the current updated version is not found, searching the mapping table for the process definition ID corresponding to the current updated version that has a mapping relationship with the received workflow definition ID, thereby creating and starting the workflow instance;
[0111] It is also used to verify and preprocess the data consistency and integrity of the workflow instance data associated with the request for workflow instance creation before creating and starting the workflow instance; to build a business data adaptive process model, which adopts a deep learning model and is trained and generated using the workflow ID and the business data required for the workflow corresponding to the workflow ID; if it is found during the data integrity verification process that the missing data is the workflow ID, the received external business data is input into the business data adaptive process model to obtain the output workflow ID.
[0112] The system further includes: a workflow instance generation monitoring module 104, which is used to monitor in real time whether an error occurs in the workflow instance generation process after the workflow instance is started; once an error is detected in the workflow instance generation process, save the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed task;
[0113] When each workflow is pre-drawn, a backup workflow is generated and its ID is defined. The corresponding backup workflow ID is searched based on the current workflow ID. The backup workflow is switched based on the backup workflow ID. The workflow task is continued to be executed in combination with the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed task, the external system business data and the external system business data ID. The workflow instance is generated and returned to the external system.
[0114] It is also used to monitor errors in the workflow instance generation process and to monitor that the creation request of the currently received workflow instance is in a high concurrency state; based on the current version workflow ID, the corresponding simplified version workflow ID is searched to replace the backup workflow ID; wherein, when the drawn workflow is updated, the version complexity level is divided according to the number of tasks of each version of the workflow, and workflows in different task number ranges are matched with corresponding levels of version complexity, and the simplified version of the workflow is a workflow with a lower version complexity level than the current version of the workflow; the simplified version of the workflow is switched according to the simplified version of the workflow ID, and the task of the workflow instance is continued to be executed in combination with the task execution status of the workflow instance and the intermediate calculation data, external system business data and external system business data ID corresponding to the executed task, the workflow instance is generated, and the generated workflow instance is returned to the external system.
[0115] The embodiment of the present application also discloses a computer-readable storage medium.
[0116] Specifically, the computer-readable storage medium stores a computer program that can be loaded by a processor and execute the workflow instance submission method as described above. The computer-readable storage medium includes, for example, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0117] The embodiment of the present application also discloses a computer device.
[0118] Specifically, the computer device includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute the above workflow instance submission method.
[0119] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
Claims
1. A method for submitting a workflow instance, characterized in that: include: Pre-map out the workflow and define the workflow , register and store information about external systems and their users, and set up standardized interfaces for connecting with external systems; Each time a workflow is drawn, the corresponding release contains the workflow workflow information to pre-registered external systems; Receive a workflow instance creation request uploaded by an external system through a standardized interface, and workflow instance data associated with the workflow instance creation request; the workflow instance data associated with the workflow instance creation request includes a workflow , External Systems , User Account , external system business data and external system business data ; When a request for workflow instance creation is received, the workflow instance data associated with the request for workflow instance creation is checked for permissions; the permission check includes: checking whether it comes from a pre-registered external system, checking whether it comes from a pre-registered user, and checking the user account. Whether there is permission to create and start workflow instances; if the verification result shows that the request to create a workflow instance comes from a registered system and a registered user, and the user account If you have the corresponding permissions, you can follow the received workflow , external system business data and external system business data Create and start a workflow instance, and return the generated workflow instance to the external system; Also includes: Update the version of the drawn workflow and define the workflow for the version update ; Each time a workflow is updated, a mapping table is created, which contains the workflow after the version update. Workflow before version update The mapping relationship between them; each time a version of the workflow is updated, the workflow containing the updated version is released The workflow information is transferred to the external system that is pre-registered and stored; When creating and starting a workflow instance, if no workflow corresponding to the current update version is found , then based on the mapping table lookup and received workflow Workflow corresponding to the current update version with mapping relationship , thereby creating and starting a workflow instance; Also includes: After starting the workflow instance, monitor in real time whether there are any errors in the workflow instance generation process; once an error is detected in the workflow instance generation process, save the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks; When each workflow is drawn in advance, a backup workflow is generated and the backup workflow is defined. , based on the current workflow Find the corresponding backup workflow ; According to the backup workflow Switch to the backup workflow, combining the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks, external system business data and external system business data Continue to execute the tasks of the workflow instance, generate the workflow instance, and return the generated workflow instance to the external system; Also includes: It is detected that an error occurs in the workflow instance generation process, and it is detected that the creation request of the currently received workflow instance is in a high concurrency state; Based on the current version workflow Find the corresponding simplified version of the workflow Workflow to find backups with replacement ; When updating the drawn workflow, the number of tasks in each version of the workflow is divided into different levels of version complexity. Workflows with different task numbers are matched with corresponding levels of version complexity. The simplified version of the workflow is a workflow with a lower level of version complexity than the current version of the workflow. According to the simplified version of the workflow Switch to a simplified version of the workflow, combining the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks, external system business data, and external system business data Continue to execute the tasks of the workflow instance, generate the workflow instance, and return the generated workflow instance to the external system.
2. The method for submitting a workflow instance according to claim 1, characterized in that: Also includes: Before creating and starting a workflow instance, verify and pre-process the workflow instance data associated with the workflow instance creation request for data consistency and integrity; The data consistency and integrity verification and preprocessing include: performing data consistency verification on the workflow instance data associated with the request for workflow instance creation according to preset data fields and format rules, and adjusting the data that does not conform to the preset data fields and format rules; performing data integrity verification on the workflow instance data associated with the request for workflow instance creation according to the data required for workflow creation and startup, and performing compensation processing on the missing data, including: calculation compensation, historical query compensation and interaction compensation; The calculation compensation includes: calling the corresponding calculation script for the partially missing business data, calculating the received part of the business data to fill the missing data; the historical query compensation includes: searching the external system from the historical cache database for the partially missing business data and user account The same historical uploaded business data is used to fill the missing business data; the interactive compensation includes: generating data compensation information for the missing data, receiving data with the same external system Compensation data uploaded by external systems through standardized interfaces.
3. The method for submitting a workflow instance according to claim 2, characterized in that: Also includes: Build a business data adaptive process model using a deep learning model and workflow , Workflow Business data training and generation required by the corresponding workflow; Missing data found during data integrity verification is a workflow , then the received external business data is input into the business data adaptive process model to obtain the output workflow .
4. The method for submitting a workflow instance according to claim 1, characterized in that: Also includes: Count the frequency of repeated requests created by workflow instances uploaded by the same user account in the same external system; when the frequency of repeated requests counted is greater than the preset frequency, the user account is considered If an exception occurs in the corresponding external system, an exception reminder message is generated and returned to the corresponding external system, and the request to create a workflow instance is temporarily stopped.
5. A workflow instance submission system, characterized in that: include: Workflow instance generation pre-configured module for pre-drawing workflows and defining workflows , register and store information about external systems and their users, and set up standardized interfaces for connecting with external systems; Each time a workflow is drawn, the corresponding release contains the workflow The workflow information is transferred to the pre-registered external system; it is also used to update the version of the drawn workflow and define the workflow for the version update ; Each time a workflow is updated, a mapping table is created, which contains the workflow after the version update. Workflow before version update The mapping relationship between them; each time a version of the workflow is updated, the workflow containing the updated version is released The workflow information is transferred to the external system that is pre-registered and stored; The workflow instance creation request receiving module is used to receive a workflow instance creation request uploaded by an external system through a standardized interface and workflow instance data associated with the workflow instance creation request; the workflow instance data associated with the workflow instance creation request includes a workflow instance creation request. , External Systems , User Account , external system business data and external system business data ; The workflow instance generation and submission module is used to perform permission verification on the workflow instance data associated with the workflow instance creation request when receiving the workflow instance creation request; the permission verification includes: verifying whether it comes from a pre-registered external system, verifying whether it comes from a pre-registered user, and verifying the user account. Whether there is permission to create and start workflow instances; if the verification result shows that the request to create a workflow instance comes from a registered system and a registered user, and the user account If you have the corresponding permissions, you can follow the received workflow , external system business data and external system business data Create and start a workflow instance, and return the generated workflow instance to the external system; also used when creating and starting a workflow instance, if no workflow corresponding to the current update version is found , then based on the mapping table lookup and received workflow Workflow corresponding to the current update version with mapping relationship , thereby creating and starting a workflow instance; The workflow instance generation monitoring module is used to monitor whether there are errors in the workflow instance generation process in real time after the workflow instance is started; once an error is detected in the workflow instance generation process, the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks are saved; When each workflow is drawn in advance, a backup workflow is generated and the backup workflow is defined. , based on the current workflow Find the corresponding backup workflow ; According to the backup workflow Switch to the backup workflow, combining the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks, external system business data and external system business data Continue to execute the tasks of the workflow instance, generate the workflow instance, and return the generated workflow instance to the external system; It is also used to detect errors in the workflow instance generation process and to detect that the creation requests of the currently received workflow instances are in a high concurrency state; Based on the current version workflow Find the corresponding simplified version of the workflow Workflow to find backups with replacement ; When updating the drawn workflow, the number of tasks in each version of the workflow is divided into different levels of version complexity. Workflows with different task numbers are matched with corresponding levels of version complexity. The simplified version of the workflow is a workflow with a lower level of version complexity than the current version of the workflow. According to the simplified version of the workflow Switch to a simplified version of the workflow, combining the task execution status of the workflow instance and the intermediate calculation data corresponding to the executed tasks, external system business data, and external system business data Continue to execute the tasks of the workflow instance, generate the workflow instance, and return the generated workflow instance to the external system.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 4.
7. A computer device, characterized in that: The computer device comprises a memory, a processor and a program stored and executable on the memory, and the program implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.
Citation Information
Patent Citations
Process node interface unification method and device, equipment and storage medium
CN117234467A