A method and device for responding to process instance change data

By establishing a trigger mapping library for waiting event nodes and data names of process instances in the workflow system, efficient monitoring and response to process instance data changes is achieved, and the problem of low data change monitoring efficiency in the prior art is solved.

CN114443440BActive Publication Date: 2025-05-16CHINABANK PAYMENT (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210120475.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-07
Publication Date
2025-05-16
Estimated Expiration
2042-02-07

AI Technical Summary

Technical Problem

The monitoring method of process instance data changes in existing workflow systems is inefficient, resulting in waste of resources and limited response speed.

Method used

By obtaining the waiting event node collection in the process definition of the process instance, filter out the target waiting event nodes related to data changes, and establish a trigger mapping library for the target waiting event node and data name, monitor data changes in real time and trigger corresponding responses.

Benefits of technology

Improves the efficiency and response speed of process instance data monitoring, avoids resource waste, and does not increase the complexity of process definition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443440B_ABST
    Figure CN114443440B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for responding to process instance change data, including: obtaining a node set of waiting events in a process definition of a process instance; obtaining a node of a target waiting event in the node set; obtaining the data name of the process instance corresponding to the node of the target waiting event; establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; in response to a change in the data corresponding to the data name in the trigger mapping library, triggering the node of the target waiting event associated with the data name to respond. By obtaining the node of the target waiting event in the process instance and obtaining the data name of the process instance related to the node, a trigger mapping library representing the relationship between the two is established, and by obtaining the changed data of the process instance and searching the mapping relationship in the trigger mapping library, the node of the target waiting event corresponding to the changed data is triggered to respond, thereby improving the process instance data monitoring efficiency and response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network technology, and in particular to a method and device for responding to process instance change data. Background Art

[0002] In the existing workflow system-related business, it is necessary to monitor the changes in the data of a process instance in order to make corresponding responses to waiting events. In the existing technology, the background usually polls all process instance data at fixed time intervals. As long as there is a data change, a corresponding action is taken. For this data change monitoring method, for data that does not change frequently, if polling is performed at fixed time intervals, it will cause a waste of resources and affect the efficiency of data change monitoring. Summary of the invention

[0003] The present invention discloses a method and device for responding to data changes of a process instance, so as to solve the defects of low efficiency and low response speed in the data change monitoring method of the process instance in the workflow system in the prior art, and realize efficient monitoring of data changes of the process instance in the workflow system and timely response.

[0004] The present disclosure provides a method for responding to process instance change data, including:

[0005] Get the node set of waiting events in the process definition of the process instance;

[0006] Obtain the target node waiting for the event in the node set;

[0007] Obtain the data name of the process instance corresponding to the node of the target waiting event;

[0008] Establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance;

[0009] In response to a change in the data corresponding to the data name in the trigger mapping library, a node of a target waiting event associated with the data name is triggered to respond.

[0010] According to a method for responding to process instance change data provided by the present disclosure, obtaining a node set of waiting events in a process definition of the process instance specifically includes:

[0011] Define each node of the process instance to form the process definition of the process instance;

[0012] Obtain each node of the waiting event in the process definition to form a node set of the waiting event.

[0013] According to a method for responding to process instance change data provided by the present disclosure, the step of obtaining a target node waiting for an event in the node set specifically includes:

[0014] A node in the node set related to the data change of the process instance is obtained, and the node is used as the target waiting event node; wherein the triggering of the target waiting event node is related to the data change of the process instance.

[0015] According to a method for responding to process instance change data provided by the present disclosure, the trigger mapping library for establishing a target wait event node and associating the data name of the process instance specifically includes:

[0016] The target waiting event node and the corresponding process instance data name are stored in the trigger mapping library in a matching form; wherein one data name matches at least one target waiting event node.

[0017] According to a method for responding to process instance data changes provided by the present disclosure, in response to a change in data corresponding to a data name in the trigger mapping library, triggering a node of a target waiting event associated with the data name to respond, specifically includes:

[0018] Execute the process instance and obtain the changed data;

[0019] Storing the data name corresponding to the changed data into the first set;

[0020] Acquire, according to the trigger mapping library, a node of a pre-response target waiting event corresponding to each data name in the first set;

[0021] The nodes that trigger the target waiting events of each pre-response respectively respond.

[0022] According to a method for responding to process instance data changes provided by the present disclosure, executing the process instance and obtaining the changed data specifically includes:

[0023] Get the first snapshot of data when the process instance starts;

[0024] Get the second snapshot of the data when the process instance is executed;

[0025] The first snapshot is compared with the second snapshot to obtain changed data.

[0026] According to a method for responding to process instance change data provided by the present disclosure, the step of acquiring a node of a pre-response target waiting event corresponding to each data name in a first set according to the trigger mapping library specifically includes:

[0027] Acquire nodes of each target waiting event mapped to each data name in the first set according to the trigger mapping library, and store the mapped target waiting event nodes in the second set;

[0028] The repeated target waiting event nodes in the second set are removed to obtain the target waiting event nodes of each pre-response.

[0029] The present disclosure also provides a device for responding to process instance change data, including:

[0030] A waiting event node set acquisition unit, used to acquire a node set of waiting events in a process definition of a process instance;

[0031] A target waiting event node acquisition unit, used to acquire a node of a target waiting event in the node set;

[0032] A target waiting event corresponding data name acquisition unit, used to acquire the data name of the process instance corresponding to the node of the target waiting event;

[0033] A trigger mapping library establishment unit, used to establish a trigger mapping library that associates the node of the target waiting event with the data name of the process instance;

[0034] The target waiting event response unit is used to trigger the node of the target waiting event associated with the data name to respond in response to the change of the data corresponding to the data name in the trigger mapping library.

[0035] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for responding to data changes in a process instance as described in any one of the above are implemented.

[0036] The present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for responding to process instance data changes.

[0037] The method and device for responding to process instance data changes provided by the present disclosure obtain all nodes of waiting events in the process definition of the process instance to form a node set of waiting events, determine the node of the target waiting event related to the data change of the process instance in the node set, and establish a matching mapping relationship between the node of the target waiting event and the corresponding data name through a trigger mapping library. After the process instance is executed, the changed data is obtained, and then the node of the target waiting event corresponding to the changed data mapping in the trigger mapping library is searched, and the corresponding target waiting event is responded to, thereby improving the process instance data monitoring efficiency and response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 is a flowchart of a method for responding to process instance change data provided by the present disclosure;

[0040] Figure 2 This disclosure corresponds to Figure 1 Schematic diagram of the logic execution structure of the trigger mapping library establishment process in steps 110-140;

[0041] Figure 3 This disclosure corresponds to Figure 1 A specific flow chart of step 150;

[0042] Figure 4 This disclosure corresponds to Figure 3 Specific flow diagram of step 310;

[0043] Figure 5 This disclosure corresponds to Figure 3 Specific flow diagram of step 320;

[0044] Figure 6 This disclosure corresponds to Figure 1 A schematic diagram of the logical execution structure of the process instance data change monitoring and response process in step 150;

[0045] Figure 7 It is a structural schematic diagram of a device for responding to process instance change data provided by the present disclosure;

[0046] Figure 8 is a schematic diagram of the structure of an electronic device provided by the present disclosure; DETAILED DESCRIPTION

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

[0048] In existing workflow system-related businesses, it is often necessary to monitor the changes in a process instance data in order to take corresponding actions. For example, during the work order flow, if the urgency of the work order is very important, it is necessary to start a major event processing task. In order to solve this problem, existing technologies generally use the following two methods:

[0049] 1. Perform a scheduled task in the background to poll the data of all process instances at intervals. Whenever the data changes, execute the corresponding action;

[0050] 2. In the process definition, the event mechanism is applied. A sending event is set after each task that may cause data changes, and then a waiting event is set in another branch. The sending event triggers the processing task of the waiting event.

[0051] For the first method mentioned above, if the data in the corresponding process instance does not change frequently, continuous repeated polling at a set fixed time interval will cause obvious waste of system resources;

[0052] For the second method mentioned above, if the data of a process instance changes in multiple task nodes, then in each task node corresponding to the data, the sending event node will be triggered every time the data changes, resulting in multiple repeated sending event nodes being sent for the data of the same process instance. This is redundant for the process definition and also increases the complexity of the process definition, causing some important logic to be submerged in unimportant details such as sending event nodes.

[0053] like Figure 1 As shown, the embodiment of the present disclosure provides a method for responding to process instance change data, including:

[0054] Step 110: Obtain a node set of waiting events in the process definition of the process instance;

[0055] In the embodiment of the present disclosure, corresponding to step 110, obtaining a node set of waiting events in the process definition of the process instance specifically includes:

[0056] Define each node of the process instance to form the process definition of the process instance;

[0057] Obtain each node of the waiting event in the process definition to form a node set of the waiting event.

[0058] Specifically, the process instance is traversed to obtain all nodes in its process definition and all nodes waiting for events are screened out to prepare for the next step. In the disclosed embodiment, the definition of the process instance is completed by the process definition. For example, according to the process definition, all nodes waiting for events in process instance A are obtained, respectively, waiting for event B node, waiting for event C node and waiting for event D node.

[0059] Step 120: Obtain the target node waiting for the event in the node set;

[0060] The node set obtained in step 110 includes all nodes waiting for events of the target process instance to form a node set. In this step, the nodes related to the data change of the process instance in the node set are selected as the nodes waiting for the target event.

[0061] Specifically, a node in the node set related to the data change of the process instance is obtained and used as the target waiting event node; wherein the triggering of the target waiting event node is related to the data change of the process instance.

[0062] Step 130: Obtain the data name of the process instance corresponding to the node of the target waiting event;

[0063] Specifically, in the embodiment of the present disclosure, it is determined based on the process definition whether the scheduling response of each waiting event in the process instance is related to the data change of the process instance. In this step, only the nodes of the target waiting event related to the data change of the process instance are concerned. In the embodiment of the present disclosure, it is considered that the scheduling response of the target waiting event is triggered by the change data of the process instance.

[0064] Specifically, for each target waiting event node, obtain the data name of the process instance associated with it. In actual business, some waiting events are interested in the change of data in the process instance, that is, the trigger response of the node of the waiting event is related to the change of the data of the process instance. Similarly, some waiting events are not interested in the change of the data of the process instance, that is, the trigger response of the node of the waiting event is irrelevant to the change of the data of the process instance. Therefore, it is necessary for each specific waiting event to determine whether it is associated with the data of the process instance. If necessary, it is determined to be a target waiting event, and the name of the data of the process instance it is concerned about is determined. If not, the embodiment of the present disclosure does not pay attention to the nodes of such waiting events. For example, the data names of the process instance associated with the waiting event B node are data E and data F, the waiting event C node is not associated with the data of the process instance, and the data names of the process instance associated with the waiting event D node are data E and data G. Therefore, the waiting event B node and the waiting event D node are used as the nodes of the target waiting event.

[0065] Step 140: Establish a trigger mapping library that associates the node of the target waiting event with the data name of the process instance;

[0066] Specifically, the target waiting event node and the corresponding process instance data name are stored in the trigger mapping library in a matching form; wherein one data name matches at least one target waiting event node.

[0067] Specifically, the target waiting event is registered to the trigger mapping library, that is, the nodes of the target waiting event related to the data change of the process instance should be saved to the trigger mapping library, wherein the basic format of the data in the trigger mapping library is: {data name}->{target waiting event 1, target waiting event 2, ..., target waiting event N}, which shows that the data name and the node of the target waiting event may be a one-to-many relationship, that is, all the nodes of the target waiting event related to the data change of the process instance are matched with the data name of the process instance in the trigger mapping library. For example, in the above example, the data formed in the trigger mapping library of process instance A is {data E}->{target waiting event B, target waiting event D}; {data F}->{target waiting event B}; {data G}->{target waiting event D}.

[0068] like Figure 2 As shown, a schematic diagram of the process of establishing the trigger mapping library as described in steps 110-140 is described. As shown in the figure, the trigger mapping library obtained in step 140 containing information on the node of the target wait event and the data name of the process instance associated with it is obtained through the three processes of "obtaining the nodes of all wait events in the process definition in the process instance", "obtaining the data name of the related process instance for the target wait event node related to the change data of the process instance" and "registering the wait event to the trigger mapping library".

[0069] Step 150: In response to a change in the data corresponding to the data name in the trigger mapping library, triggering a target waiting event node associated with the data name to respond.

[0070] Specifically, when the background monitors that the data of the process instance has changed and the data belongs to the corresponding data in the trigger mapping library, the node that triggers the target waiting event responds by querying the target waiting event corresponding to the changed data in the trigger mapping library. For example, after the task of process instance A is executed, data E has not changed, data F has changed, and data G has not changed. Among data E, F, and G, only the data that has changed is concerned. Since data E and G have not changed after the process instance is executed compared to when the process instance is started, only data F is concerned. Since the mapping correspondence in the trigger mapping library shows that data F is related to the target waiting event node B, since data F has changed, the scheduler executes a scheduling response to the target waiting event node B.

[0071] In the embodiment of the present disclosure, corresponding to step 150, in response to the data corresponding to the data name in the trigger mapping library changing, the node of the target waiting event associated with the data name is triggered to respond, such as Figure 3 As shown, specifically including:

[0072] Step 310: Execute the process instance to obtain changed data; store the data name corresponding to the changed data into the first set;

[0073] Specifically, data is obtained when the process instance is started, and data is obtained again when the process instance is executed, and the data at the time of startup is compared with the data at the time of execution completion to obtain the changed data.

[0074] In the embodiment of the present disclosure, corresponding to step 310, the execution process instance obtains the changed data; the data name corresponding to the changed data is stored in the first set, such as Figure 4 As shown, specifically including:

[0075] Step 410: Obtain a first snapshot of data when the process instance is started;

[0076] Specifically, when a process instance is started, all data corresponding to the instance is obtained. For example, when process instance A is started, the first snapshot of data E, data F, and data G, that is, the snapshot of the original data, is obtained;

[0077] Step 420: Obtain a second snapshot of the data when the process instance is executed;

[0078] Specifically, when the process instance is executed, all data corresponding to the instance is obtained. For example, a data snapshot of data E, data F, and data G is obtained when the process instance A is executed.

[0079] Step 430: Compare the first snapshot with the second snapshot to obtain changed data.

[0080] For example, the first snapshots of data E, data F, and data G of process instance A are compared with the second snapshots of data E, data F, and data G respectively, and it is concluded that data F has changed after the process instance is executed. Therefore, data F (where F is the name) is stored in the first set.

[0081] Step 320: Acquire the node of the pre-response target waiting event corresponding to each data name in the first set according to the trigger mapping library;

[0082] Specifically, for each data name in the first set, the node of the target waiting event corresponding to the data name is searched in the trigger mapping library, and the node is used as the waiting event for pre-response. For example, the node of the target waiting event B corresponding to data F is searched in the trigger mapping library.

[0083] Step 330: Trigger each pre-response target waiting event node to respond.

[0084] Specifically, after obtaining the nodes of each pre-response target waiting event, the nodes are respectively responded to and executed. For example, the scheduler executes the scheduling response target waiting event B node.

[0085] In the embodiment of the present disclosure, corresponding to step 320, the node of the target waiting event of the pre-response corresponding to each data name in the first set is obtained according to the trigger mapping library, such as Figure 5 As shown, specifically including:

[0086] Step 510: acquiring nodes of each target waiting event mapped to each data name in the first set according to the trigger mapping library, and storing the mapped target waiting event nodes in the second set;

[0087] Specifically, in the trigger mapping library, the corresponding target waiting event nodes are searched in the trigger mapping library for each data name in the first set, and the corresponding target waiting event nodes are respectively stored in the second set. For example, the node waiting for event B is stored in the second set.

[0088] Step 520: remove the repeated target waiting event nodes in the second set to obtain the nodes of each pre-response target waiting event.

[0089] Specifically, since there may be a situation where a node of a target waiting event corresponds to data of multiple process instances, there will be nodes of the same target waiting event found due to the data corresponding to multiple process instances in the second set and stored in the second set respectively. Therefore, in this step, the repeated target waiting event nodes in the second set are removed to form a list of non-repetitive pre-response target waiting event nodes.

[0090] like Figure 6 As shown, corresponding to step 140, the process of monitoring the data changes of the process instance and performing the node scheduling response of the corresponding target waiting event is described:

[0091] When the process instance is started, all the data of the process instance is stored in snapshot X, which is also the first snapshot. Specifically, before scheduling a task, the scheduler stores all the data that may be used by the task and saves it in a data snapshot X to prepare for the next step.

[0092] Execute scheduling tasks;

[0093] After the task is executed, all data of the process instance is stored in snapshot Y, which is the second snapshot. Specifically, after the task is executed, the data may change, so the data after the task is executed is stored and saved in a snapshot Y to prepare for the next step.

[0094] Compare snapshot Y with snapshot X to obtain the changed data; specifically, by comparing the data before and after the task is executed, the changed data will be found, and the names of the changed data will be put into set Z, that is, the first set.

[0095] The data of the corresponding changed process instance obtains the node of its corresponding target waiting event; specifically, in the trigger mapping library, find out all the nodes of the target waiting event mapped by the data name in the set Z, and put the node name of the target waiting event into the set P, that is, the second set;

[0096] Remove the set of nodes of the duplicate waiting events; specifically, in the set P, there will be duplicate nodes of the waiting events, that is, a target waiting event is related to the data of two process instances, and both of these data have changed, so it is necessary to remove one of the nodes of the same target waiting event corresponding to the data of the two process instances;

[0097] Schedule each target waiting event node; specifically, for each target waiting event node in the deduplicated set P, the scheduler will schedule responses in turn.

[0098] The method for responding to process instance change data provided by the embodiment of the present disclosure can monitor changes in process instance data and take corresponding actions without the need for periodic polling and without increasing the complexity of process definition.

[0099] The following is a description of an apparatus for responding to process instance change data provided by an embodiment of the present disclosure. The apparatus for responding to process instance change data described below and the method for responding to process instance change data described above can refer to each other.

[0100] like Figure 7As shown, the embodiment of the present disclosure provides a device for responding to process instance change data, including:

[0101] A waiting event node set acquisition unit 710 is used to acquire a node set of waiting events in a process definition of a process instance;

[0102] Specifically, the waiting event node set acquisition unit 710 traverses the process instance to obtain all nodes waiting for events in its process definition.

[0103] In the embodiment of the present disclosure, the waiting event node set acquisition unit 710 specifically includes:

[0104] The process instance definition subunit is used to define each node of the process instance to form the process definition of the process instance;

[0105] The waiting event node acquisition subunit is used to acquire the nodes of each waiting event in the process instance in the process definition to form a node set of the waiting event.

[0106] A target waiting event node acquisition unit 720 is used to acquire a target waiting event node in the node set;

[0107] The node set obtained in the waiting event node set acquisition unit 710 includes nodes of all waiting events of the target process instance to form a node set, and the nodes related to the data change of the process instance in the node set are filtered out in the target waiting event node acquisition unit 720 as nodes of the target waiting event.

[0108] The target waiting event node acquisition unit 720 acquires the node related to the data change of the process instance in the node set and uses it as the node of the target waiting event; wherein the triggering of the node of the target waiting event is related to the data change of the process instance.

[0109] The target waiting event corresponding data name acquisition unit 730 is used to acquire the data name of the process instance corresponding to the node of the target waiting event;

[0110] Specifically, it is determined based on the process definition whether the scheduling response of each waiting event in the process instance is related to the data change of the process instance. In the embodiment of the present disclosure, only the nodes of the target waiting event related to the data change of the process instance are focused on, and it is considered that the scheduling response of the target waiting event is triggered by the changed data of the process instance.

[0111] Specifically, for each target wait event node, obtain the data name of the process instance associated with it. In actual business, some wait events are interested in the change of data in the process instance, that is, the trigger response of the wait event node is related to the change of data in the process instance. Similarly, some wait events are not interested in the change of data in the process instance, that is, the trigger response of the wait event node is not related to the change of data in the process instance. Therefore, it is necessary for each specific wait event to determine whether it is associated with the data of the process instance. If necessary, it is determined to be a target wait event, and the name of the data of the process instance it is concerned about is determined. If not, the embodiment of the present disclosure does not pay attention to the nodes of such wait events.

[0112] A trigger mapping library establishing unit 740 is used to establish a trigger mapping library that associates the node of the target waiting event with the data name of the process instance;

[0113] Specifically, the target waiting event node and the corresponding process instance data name are stored in the trigger mapping library in a matching form; wherein one data name matches at least one target waiting event node.

[0114] Specifically, the target wait event is registered to the trigger mapping library, that is, the nodes of the target wait event related to the data change of the process instance should be saved in the trigger mapping library, wherein the basic format of the data in the trigger mapping library is: {data name}->{target wait event 1, target wait event 2, ..., target wait event N}, it can be seen that the data name and the node of the target wait event may be a one-to-many relationship, that is, all the nodes of the target wait event related to the data change of the process instance are matched with the data name of the process instance in the trigger mapping library.

[0115] The target waiting event response unit 750 is used to trigger the node of the target waiting event associated with the data name to respond in response to the change of the data corresponding to the data name in the trigger mapping library.

[0116] Specifically, when the background monitors that the data of the process instance has changed and the data belongs to the corresponding data in the trigger mapping library, the node that triggers the target waiting event responds by querying the target waiting event corresponding to the changed data in the trigger mapping library.

[0117] In the embodiment of the present disclosure, the target waiting event response unit 750 specifically includes:

[0118] The changed data acquisition subunit is used to execute the process instance and obtain the changed data; the data name corresponding to the changed data is stored in the first set; specifically, the data is obtained when the process instance is started, and the data is obtained again when the process instance is completed, and the data at the start-up is compared with the data at the completion of the execution to obtain the changed data.

[0119] In the embodiment of the present disclosure, the change data acquisition subunit specifically includes:

[0120] The data first snapshot acquisition subunit is used to acquire the first snapshot of data when the process instance is started; specifically, to acquire all data corresponding to the instance when the process instance is started.

[0121] The data second snapshot acquisition subunit is used to acquire the second snapshot of the data when the process instance is executed; specifically, when the process instance is executed, all data corresponding to the instance is acquired.

[0122] The snapshot acquisition data change subunit is used to compare the first snapshot with the second snapshot to acquire changed data.

[0123] The pre-response target waiting event node acquisition subunit is used to obtain the node of the pre-response target waiting event corresponding to each data name in the first set according to the trigger mapping library; specifically, corresponding to each data name in the first set, the node of the corresponding target waiting event is searched in the trigger mapping library and used as the pre-response target waiting event.

[0124] In the embodiment of the present disclosure, the pre-response target waiting event node acquisition subunit specifically includes:

[0125] The second set acquisition sub-unit is used to acquire, in the trigger mapping library, the nodes of each target waiting event mapped to each data name in the first set, and store the mapped target waiting event nodes in the second set; specifically, in the trigger mapping library, corresponding to each data name in the first set, the corresponding target waiting event node is searched in the trigger mapping library, and the corresponding target waiting event nodes are respectively stored in the second set.

[0126] The deduplication subunit is used to remove duplicate target waiting event nodes in the second set to obtain nodes of each pre-response target waiting event. Specifically, since there may be a situation where a target waiting event node corresponds to data of multiple process instances, there will be nodes of the same target waiting event found due to corresponding data of multiple process instances in the second set and stored in the second set respectively. Therefore, in this step, the duplicate target waiting event nodes in the second set are removed to form a list of non-duplicate pre-response target waiting event nodes.

[0127] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a method for responding to a change in data of a process instance, the method comprising: obtaining a node set of waiting events in a process definition of a process instance; obtaining a node of a target waiting event in the node set; obtaining a data name of the process instance corresponding to the node of the target waiting event; establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; in response to a change in the data corresponding to the data name in the trigger mapping library, triggering the node of the target waiting event associated with the data name to respond.

[0128] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0129] On the other hand, the present disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method of responding to process instance change data provided by the above methods, the method including: obtaining a node set of waiting events in the process definition of the process instance; obtaining a node of a target waiting event in the node set; obtaining a data name of the process instance corresponding to the node of the target waiting event; establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; in response to a change in data corresponding to the data name in the trigger mapping library, triggering the node of the target waiting event associated with the data name to respond.

[0130] On the other hand, the present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for responding to process instance change data provided by the above-mentioned methods. The method includes: obtaining a node set of waiting events in the process definition of the process instance; obtaining a node of a target waiting event in the node set; obtaining a data name of the process instance corresponding to the node of the target waiting event; establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; in response to a change in data corresponding to the data name in the trigger mapping library, triggering the node of the target waiting event associated with the data name to respond.

[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure 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 disclosure.

Claims

1. A method for responding to process instance change data, characterized in that: include: Get the node set of waiting events in the process definition of the process instance; Get the target node waiting for the event in the node set; Obtain the data name of the process instance corresponding to the node of the target waiting event; Establishing a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; In response to a change in the data corresponding to the data name in the trigger mapping library, triggering a node of a target waiting event associated with the data name to respond; In response to the data corresponding to the data name in the trigger mapping library changing, triggering the node of the target waiting event associated with the data name to respond, specifically includes: Execute the process instance and obtain the changed data; Storing the data name corresponding to the changed data into the first set; Acquire, according to the trigger mapping library, a node of a pre-response target waiting event corresponding to each data name in the first set; Trigger each pre-response target waiting event's node to respond; The step of acquiring the node of the target waiting event of the pre-response corresponding to each data name in the first set according to the trigger mapping library specifically includes: Acquire nodes of each target waiting event mapped to each data name in the first set according to the trigger mapping library, and store the mapped target waiting event nodes in the second set; The repeated target waiting event nodes in the second set are removed to obtain the target waiting event nodes of each pre-response.

2. The method for responding to process instance change data according to claim 1, characterized in that: The node set of waiting events in the process definition of the process instance is obtained, specifically including: Define each node of the process instance to form the process definition of the process instance; Obtain each node of the waiting event in the process definition to form a node set of the waiting event.

3. The method for responding to process instance change data according to claim 1, characterized in that: The step of obtaining the target node waiting for the event in the node set specifically includes: A node in the node set related to the data change of the process instance is obtained, and the node is used as the target waiting event node; wherein the triggering of the target waiting event node is related to the data change of the process instance.

4. The method for responding to process instance change data according to claim 3, characterized in that: The trigger mapping library for establishing the association between the node of the target waiting event and the data name of the process instance specifically includes: The target waiting event node and the corresponding process instance data name are stored in the trigger mapping library in a matching form; wherein one data name matches at least one target waiting event node.

5. The method for responding to process instance change data according to claim 1, characterized in that: The execution process instance obtains the changed data, specifically including: Get the first snapshot of data when the process instance starts; Get the second snapshot of the data when the process instance is executed; The first snapshot is compared with the second snapshot to obtain changed data.

6. A device for responding to process instance change data, characterized in that: include: A waiting event node set acquisition unit, used to acquire a node set of waiting events in a process definition of a process instance; A target waiting event node acquisition unit, used to acquire a node of a target waiting event in the node set; A target waiting event corresponding data name acquisition unit, used to acquire the data name of the process instance corresponding to the node of the target waiting event; A trigger mapping library establishment unit, used to establish a trigger mapping library that associates the node of the target waiting event with the data name of the process instance; A target waiting event response unit, configured to trigger a node of a target waiting event associated with a data name to respond in response to a change in data corresponding to the data name in the trigger mapping library; The target waits for an event response unit, including: The changed data acquisition subunit is used to execute the process instance and acquire the changed data; and store the data name corresponding to the changed data into the first set; The pre-response target waiting event node acquisition subunit is used to acquire the pre-response target waiting event node corresponding to each data name in the first set according to the trigger mapping library; and trigger each pre-response target waiting event node to respond respectively; The target waiting event node acquisition unit includes: A second set acquisition subunit is used to acquire nodes of each target waiting event mapped by each data name in the first set according to the trigger mapping library, and store the mapped target waiting event nodes in the second set; The deduplication subunit is used to remove the repeated target waiting event nodes in the second set to obtain the nodes of each pre-response target waiting event.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for responding to process instance data changes as described in any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for responding to process instance data changes as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Data storage method, inquiring method and inquiring device for workflow table

    CN102831122A