The systems and methods described herein relate generally to debugging workflow instances and, more particularly, to simultaneously monitoring and debugging multiple workflow instances throughout a distributed network.
At least some known debugging tools allow remote debugging of a running workflow instance over a network. Some such debugging tools use a graphical client interface. However, such tools require that debugging services be installed on the computer or device running the workflow instance. Moreover, when a user connects to a device in order to debug a workflow instance, all other workflow instances running on the device are stopped.
Further, for at least some known debugging tools, only one workflow instance can be debugged at a time when using a tool having a graphical client interface. Similarly, for at least some known debugging tools, only one debugging tool having a graphical client interface can be connected to a device at any one time.
In one aspect, a method for monitoring processes over a network includes attaching to a first process of a plurality of processes running on a remote device such that a second process of the plurality of processes is not interrupted. The method also includes displaying details of the first process at a client.
In another aspect, a method for debugging a workflow instance includes communicating to a workflow engine a request to attach to a first workflow instance of a plurality of workflow instances such that a second workflow instance of the plurality of workflow instances is not interrupted. The method also includes communicating messages relating to the first workflow instance to at least one client, the messages including at least one of a breakpoint status and a workflow instance status.
In another aspect, a system for monitoring and debugging a plurality of processes over a network is provided. The system includes at least one client communicatively coupled to the network and at least one server including a workflow service provider and a workflow engine. The at least one server is communicatively coupled to the network. The system also includes at least one device communicatively coupled to the network and configured to run a plurality of processes. The workflow engine is configured to monitor a first process of the plurality of processes such that a second process of the plurality of processes is not interrupted. The at least one client is configured to display details of the first process, wherein the details include at least one of an alert raised when the first process has communicated data to the second process, an alert raised when the first process encounters a fault, and an alert raised when the first process is completed.
Set forth below are descriptions of exemplary systems and methods for use in debugging and monitoring running workflow instances in an automation system, and which provide a number of technical effects. One such technical effect is to provide systems and methods that enable one or more clients to simultaneously debug multiple workflow instances throughout a distributed network without impacting other running workflow instances.
As used herein, the term “workflow instance” refers to a process or program that is executed or run. A workflow instance is run on a device, such as a computer or automation controller, electrically coupled to a network.
In the exemplary embodiment, client 102 is communicatively connected to network 108 via a network interface (not shown). A user accesses, such as dialing into, or directly logging into, an intranet or the Internet to gain access to system 100. Client 102 may connect to network 108 through any suitable interface including a different network (not shown), such as a WAN or a LAN, dial in connections, cable modems, wireless networks, and special high-speed ISDN lines. Client 102 includes any suitable device capable of interconnecting to network 108, including, without limitation, a web-based telephone or other web-based connectable equipment. Client 102 may be a stand-alone client, such as a thin client, that runs only an operating system and an application for accessing and communicating with system 100. Alternatively, client 102 may operate as an application installed on a personal computer (PC) and may run similarly and/or concurrently with other programs. Client 102 also includes a system memory (not shown) electrically connected to a system bus (not shown) and, in one embodiment, includes an operating system and a user-oriented program and data. Client 102 also includes user interaction devices such as a display 110, a keyboard 112, and a mouse 114.
Server 104 is communicatively coupled to network 108 via a network interface (not shown). Server 104 includes a system memory (not shown) electrically connected to a system bus (not shown) and, in one embodiment, includes an operating system. In the exemplary embodiment, server 104 includes a workflow service provider 116. Server 104 also includes at least one processor (not shown) which supports enumeration of running service providers, such as service provider 116. Additionally, server 104 includes a workflow engine 118. In the exemplary embodiment, server 104 hosts both workflow service provider 116 and workflow engine 118. In an alternative embodiment, system 100 includes more than one server 104 such that a first server hosts workflow service provider 116 and a second server hosts workflow engine 118. In a further alternative embodiment, server 104 is configured as a collection of multiple servers in a clustered or replicated environment.
System 100 also includes at least one remote device 106. Each remote device 106 may be an automation system device such as, but not limited to, a manufacturing machine and/or a data sensor. Alternatively, each remote device 106 may be a computer operatively coupled to an automation system device.
During operation, client 102 transmits debugging commands to server 104 via network 108. More specifically, client 102 transmits debugging commands to workflow service provider 116, which, in turn, transmits the commands to workflow engine 118. The debugging commands may include commands including, but not limited to only including, a debug initialization command and/or a debug release command. Workflow service provider 116 tracks an identifier for client 102 that requests workflow engine 118 to attach to a running workflow instance for debugging purposes. Workflow service provider 116 also tracks an identifier for the workflow instance being debugged. Workflow service provider 116 thus manages debugging sessions using such identifiers. For example, the workflow service provider tracks a first workflow instance running on a device and being debugged by a first client, while also tracking a second workflow instance running on the device and being debugged by a second client. Accordingly, workflow service provider 116 enables multiple clients 102 to debug workflow instances running on the same device 106. Similarly, workflow service provider 116 enables multiple clients 102 to debug the same workflow instance running on a device. As an example, the workflow service provider tracks a workflow instance running on a device and being debugged by both a first client and a second client simultaneously. Moreover, workflow service provider 116 enables multiple clients 102 to debug multiple workflow instances running on multiple devices 106.
Workflow engine 118, in response to a debug request transmitted by client 102 to workflow service provider 116, attaches to the requested workflow instance. Workflow engine 118 then transmits messages relating to the workflow instance to workflow service provider 116, which, in turn, transmits the messages to client 102. The messages include, but are not limited to, notification that a workflow instance that was waiting on external data has received the data, notification that a fault has occurred, and/or notification that the workflow instance being debugged has finished. The messages are received and displayed by client 102 using display 110.
Client 102 also manages the addition and deletion of breakpoints within a workflow instance being debugged. A breakpoint is a defined point within a workflow instance when a predetermined action occurs and/or when a value is set to a predetermined value or within a predetermined value range. When a debugging session is initiated, client 102 transmits a list of currently defined breakpoints for that particular workflow instance, if any. Client 102 enables a user to add new breakpoints while a debugging session is running. Further, client 102 enables a user to remove breakpoints from a running debugging session. When a breakpoint is encountered, workflow engine 118 pauses the workflow instance and waits for a command from client 102. In one embodiment, client 102 instructs workflow engine 118 to continue the workflow instance from the encountered breakpoint or stop the workflow instance. In an alternative embodiment, client 102 can also instruct workflow engine 118 to continue the workflow instance from a point within the workflow instance different than the encountered breakpoint. In a further alternative embodiment, client 102 can also instruct workflow engine 118 to switch to executing a different workflow instance. In a further alternative embodiment, client 102 can dynamically modify the flow control logic of the workflow instance. For example, client 102 can modify a “while” loop within the workflow instance logic such that the workflow instance functions differently with respect to the modified flow control logic.
Additionally, client 102 can request a modification of a value of a workflow instance variable of a workflow instance being debugged. Client 102 transmits the request to workflow service provider 116, which, in turn, transmits the request to workflow engine 118. Workflow engine 118 attempts to modify the variable value and transmits a response indicating whether the value was successfully modified.
Moreover, in the exemplary embodiment, workflow engine 118, in response to the debug request transmitted by client 102 to workflow service provider 116, attaches 204 to the requested workflow instance running on device 106 (shown in
In an alternative embodiment, when a debugging session is initiated, client 102 transmits a list of currently defined breakpoints for that particular workflow instance, if any. More specifically, client 102 transmits the list of currently defined breakpoints to workflow service provider 116. Client 102 enables a user to add new breakpoints while a debugging session is running. Further, client 102 enables a user to remove breakpoints from a running debugging session. When a breakpoint is encountered, workflow engine 118 pauses the workflow instance and waits for a command from client 102. In one embodiment, client 102 instructs workflow engine 118 to continue the workflow instance from the encountered breakpoint or stop the workflow instance. In an alternative embodiment, client 102 can also instruct workflow engine 118 to continue the workflow instance from a point within the workflow instance different than the encountered breakpoint. In a further alternative embodiment, client 102 can also instruct workflow engine 118 to switch to executing a different workflow instance. In a further alternative embodiment, client 102 can dynamically modify the flow control logic of the workflow instance.
In a further alternative embodiment, client 102 requests a modification of a value of a workflow instance variable of a workflow instance being debugged. Client 102 transmits the request to workflow service provider 116, which, in turn, transmits the request to workflow engine 118. Workflow engine 118 attempts to modify the variable value and transmits a response indicating whether the value was successfully modified.
The above-described systems and methods facilitate remotely debugging a running workflow instance without interrupting other workflow instances running on the same device. Moreover, enabling a user to remotely debug a workflow instance facilitates the user to provide offsite help without a need to add extra debugging software on the remote device. Further, the systems and methods described above facilitate simultaneously debugging multiple workflow instances running on the same device, whether debugging from one client or multiple clients.
In summary, in one embodiment, a method for monitoring processes over a network is provided. The method includes attaching to a first process of a plurality of processes running on a remote device such that a second process of the plurality of processes is not interrupted. In a particular embodiment, attaching to a first process includes communicating debugging commands from the client to a workflow engine. The workflow engine attaches to the first process in response to the client commands. In a further embodiment, attaching to a first process includes communicating debugging commands from a plurality of clients to a workflow engine, the commands relating to multiple processes. The workflow engine attaches to the process requested by each client.
Moreover, in one embodiment, the method also includes defining at least one breakpoint within the first process and communicating the at least one breakpoint to the workflow engine. In an alternative embodiment, the method includes communicating to the workflow engine a client request to modify a process variable value and communicating a response from the workflow engine regarding if the variable value modification was successful.
Further, in one embodiment, the method also includes displaying details of the first process at a client. In a further embodiment, displaying details of the first process includes communicating to the client messages relating to the first process. The messages include process variable values, a breakpoint status, an alert that the first process has communicated data to the second process, a fault alert, and/or a process completion alert. In a further embodiment, and where a breakpoint has been encountered by the first process, displaying details of the first process includes displaying a set of options including stopping the first process, continuing the first process from the breakpoint, jumping to the second process, jumping to a different location within the first process, and/or modifying the flow control logic of the first process.
As used herein, an element or step recited in the singular and proceeded with the word “a” or “an” should be understood as not excluding a plurality of said elements or steps, unless such exclusion is explicitly recited. Further, references to one embodiment of the present invention are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the recited features.
Exemplary embodiments of systems and methods for enabling remotely debugging and/or monitoring one or more running workflow instances are described above in detail. The systems and methods are not limited to the specific embodiments described herein, but rather, components of the systems and/or steps of the methods may be utilized independently and separately from other components and/or steps described herein. Further, the described system components and/or method steps can also be defined in, or used in combination with, other systems and/or methods, and are not limited to practice with only the systems and methods as described herein.
While the systems and methods have been described in terms of various specific embodiments, those skilled in the art will recognize that the systems and methods can be practiced with modification within the spirit and scope of the claims.