CN108536541B - Process engine object processing method and device - Google Patents

Process engine object processing method and device Download PDF

Info

Publication number
CN108536541B
CN108536541B CN201710118583.1A CN201710118583A CN108536541B CN 108536541 B CN108536541 B CN 108536541B CN 201710118583 A CN201710118583 A CN 201710118583A CN 108536541 B CN108536541 B CN 108536541B
Authority
CN
China
Prior art keywords
node task
task information
node
list
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710118583.1A
Other languages
Chinese (zh)
Other versions
CN108536541A (en
Inventor
杨平
龙永明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710118583.1A priority Critical patent/CN108536541B/en
Publication of CN108536541A publication Critical patent/CN108536541A/en
Application granted granted Critical
Publication of CN108536541B publication Critical patent/CN108536541B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The invention provides a process engine object processing method and a device, wherein the process engine object processing method comprises the following steps: receiving at least one node task information sent by a process engine, wherein each node task information comprises: the name, object state list and object attribute list of the current node task of the node task information; the object state list comprises the states of all node tasks of all objects; respectively searching an object state list of each node task information for an object which corresponds to the name of the current node task of the node task information and has a state to be executed; and respectively obtaining the searched attributes of each object from the object attribute list of each node task information, and executing preset operation corresponding to the current node task of the node task information on each object according to the searched attributes of each object and the searched attributes of the object. The method can carry out batch processing on the searched objects.

Description

Process engine object processing method and device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for processing a process engine object.
Background
The flow engine is used as a core module for state flow in flow development. The coordination work of related components is controlled by the process engine, so that the information in the business process is circulated according to a certain rule, and the automation of the business process is realized.
Conventional flow engines implement batch processing of transactions through multiple instances, such as providing countersigning and singleton signing. The countersigning means that in the transaction flow, if a node initiates an event to be handled to a plurality of people, the next node is processed only after the processing of all people is completed. The single sign means that in the transaction flow, if a to-do event is initiated for multiple people at one node, the next node is processed as long as one person finishes processing.
The traditional flow engine is controlled based on a single transaction, in an application scene, when a flow engine is needed to deploy a local area network to 10 network devices, 10 network devices are objects of the flow engine, if multiple instances of the traditional flow engine are used, due to the fact that multiple processing objects are arranged, 10 objects execute tasks at a certain node at the same time, as long as the task of any one network device is finished, the node task is finished, and other 9 network devices lose the node task in the flow engine, and subsequent node task operation cannot be carried out. Therefore, the conventional flow engine cannot implement batch processing of a plurality of objects in one node task.
Disclosure of Invention
Based on this, it is necessary to provide a method and an apparatus for processing a flow engine object, which can implement batch processing of a plurality of objects.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme:
a process engine object processing method, comprising:
receiving at least one node task information sent by a process engine, wherein each node task information comprises: the name, object state list and object attribute list of the current node task of the node task information; the object state list comprises the states of all node tasks of all objects;
searching an object which corresponds to the name of the current node task of the node task information and has a state to be executed in an object state list of each node task information;
and respectively obtaining the attribute of each searched object from the object attribute list of each node task information, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the attribute of each searched object.
A process engine object processing apparatus comprising: the device comprises a receiving module, a searching module and an executing module;
the receiving module is configured to receive at least one node task information sent by a process engine, where each node task information includes: the name, object state list and object attribute list of the current node task of the node task information; the object state list comprises the states of all node tasks of all objects;
the searching module is used for searching an object which corresponds to the name of the current node task of the node task information and has a state to be executed in the object state list of each node task information;
and the execution module is used for acquiring the searched attribute of each object from the object attribute list of each node task information, and executing the preset operation corresponding to the current node task of the node task information on each searched object according to the searched attribute of each object.
According to the process engine object processing method, when at least one node task information sent by a process engine is received, an object corresponding to the name of the current node task of the node task information and in a state to be executed is searched in the object state list of each node task information, then the attribute of each searched object is respectively obtained, and preset operation corresponding to the current node task of the node task information is executed on each object according to the attribute of each searched object. Since the implementation objects of the preset operation of one current node task are all the objects which are searched from the object state list of the corresponding node task information, correspond to the name of the current node task and have the states to be executed, the objects searched by the current node task can be subjected to batch processing. And the node task information corresponding to each node task sent by the process engine is respectively searched, and the preset operation corresponding to the current node task of the node task information is executed according to the attribute of the searched object, so that the objects of a plurality of node tasks can be processed in batches concurrently.
Drawings
FIG. 1 is a diagram illustrating an application environment of a method for processing a process engine object according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the internal architecture of a server according to one embodiment;
FIG. 3 is a flow diagram of a flow engine object processing method of an embodiment;
FIG. 4 is a flow diagram of a flow engine object handling method of another embodiment;
fig. 5 is a flowchart of a process for switching a local area network of a network device, which is generated by a process engine in a specific embodiment;
FIG. 6 is a schematic diagram illustrating interaction between a process engine and a process engine object processing apparatus corresponding to the process diagram of FIG. 5;
FIG. 7 is a block diagram of the architecture of a flow engine object processing apparatus of an embodiment;
fig. 8 is a block diagram showing a flow engine object processing apparatus according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
FIG. 1 is a diagram illustrating an application environment of a process engine object processing method according to an embodiment. As shown in fig. 1, a flow engine 101 and a flow engine object processing device 102 are provided in the server, and the flow engine object processing device 102 is connected to the flow engine 101 through an interface for calling the flow engine. In another embodiment, the process engine 101 and the process engine object processing apparatus 102 may be provided in different servers, and both may be connected by network communication. The process engine 101 sends node task information to the process engine object processing device 102, where the node task information includes a name of a current node task of the node task information, an object state list, and an object attribute list, the process engine object processing device 102 sets a preset operation corresponding to each node task, finds all objects to be executed by the current node task from the object state list, obtains attributes of the found objects from the object attribute list, and executes the preset operation corresponding to the current node task, thereby implementing batch processing on the found all objects.
Fig. 2 is a schematic diagram of an internal structure of the server in one embodiment. As shown in fig. 2, the server includes a processor, a storage medium, a memory, and a network interface connected through a system bus. The storage medium of the server stores an operating system, a flow engine and computer-executable instructions for implementing the flow engine object processing method. The processor is used for providing calculation and control capacity and supporting the operation of the whole server. The memory in the server provides an environment for the operation of the information processing platform in the storage medium, and the network interface performs network communication with the processed object. Those skilled in the art will appreciate that the architecture shown in fig. 2 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the terminals to which the subject application applies, and that a particular server may include more or fewer components than those shown, or some components may be combined, or have a different arrangement of components.
FIG. 3 is a flow diagram of a method for processing objects by the flow engine in one embodiment, the method of this embodiment comprising the steps of:
s302: receiving at least one node task information sent by a process engine, wherein each node task information comprises: the name, object state list and object attribute list of the current node task of the node task information; the object state list includes the state of each node task of each object.
The current node task is a task to be executed according to the received node task information sent by the process engine. The flow engine records the start and the end of the node task and the start and the end of the next node task, and controls the flow direction through flow variables and flow lines. The flow engine provides a flow chart which is a visual graph and generates a configuration file in the form of xml after being edited. The flow chart comprises a plurality of nodes, node tasks, namely execution contents of each node, and flow trends are defined through flow lines and events triggered through configuration setting of the node tasks. The flow line is a line linking the tasks of the nodes and is used for controlling the flow direction. The process variables are variables stored by the process engine and used for business calculation or process line control process trend.
The object in this embodiment refers to a processing entity object of the process engine, for example, when a local area network needs to be configured for 100 network devices by using the process engine, 100 network devices are processing objects of the process engine. One flow chart includes a plurality of node tasks, and the object state list records the state of each node task of each object. The states of the node tasks include: pending execution, completed execution, in-execution, and failed execution. The object attribute list includes attributes of each object. Taking a network device as an example, the object attribute list includes names of the network devices, IP addresses, and the like. It should be understood that the attributes of the object are preset by the user according to the object and the processing matter.
S304: and searching an object state list of each node task information, wherein the object state list corresponds to the name of the current node task of the node task information and is in a state to be executed.
Each node task information corresponds to a node task. The object state list records the state of each node task of each object, corresponds to the name of the current node task of the node task information, and an object with the state to be executed is an object to be processed by the corresponding current node task. It is understood that there may be more than one object to be processed corresponding to a node task. In this embodiment, the process engine may send the plurality of node task information at the same time, and after receiving the plurality of node task information, perform search processing on each node task information respectively.
S306: and respectively obtaining the searched attributes of each object from the object attribute list of each node task information, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the searched attributes of each object.
The preset operation is preset by a user according to each node task, and it should be understood that the preset operation corresponding to each node task is different, and the purpose of completing the node task is achieved by executing the preset operation corresponding to each node task.
Specifically, the object state list and the object attribute list include object identifiers of the objects.
Step S304 specifically includes: and searching an object corresponding to the name of the current node task of the node task information and in a state of waiting to be executed in an object state list of each node task information, and acquiring an object identifier of the searched object.
Step S306 specifically includes: and acquiring the searched attribute of each object from the object attribute list of each node task information according to the object identifier, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the searched attribute of each object.
In this embodiment, the object state list and the object attribute list both include the object identifier of each object, and after an object meeting the requirement is found, the attribute of the found object can be quickly obtained according to the object identifier.
After the object required to be processed by each node task is found, corresponding preset operation is executed on the object corresponding to each node task, and the preset operation is carried out according to the found attributes of each object. It should be understood that the implementation objects of the preset operation of one current node task are all the objects which are found from the object state list of the corresponding node task information, correspond to the name of the current node task, and have states to be executed, that is, the found objects are batch processed by executing the preset operation.
And the node task information corresponding to each node task sent by the process engine is respectively searched, and the preset operation corresponding to the current node task of the node task information is executed according to the attribute of the searched object, so that the objects of a plurality of node tasks can be processed in batches concurrently.
In a specific embodiment, if the current node task of one node task information is to configure a network for N network devices, after finding an object to be processed by the node task, obtaining attributes of each found object from an object attribute list of the node task information, where the attributes include a network device name, a network device address, and local area network information of the network device. The preset operation is to update the preset configured local area network information to the corresponding network device.
In another specific embodiment, if the current node task of a node task is N host reinstallation systems, after finding an object to be processed by the node task, obtaining the found attributes of each object from the object attribute list of the node task information, where the attributes include a host name, a host address, and configuration information of the host. And the preset operation is to call a third-party program corresponding to the current node task to reinstall the system for the corresponding host.
According to the process engine object processing method, when at least one node task information sent by a process engine is received, an object corresponding to the name of the current node task of the node task information and in a state to be executed is searched in the object state list of each node task information, then the attribute of each searched object is respectively obtained, and preset operation corresponding to the current node task of the node task information is executed on each object according to the attribute of each searched object. Since the implementation objects of the preset operation of one current node task are all the objects which are searched from the object state list of the corresponding node task information, correspond to the name of the current node task and have the states to be executed, the objects searched by the current node task can be subjected to batch processing. And the node task information corresponding to each node task sent by the process engine is respectively searched, and the preset operation corresponding to the current node task of the node task information is executed according to the attribute of the searched object, so that the objects of a plurality of node tasks can be processed in batches concurrently.
In another embodiment, as shown in fig. 4, after step S304, the method further includes:
s305: and respectively modifying the state of the current node task of each searched object in the object state list in each node task information into execution to obtain each modified object state list, feeding back each modified object state list to the process engine, and updating the object state list in the process engine by the process engine according to each received modified object state list.
The process engine object processing device obtains each modified object state list by modifying the state of the current node task of each searched object in the object state list in the node task information into execution, and feeds back each modified object state list to the process engine, thereby locking each searched object in the current node task. And the process engine updates the object state list in the process engine according to the received modified object state lists, so that the object state list in the process engine is in the latest state in real time.
After step S306, the method further includes:
s308: after the preset operation of each searched object is executed, modifying the current node task state of each object executing the preset operation in the object state list of each node task information according to the operation result; and the modified state of the current node task of each object executing the preset operation comprises the completion.
And after the preset operation is executed on all the searched objects in one node task, modifying the task state of the current node of each object executing the preset operation in the object state list of each node task information according to the operation result. The modified state of the current node task of each object for executing the preset operation comprises completion and/or execution failure.
S310: sending an end command to the process engine; the end command carries the modified object state list of the task information of each node. In a specific embodiment, after the preset operation is performed, if the object attribute of the task information of each node changes, the object attribute list needs to be updated, and the end command further includes the updated object attribute list. For example, in the node task of the lan switch, after the preset operation is performed, the lan address of the object changes, and the object attribute list needs to be updated.
S312: when a node acquisition instruction sent by the process engine according to the ending command is received, determining a next node task corresponding to each node task information; the node acquires an object state list carrying an update instruction; and updating the object state list in the flow engine by the flow engine according to each modified object state list to obtain the updated object state list.
And after receiving the ending command, the process engine ends the current node task corresponding to the node task information and judges whether the current node task exists in the next node task according to the flow chart. And when the next node task does not exist, ending the process. And when the next node task exists, the sending node acquires an instruction. The node acquisition instruction carries an object state list updated by the flow engine according to each modified object state list, namely a latest object state list.
After receiving the ending command, the flow engine updates the object attribute list stored in the flow engine according to the updated object attribute list, so that the object attribute list in the flow engine is consistent with the object attribute list in the flow engine object processing device.
And when a node acquisition instruction is received, determining a next node task corresponding to each node task information.
Specifically, the node acquisition instruction includes a service name of each node task information. Step S312 specifically includes: and respectively calling the class or the function corresponding to the service name of each node task information, and determining the next node task of each current node task. The process engine records the start and the end of each node task and the start and the end of the next node task, and controls the trend of the process through process variables and process lines. The flow engine object processing device is connected with the flow engine through an interface for calling the flow engine. The interface of the flow engine is the encapsulated class or function. The node acquisition instruction comprises a service name of the node task information, wherein the service name comprises an interface corresponding to the current node task and a path starting from the current node task and guided by a flow line of the flow chart, so that the next node task from the current node task is determined.
S314: and respectively setting the state of the next node task which executes the preset operation and has the current node task state as the completed object in the updated object state list to be executed, obtaining the object state list of the next node task corresponding to each current node task information, and sending the next node task corresponding to each node task information and the object state list of each next node task to the process engine.
The process engine receives the next node task and the object state list of the next node task to update and obtain the latest object state list. And when receiving a next node task and an object of the next node task, sending corresponding node task information to the process engine object processing device, searching an object which corresponds to the current node task name of the node task information and is in a state of waiting for execution by the process engine object processing device according to the node task information, acquiring the attribute of the searched object from the object attribute list of the node task information, and executing preset operation corresponding to the current node task of the node task information on the searched object according to the attribute, thereby realizing automatic processing of the process.
An implementation process of the process engine object processing method is described below with reference to a specific application scenario, as shown in fig. 5, which is a flowchart generated by the process engine in a specific embodiment and used for implementing local area network configuration on 100 network devices for performing switching processing on a local area network of a network device. The flow chart comprises three node tasks, which are respectively as follows: node task 1: initializing network equipment; and (3) node task 2: powering on the network equipment; and (3) node task 3: the network device switches the local area network. The state of each node task includes: pending execution, completed execution, in-execution, and failed execution. And the node task 1 is divided into two branches, if the network equipment is powered on after initial enabling, the node task 3 is executed, if the network equipment is not powered on, the node task 2 is executed to power on the network equipment, and after the network equipment is powered on, the node task 3 is executed.
Assuming that 20 network devices are powered on and the remaining 80 network devices are not powered on after the node task 1 is executed, the 20 powered-on network devices execute the node task 3 first, and the states of the node tasks of the 20 powered-on network devices are as follows: initializing the network equipment: is finished; powering on the network equipment: is finished; the network equipment switches the local area network: to be executed. In addition, if 80 network devices that are not powered on execute node task 2, the states of the node tasks of the 80 network devices are: initializing the network equipment: is finished; powering on the network equipment: waiting to be executed; the network equipment switches the local area network: to be executed.
In this embodiment, a current node task is taken as a node task 2 as an example for explanation. As shown in fig. 6, the flow engine sends node task information to the flow engine object processing apparatus, where the node task information includes a name of a current node task, an object status list, and an object attribute list. The current node task is named as: the network device is powered on. The object state list includes states of all node tasks of the network devices, and the object attribute list includes attributes of all the network devices. The attribute is specifically a network device name, an IP address of the network device, and local area network information of the network device.
After receiving the node information, the process engine object processing apparatus searches for an object whose node task name is "network device powered on" and whose state is to be executed from the object state list, that is, finds out 80 network devices that are not powered on. After finding the 80 network devices which are not powered on, the flow engine object processing device modifies the node tasks of the 80 network devices which are not powered on into the execution state of 'network device power on', and feeds back the modified object state list to the flow engine, so as to lock the 80 network settings in the 'network device power on' node tasks.
After finding 80 network devices which are not powered on, the process engine object processing device obtains the numbers (i.e. object identifiers) of the 80 network devices which are not powered on, obtains the attributes of the 80 network devices which are not powered on in the object attribute list according to the numbers, and executes the power-on operation on the 80 devices. Specifically, the attribute of the network device includes an IP address of the network device, in this embodiment, the 80 devices are controlled to be powered on by calling a third-party control program, and the third-party control program performs a power-on operation on the 80 devices according to the IP address of the device.
After the power-on operation is executed, if all the 80 network devices are powered on successfully, the state that the node task of the 80 network devices which are not powered on is 'network device power-on' is modified to be completed. And the process engine object processing device sends an end command to the process engine, wherein the end command carries the modified object state list. And the flow engine updates the object state list stored in the local according to the modified object state list. And the flow engine determines whether a next node task exists according to the flow chart, and if the next node task exists, a node acquisition instruction is sent to the flow engine object processing device, wherein the node acquisition instruction comprises a service name.
And the process engine object processing device calls the classes corresponding to the service names respectively and determines the next node task of each current node task. Specifically, the process engine records the start and end of each node task and the start and end of the next node task, and controls the flow direction through process variables and a process line. The flow engine object processing device is connected with the flow engine through an interface for calling the flow engine. The interface of the flow engine is the encapsulated class or function. The node acquisition instruction comprises a service name of the node task information, wherein the service name comprises an interface corresponding to the current node task and a path starting from the current node task and guided by a flow line of the flow chart, so that the next node task from the current node task is determined. The next node task of the network equipment which is powered on is a network equipment switching local area network, meanwhile, the state of the node task of the network equipment switching local area network, which is executed by the network equipment which is powered on and the state of the node task of the network equipment which is powered on is finished, is modified to be executed, an object state list of the next node task is obtained, and the object state list of the next node task are sent to the process engine, so that the object state list in the process engine is in the latest state. After receiving the next node task and the object state list of the next node task, the process engine sends the corresponding node task information to the process engine object processing device, and the process engine object processing device executes the node task of the network equipment switching local area network on the 80 network equipment. That is, in one node task, after all objects are executed, the next node task is executed, so that batch processing of a plurality of objects in one node task is realized.
It should be understood that, while/before/after the process engine object processing apparatus executes the node task of network device power-on 80 network devices without power-on, the process engine may further send the node task of network device switching lan to 20 network devices with power-on to the process engine object processing apparatus, and the process engine object processing apparatus respectively executes the local network switching operation on 20 network devices with power-on, thereby implementing batch processing and process automation on a plurality of node tasks, and improving processing efficiency.
In one embodiment, there is provided a process engine object processing apparatus, as shown in fig. 7, including: a receiving module 701, a searching module 702 and an executing module 703.
A receiving module 701, configured to receive at least one node task information sent by a process engine, where the node task information includes: the name, object state list and object attribute list of the current node task of the node task information; the object state list includes the state of each node task of each object.
The searching module 702 is configured to search, in the object state list of each node task information, an object whose state is to be executed and corresponds to the name of the current node task of the node task information.
The executing module 703 is configured to obtain the found attribute of each object from the object attribute list of each node task information, and execute the preset operation corresponding to the current node task of the node task information on each found object according to the found attribute of each object.
When at least one node task information sent by the process engine is received, the process engine object processing device searches for an object corresponding to the name of the current node task of the node task information and having a state to be executed in the object state list of each node task information, then respectively obtains the attribute of each searched object, and executes preset operation corresponding to the current node task of the node task information on each object according to the attribute of each searched object. Since the implementation objects of the preset operation of one current node task are all the objects which are searched from the object state list of the corresponding node task information, correspond to the name of the current node task and are in the states to be executed, the objects searched by the current node task can be processed in batch. And the node task information corresponding to each node task sent by the process engine is respectively searched, and the preset operation corresponding to the current node task of the node task information is executed according to the attribute of the searched object, so that the objects of a plurality of node tasks can be processed in batches concurrently.
In another embodiment, as shown in fig. 8, the method further includes: a modification module 704, a sending module 705 and a node acquisition module 706.
A modifying module 704, configured to modify, according to an operation result, a state of a current node task of each object that performs the preset operation in the object state list of each node task information after the preset operation on each found object is performed; and the modified state of the current node task of each object executing the preset operation comprises the completion.
A sending module 705, configured to send an end command to the process engine; the end command carries the modified object state list of the task information of each node.
A node obtaining module 706, configured to determine, when a node obtaining instruction sent by the process engine according to the end command is received, a next node task corresponding to each node task information; and the node acquisition instruction carries an updated object state list, and the updated object state list is obtained by updating the object state list in the flow engine by the flow engine according to each modified object state list.
The modifying module 704 is further configured to set, in the updated object state list, a state of a next node task that is executed with the preset operation and has a current node task state as a completed object to be executed, so as to obtain an object state list of the next node task corresponding to each piece of current node task information.
The sending module 705 is further configured to send a next node task corresponding to each node task information and an object state list of each next node task to the flow engine.
In another embodiment, the node acquisition instruction includes a service name of the task information of each node.
The node obtaining module 706 is configured to call a class or a function corresponding to the service name of each node task information, and determine a next node task of each current node task.
In yet another embodiment, further comprising: and the state modification module is used for modifying the found states of the current node tasks of the objects in the object state lists in the node task information into execution states respectively to obtain modified object state lists, feeding the modified object state lists back to the process engine, and updating the object state lists in the process engine by the process engine according to the received modified object state lists.
In yet another embodiment, the object state list and the object attribute list include object identifications for the objects. The searching module 702 is configured to search, in the object state list of each node task information, an object whose state is to be executed and corresponding to the name of the current node task of the node task information, and obtain an object identifier of the searched object.
The executing module 703 is configured to obtain the attribute of each found object from the object attribute list of each node task information according to the object identifier, and execute the preset operation corresponding to the current node task of the node task information on each found object according to the attribute of each found object.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by a computer program, which is stored in a non-volatile computer readable storage medium, and in the embodiments of the present invention, the program may be stored in the storage medium of a computer system and executed by at least one processor in the computer system to implement the processes of the embodiments including the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A process engine object processing method, comprising:
receiving at least one node task information sent by a process engine, wherein each node task information comprises: the name, object state list and object attribute list of the current node task of the node task information; the object state list comprises the states of all node tasks of all objects;
searching an object which corresponds to the name of the current node task of the node task information and has a state to be executed in an object state list of each node task information;
respectively obtaining the attribute of each searched object from the object attribute list of each node task information, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the attribute of each searched object;
after the preset operation of each searched object is executed, modifying the current node task state of each object executing the preset operation in the object state list of each node task information according to the operation result; the modified state of the current node task of each object executing the preset operation comprises the completion;
sending an end command to the process engine; and the ending command carries the modified object state list of the task information of each node so as to update the object state list of the next node task.
2. The method of claim 1, further comprising:
when a node acquisition instruction sent by the process engine according to the ending command is received, determining a next node task corresponding to each node task information; the node acquisition instruction carries an updated object state list, and the updated object state list is obtained by updating the object state list in the process engine by the process engine according to each modified object state list;
and respectively setting the state of the next node task which executes the preset operation and has the current node task state as the completed object in the updated object state list to be executed, obtaining the object state list of the next node task corresponding to each current node task information, and sending the next node task corresponding to each node task information and the object state list of each next node task to the process engine.
3. The method according to claim 2, wherein the node acquisition instruction comprises a service name of task information of each node;
the step of determining the next node task corresponding to each node task information includes: and respectively calling the class or the function corresponding to the service name of each node task information, and determining the next node task of each current node task.
4. The method according to claim 1, wherein after the step of searching for the object whose status is to be executed and corresponding to the name of the current node task of the node task information in the object status list of each node task information, respectively, the method further comprises:
and respectively modifying the state of the current node task of each searched object in the object state lists in each node task information into execution to obtain modified object state lists, feeding back the modified object state lists to the process engine, and updating the object state lists in the process engine by the process engine according to the received modified object state lists.
5. The method of claim 1, wherein the object state list and the object attribute list comprise an object identification of each object;
the step of searching the object which corresponds to the name of the current node task of the node task information and has a state to be executed in the object state list of each node task information comprises the following steps:
respectively searching an object corresponding to the name of the current node task of the node task information and having a state to be executed in an object state list of each node task information, and acquiring an object identifier of the searched object;
the step of obtaining the found attributes of each object from the object attribute list of each node task information, and performing the preset operation corresponding to the current node task of the node task information on each found object according to the found attributes of each object includes:
and acquiring the searched attribute of each object from the object attribute list of each node task information according to the object identification, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the searched attribute of each object.
6. A process engine object processing apparatus, comprising: the device comprises a receiving module, a searching module, an executing module, a modifying module and a sending module;
the receiving module is configured to receive at least one node task information sent by a process engine, where each node task information includes: the name, object state list and object attribute list of the current node task of the node task information; the object state list comprises the states of all node tasks of all objects;
the searching module is used for searching an object which corresponds to the name of the current node task of the node task information and has a state to be executed in the object state list of each node task information;
the execution module is used for respectively obtaining the searched attribute of each object from the object attribute list of each node task information, and executing the preset operation corresponding to the current node task of the node task information on each searched object according to the searched attribute of each object;
the modification module is used for modifying the current node task state of each object which executes the preset operation in the object state list of each node task information according to the operation result after the preset operation of each searched object is executed; the modified state of the current node task of each object executing the preset operation comprises the completion;
the sending module is used for sending an ending command to the process engine; and the ending command carries the modified object state list of the task information of each node so as to update the object state list of the next node task.
7. The apparatus of claim 6, further comprising: a node acquisition module;
the node acquisition module is used for determining a next node task corresponding to each node task information when receiving a node acquisition instruction sent by the process engine according to the ending command; the node acquisition instruction carries an updated object state list, and the updated object state list is obtained by updating the object state list in the process engine by the process engine according to each modified object state list;
the modification module is further configured to set, in the updated object state list, a state of a next node task that is to be executed and on which a preset operation is executed and a state of a current node task is a completed object, to be executed, and obtain an object state list of the next node task corresponding to each piece of current node task information;
the sending module is further configured to send a next node task corresponding to each node task information and an object state list of each next node task to the process engine.
8. The apparatus according to claim 7, wherein the node acquisition instruction includes a service name of each node task information;
and the node acquisition module is used for respectively calling the class or the function corresponding to the service name of each node task information and determining the next node task of each current node task.
9. The apparatus of claim 6, further comprising: and the state modification module is used for modifying the found states of the current node tasks of the objects in the object state lists in the node task information into execution states respectively to obtain modified object state lists, feeding the modified object state lists back to the process engine, and updating the object state lists in the process engine by the process engine according to the received modified object state lists.
10. The apparatus of claim 6, wherein the object state list and the object attribute list comprise an object identification of each object;
the searching module is used for searching an object which corresponds to the name of the current node task of the node task information and has a state to be executed in the object state list of each node task information, and acquiring an object identifier of the searched object;
and the execution module is used for respectively acquiring the searched attribute of each object from the object attribute list of each node task information according to the object identifier, and executing preset operation corresponding to the current node task of the node task information on each searched object according to the searched attribute of each object.
CN201710118583.1A 2017-03-01 2017-03-01 Process engine object processing method and device Active CN108536541B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710118583.1A CN108536541B (en) 2017-03-01 2017-03-01 Process engine object processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710118583.1A CN108536541B (en) 2017-03-01 2017-03-01 Process engine object processing method and device

Publications (2)

Publication Number Publication Date
CN108536541A CN108536541A (en) 2018-09-14
CN108536541B true CN108536541B (en) 2022-07-08

Family

ID=63489044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710118583.1A Active CN108536541B (en) 2017-03-01 2017-03-01 Process engine object processing method and device

Country Status (1)

Country Link
CN (1) CN108536541B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377993B (en) * 2019-07-09 2020-06-12 长江勘测规划设计研究有限责任公司 Agile configuration method for multi-combination regulation and control calculation of over-standard flood
CN111027196B (en) * 2019-12-03 2023-04-28 南方电网科学研究院有限责任公司 Simulation analysis task processing method and device for power equipment and storage medium
CN110990643B (en) * 2019-12-06 2022-07-15 厦门市美亚柏科信息股份有限公司 GoJS-based complex task visualization method, terminal device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8201176B2 (en) * 2008-08-06 2012-06-12 International Business Machines Corporation Detecting the starting and ending of a task when thread pooling is employed
CN103984818B (en) * 2014-05-16 2017-01-18 大连理工大学 AUV (autonomous underwater vehicle) design flow visualization modeling method based on Flex technology
CN104572306B (en) * 2015-01-28 2018-03-09 中国石油集团东方地球物理勘探有限责任公司 Method for managing resource, the explorer of computer cluster
CN106155718B (en) * 2015-04-02 2019-09-06 阿里巴巴集团控股有限公司 Flow engine implementation method and flow engine system
CN105912384A (en) * 2016-04-01 2016-08-31 广东凯通软件开发有限公司 Transaction processing method and device for workflow engine

Also Published As

Publication number Publication date
CN108536541A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US10511506B2 (en) Method and device for managing virtualized network function
US10649765B2 (en) Systems and methods for preventing service disruption during software updates
US20040230670A1 (en) Method and system for representing, configuring and deploying distributed applications
CN108536541B (en) Process engine object processing method and device
CN110225078B (en) Application service updating method, system and terminal equipment
CN111541762B (en) Data processing method, management server, device and storage medium
CN112153126A (en) Deployment and node management method and system for K8S cluster
CN113590169B (en) Application deployment method, application deployment system, and computer-readable storage medium
US10637748B2 (en) Method and apparatus for establishing interface between VNFMS, and system
CN112470119B (en) Service upgrading method and device in distributed system and distributed system
CN111580948A (en) Task scheduling method and device and computer equipment
CN111897643A (en) Thread pool configuration system, method, device and storage medium
CN113703946B (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN112579247A (en) Method and device for determining task state
CN114721746B (en) Trino catalog hot loading method and system
CN113204434B (en) Planned task execution method and device based on k8s and computer equipment
CN111611447B (en) Computer and server
US20200117440A1 (en) Hierarchical equipment software update for an electrical distribution grid
CN116743762A (en) Service registration cluster flow switching method, flow switching device and storage medium
CN106557359B (en) Task scheduling method and system
CN116795530A (en) Acceleration hardware management method, device, equipment and storage medium
CN116432218A (en) Resource object protection method
CN116126881A (en) Meta information storage method, storage medium and computer equipment of database cluster
CN116204590A (en) Data processing method, readable storage medium and computer device for database cluster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant