The invention relates generally to debugging of business processes, and more specifically, to model-based debugging of a business process in a graphical user interface.
End users modeling a business process with a business process modeling tool during design time and executing it at runtime may not have the ability to analyze the data flow and control flow during each step of a business process before the business process may be used productively.
End users modeling a business process may require operational data, which is not available at design time and can have difficulties in analyzing a productive business process because a productive environment may differ from a test landscape used in design time.
Business process modeling is error-prone because typically process notations represent a complex programming model having a Turing-complete expressiveness. For example, the data resulting from the execution of a business process may not be as expected by the user or, it might reach an error state.
To identify problems with the execution of the business process, a user may have to manually analyze each business process step by exploring the business process model and tracing a process run from a recorded process log; and also associating events listed therein to a particular process step and steps preceding the particular process step which elements may have caused the problems.
Further, there may be a need to understand a typical process run and any implications of model elements. A user may need to determine if a model of a business process is functionally correct.
Such analysis can be very time-consuming and error-prone especially when a complex model has to be analyzed.
These and other benefits and features of embodiments of the invention will be apparent upon consideration of the following detailed description of preferred embodiments thereof, presented in connection with the following drawings.
A system and method to debug a business process in a graphical environment are described. In various embodiments, a number of breakpoints are set on a business process model and attached to a deployed business process. The deployed business process is executed to examine business process context information at the breakpoints. Upon an occurrence of a breakpoint, business process context information is sent to a graphical user interface.
In various embodiments, a method of the embodiments performs stepping operations and changing a business process context.
The claims set forth the embodiments of the invention with particularity. The invention is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. The embodiments of the invention, together with its advantages, may be best understood from the following detailed description taken in conjunction with the accompanying drawings.
Embodiments of techniques for graphical model-based debugging for business processes are described herein. In the following description, numerous specific details are set forth to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
Reference throughout this specification to “one embodiment”, “this embodiment” and similar phrases, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of these phrases in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
A business process describes an execution of a business goal as receiving a set of inputs, manipulating the received inputs, and producing a set of outputs. Business processes may form complex interaction patterns with other processes; and thus, can have side effects on the operations of other processes and may also be manipulated by other processes. A business process represents a set of activities describing a fulfillment of a business task or a collection of business tasks in a specific order. The set of activities in the specific order are also referred to as business process steps. The business process steps describe the flow of data within the business process. The order, in which the business process steps are executed in, may also be referred to as “control flow” or “business process control flow”. The manner, in which data may be manipulated in a business process, may also be referred to as “data flow” or “business process data flow”. A business process context is a set of variables that may be required in the execution of a business process. A business process context also represents the status of the business goal behind the business process. Some variables in the business process context may have attributes and others may not. Some attributes of the variables related to the context of the business process may represent name-value pairs of data.
Business processes are typically expressed in graphical models to enable professionals with little or no technical knowledge to model business processes in information technology landscapes.
A business process may include, but is not limited to, activity elements, event elements, sub-process elements, tasks, gateways, data objects, control flow connectors, and other elements.
Event elements describe “something that happens.” A “start event” acts as a trigger for a business process. An “end event” represents the result of a business process. An “intermediate event” represents something that happens between the start and end events. An intermediate event may synchronize the business process with external stimuli.
An activity describes the kind of work which is to be performed, and, generally, an atomic unit of work.
A task represents a single unit of work. Tasks may also represent human interactions (as opposed to other activities which may represent automated interactions with other business systems or business processes).
A sub-process is used to hide or reveal additional levels of business process detail. A sub-process may have its own start and end events. A sub-process is a scoping concept in a business process and represents a business process collapsed to a reusable block.
A business process step typically requires data to run. Such data may be provided to the business process step via an input mapping. An input mapping describes how data related to the execution of a business process step is obtained from a business process context. An output mapping describes how data resulting from the execution of the process step is provided back to the business process context.
A business process may be modeled so that the control flow of the business process ensures the satisfaction of a number of requirements related to the business goal represented by the business process, such as, but not limited to, efficiency, timeliness, quality of service, resource consumption, and any Service Level Agreements (SLAs).
Within an organization, business processes may be modeled by business process experts who may have thorough knowledge of the particular business of the organization, a particular business process, the desired deliverables of a business process, and any requirements for the business process. Business processes may be modeled in Graphical User Interfaces (“GUIs”) or in text-based environments. Business processes are typically modeled using business process modeling languages. Business Process Modeling Notation (“BPMN”) is one such example. BPMN provides a graphical notation to model business processes. It however should be noted that embodiments described herein may be used to debug business processes modeled with any number of different modeling languages, both text-based and graphical.
In one embodiment, a business process may be modeled on a client GUI (also referred to as “design time environment”) and executed on a server runtime environment. In one embodiment, the GUI client and the server runtime may be deployed and executed on a number of separate machines. In another embodiment, the client GUI and the server runtime may be deployed and executed on the same machine.
After the creation of a business process, it may be necessary to examine the execution of the business process, the data flow, the input and output mappings, and the process context on one or more business process steps. Such an examination may be necessary, for example, to ensure that the business process control flow meets expected requirements, to ensure that the business process data flow is modeled to correctly reflect the manipulation of data involved, and to recognize any errors that may occur during the execution of the business process. If needed, the business process can be debugged. Also, business process context information may need to be presented via a GUI for the benefit of a business process expert. Thus, the analysis of the business process may happen in the design time environment which is where the business process is modeled so that an end user does not need to be familiar with a productive environment. For example, the content of the business process content may be relevant for the state of the business process at a point in the execution of the business process. For example, the business process context may hold data resulting from a step in the business process. Thus, by examining the data resulting from the step, a business process expert may determine if the business process executed as expected.
Debugging involves setting breakpoints where the business process is suspended and information is collected. A breakpoint is a way to forcefully suspend a business process run at a specific step and allow for inspecting the business process context at this particular step. In debugging a process, a user may decide to initially define a number of breakpoints, thus forcing the process to stop at these locations.
In various embodiments, temporary breakpoints may also be set. Temporary breakpoints may be set automatically by a system without the need for user intervention. A temporary breakpoint is automatically deleted when it is reached; thus, temporary breakpoints can be useful to implement stepping functionality because a process run is suspended once at a temporary breakpoint (e.g., if a user steps to the model element where the temporary breakpoint is).
In various embodiments, a business process is created in a graphical user interface (“GUI”) and debugged in the GUI.
At process block 104, a set of debugging initiation parameters are generated to initiate the debugging of the business process. At process block 106, one or more breakpoints are attached to the business process. In debugging a process, a user may decide to initially define a number of breakpoints, thus forcing the process to stop at these locations.
In one embodiment, the one or more breakpoints are created via graphical tools in the GUI. A breakpoint represents a point in the process execution where process execution is interrupted to examine the business process context of the business process at that point. The parameters in the process context reflect the information that can be retrieved for the business process at a given point in the execution of the business process. The values of the business process parameters represent the state of the business process context at that point in the execution of the business process. For example, a step in a business process may require data; then the step in the business process may process the data and produce some resulting data. Thus, before the step in the business process is executed and after the step in the business process is executed, the parameter values in the business process context may hold different data. By examining the data before the step and after the step, it may be determined whether the business process executes as expected. For instance, a business process may be expected to produce deliverables per a unit of time. By examining the data in the business process context it may be determined whether the business process produces the expected number of deliverables for the expected unit of time.
At process block 108, the business process is executed with the debugging initiation parameters. At process block 110, the execution of the business process is suspended and the values of a number of business process context parameters at the time of the suspension are sent to the GUI. The context parameters are sent after a breakpoint is reached. After the breakpoint is reached, the business process execution is suspended and the values of the context parameters at that point in the execution are sent to the GUI. At process block 112, the debugging is terminated. The debugging of the business process may be terminated either at the end of the business process execution or after the last breakpoint attached to the business process. In various embodiments, a debugging of a business process may be terminated by a user via tools in the design time environment.
In one embodiment, the execution of the business process may be iteratively resumed and interrupted until context information is displayed in the GUI client about each of the number of created breakpoints.
At process block 204, a debugging identifier (ID) is generated. The debugging identifier is used to differentiate the debugging session from other debugging sessions that may be performed simultaneously. Also, more than one instance of the same business process may be debugged, depending on the selection of available debugging modes. Thus, the debugging ID may serve to identify debugging sessions and business process instances thereof. At process block 206, a number of breakpoint IDs are generated for the received number of breakpoints. The breakpoint IDs are used to relate debugging operations to a particular breakpoint instance.
In one embodiment, the process as described in
In one embodiment, the process as described in
At process block 604, business process context information related to the business process is received. The business process context information is represented by business process parameters and their corresponding values at the breakpoint when execution is suspended. At process block 606, the business process context parameter values are transmitted to graphical elements in the GUI.
In one exemplary embodiment, the process as described in
In one exemplary embodiment, the process as described in
At process block 1004, the set of input data is displayed in the GUI. At process block 1006, the input data breakpoint is removed. The input data breakpoint is removed because there is no need to keep the breakpoint in the system after the input data for the process step of the business process has been examined. In this manner, system resources may be allocated if and when needed.
In various embodiments, a system may provide a number of commands to examine the lifecycle of debuggable objects (e.g., model elements) of a business process and the input and output data related to debuggable objects. Using such commands, a user may navigate through the flow of a business process and choose which elements in a business process to explore and examine. In such a case, the system may create breakpoints on demand to respond to such commands. The debuggable objects (e.g., elements) in this exemplary embodiment include activities, events, sub-processes, gateways, and tasks.
Event elements describe “something that happens.” A “start event” acts as a trigger for a business process. An “end event” represents the result of a business process. An “intermediate event” represents something that happens between the start and end events.
An activity describes the kind of work which is to be performed.
A task represents a single unit of work.
A sub-process is used to hide or reveal additional levels of business process detail. A sub-process may have its own start and end events.
The activity elements of a business process may have the following two stages in their lifecycle: ‘on activation’ and ‘on completion’. The event elements of the business process may have the following two stages in their lifecycle: ‘on activation’ and ‘on completion’. The system of the embodiment may provide commands for a user to step through a business process and explore input and output mapping data, for an element depending on the point of execution of the business process and the lifecycle stage of the element at that point. Because each category of business process elements, e.g., event, activity, and sub-process represents an element of a specific nature, not all commands may be available for all categories of business process elements.
The user may select a ‘step into’ command to explore a sub-process of the business process.
The user may select a ‘step over’ command to direct the debugging to a subsequent debuggable object. The step over command may be chosen if a user does not wish to examine the input or output mapping of an element.
The user may select a ‘step return’ command to leave a sub-process and continue debugging a parent element.
Via the stepping commands, a user may navigate the debugging process and may choose to receive information with a greater granularity for a number of debuggable objects. For example, a user may wish to examine a business process, and then examine each sub-process of a business process in greater granularity.
As each step in the business process (e.g. debuggable object) receives data via an input mapping and delivers resulting data via an output mapping, the data displayed in the GUI depends on the user selected command and on the lifecycle stage the element is in.
Table 1 below describes the effect of selecting each of three commands (step into, step over and step return) on an activity of the business process depending on whether the command reaches the activity at the point before input mapping or in the stage after output mapping.
Table 2 below describes the effect of selecting each of three commands on a start or intermediate event of the business process depending whether the command reaches the event at the point before output mapping or in the stage after output mapping.
Table 3 below describes the effect of selecting each of three commands on an end event of the business process depending if the option reaches the event at the point before input mapping or in the stage after input mapping.
In an exemplary embodiment and exemplary system described herein, a user may choose to explore a sub-process of a business process. Table 4 below describes the effect of selecting each of three commands on a sub-process of the business process.
Referring to Table 4 above, via the ‘step into’ command, the user may examine the complete subflow of the sub-process. Using the ‘step over’ command, the user may navigate the debugging to the next object in the outer business process (that is, the parent of the sub-process).
The server 1215 executes the debugging of the business process via the debugger servlet 1218, which obtains debugging information from the business process (BPM) runtime 1224 via the process adapter 1222. The debugger servlet stores a debugging state in the debugger state module 1220.
The business process runtime 1224 stores deployed business processes in the executable processes store 1230. The business process runtime 1224 also stores states of business processes in the process state store 1226. The debugger servlet 1218 and the business process runtime 1224 obtain context information for the business process via the container adapter module 1216 from the process context module 1228.
In one embodiment, the communication between the server 1215 and the debugging client 1203 is conducted remotely. In another embodiment, the communication between the server 1215 and the debugging client 1203 is conducted locally, that is, both the server 1215 and the debugging client 1203 are running on the same machine.
Table 5 below describes the available commands on a communication protocol between a client and a server in one exemplary embodiment.
Some embodiments may include the above-described methods being written as one or more software components. These components, and the functionality associated with each, may be used by client, server, distributed, or peer computer systems. These components may be written in a computer language corresponding to one or more programming languages such as, functional, declarative, procedural, object-oriented, lower level languages and the like. They may be linked to other components via various application programming interfaces and then compiled into one complete application for a server or a client. Alternatively, the components may be implemented in server and client applications. Further, these components may be linked together via various distributed programming protocols. Some example embodiments may include remote procedure calls being used to implement one or more of these components across a distributed programming environment. For example, a logic level may reside on a first computer system that is remotely located from a second computer system containing an interface level (e.g., a graphical user interface). These first and second computer systems can be configured in a server-client, peer-to-peer, or some other configuration. The clients can vary in complexity from mobile and handheld devices, to thin clients and on to thick clients or even other servers.
The above-illustrated software components are tangibly stored on a computer readable medium as instructions. The term “computer readable medium” should be taken to include a single medium or multiple media that stores one or more sets of instructions. The term “computer readable medium” should be taken to include any physical article that is capable of undergoing a set of physical changes to physically store, encode, or otherwise carry a set of instructions for execution by a computer system which causes the computer system to perform any of the methods or process steps described, represented, or illustrated herein. Examples of computer-readable media include, but are not limited to: magnetic media, such as hard disks, floppy disks, and magnetic tape; optical media such as CD-ROMs, DVDs and holographic devices; magneto-optical media; and hardware devices that are specially configured to store and execute, such as application-specific integrated circuits (“ASICs”), programmable logic devices (“PLDs”) and ROM and RAM devices. Examples of computer readable instructions include machine code, such as produced by a compiler, and files containing higher-level code that are executed by a computer using an interpreter. For example, an embodiment of the may be implemented using Java, C++, or other object-oriented programming language and development tools. Another embodiment may be implemented in hard-wired circuitry in place of, or in combination with machine readable software instructions.
A data source is an information resource. Data sources include sources of data that enable data storage and retrieval. Data sources may include databases, such as, relational, transactional, hierarchical, multi-dimensional (e.g., OLAP), object oriented databases, and the like. Further data sources include tabular data (e.g., spreadsheets, delimited text files), data tagged with a markup language (e.g., XML data), transactional data, unstructured data (e.g., text files, screen scrapings), hierarchical data (e.g., data in a file system, XML data), files, one or more reports, and any other data source accessible through an established protocol, such as, Open DataBase Connectivity (ODBC), produced by an underlying software system (e.g., ERP system), and the like. Data sources may also include a data source where the data is not tangibly stored or otherwise ephemeral such as data streams, broadcast data, and the like. These data sources can include associated data foundations, semantic layers, management systems, security systems and so on.
The above descriptions and illustrations of embodiments of the invention, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to the precise forms disclosed. While specific embodiments of, and examples for, the invention are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the invention, as those skilled in the relevant art will recognize. These modifications can be made to the invention in light of the above detailed description. Rather, the scope of the invention is to be determined by the following claims, which are to be interpreted in accordance with established doctrines of claim construction.