After years of debate the Business Process Management Notation 2.0 (BPMN20) is about to be ratified this year (2010) by the Object Management Group (OMG). By this ratification, a standard for BPM design and execution will become available that aims at three goals:
- It's got to be understandable for end-users, business analysts and developers, simplicity is the key-word.
- It’s got to be interchangeable between the vendors. I personally have doubts about this, looking at the past at for example the way 'standard' SQL is implemented in different vendor stacks. But it give fast insight in the same structure.
- Aim for a direct executable process, as Oracle states it 'What you see is what you execute'.
Since this blog is part of the Oracle Blog, I'll relate the topic to the implementation in the Oracle stack. See Oracle BPM 11g less is more
for more a quick overview of the Oracle BPM stack
One key concept in the BPMN spec is around sub-processes. As described in the BPMN20 specification, 'Sub-Processes define a contextual scope that can be used for attribute visibility, transactional scope, for the handling of exceptions, of Events, or for compensation
Sub-processes act as a container to combine the BPMN components Activities, Gateways and Events, and are, in a way just like any other process. This blog describes the following topics related to BPMN sub processes
- Sub-processes abstract the details for Business Analysts
- Sub-processes define a scope in which error handling is defined on the boundary
- Event sub-processes can be used within processes to catch Business Events, such as errors or exceptions
Let's start off with how Business Analyst will use sub-processes. Business Analysts like to define the outline of a process on a high level, and they anticipate that designers and developers will fill in details of every process part. With this in mind a sub process offers an excellent component to use in your high level process, knowing that it can be detailed out later. For instance when looking at the processing needed for Order capture, we can identify one high level functionality ´Inventory management´. Within the Oracle BPM stack Business Analysts will define the high level Business Analysts design within the Oracle BPM Process Composer, a browser based design tool where all BPMN20 components can be used to define a process. Pertaining to the first rule of BPMN20, this tool is simple to use. Simply open a browser, go to the Process Composer URL, log on, and based on your rights create, edit or view a project. Looking at our example an Order project is created, containing a ´Order Capture´ process, lanes represent the roles of persons involved. A series of activities related to the ´Order Capture´ process, one of them being the ´Inventory Management´ sub-process, is created by dragging components onto the canvas.
After defining the high level process, in the BPM Process Composer, the process is exported to the Oracle development environment for fleshing out the details by Designers and Developers. First the Designer starts working out the details of the ´Inventory Management´ sub process. For simplicity’s sake let's assume only two activities are involved, 'Get Product Inventory status' and 'Pick product from stock', both services connected to an SAP system. A Designer does not want to be involved into the nitty gritty detail of having to physically connect to a SAP system, so he/she needs the help of a developer. Here we step outside the standard BPM world and enter the basics of the Oracle SOA world, Service Component Architecture (SCA). SCA helps to overcome the burden of the first SOA implementations, which was tying together multiple services, which only are used in the scope of a larger component (see Composing-applications like Lego
). The BPM process is created in the context of a SCA container and is able to reuse components defined in the SCA container. So the developer has to create adapters towards the two necessary SAP services, which are directly usable by the Designer in the BPM project.
Now we enter the design phase where we'd like to add exception flows. For example, what to do when the first service 'Get Product Inventory status' returns a 'Not in stock' status. In that case we'd like to call a 'Product replenishment' service by means of a UI page and stop the ´Inventory Management´ sub processes. Here two other important functionalities of sub processes come into view. First of all we'd like to step out of the scope of the ´Inventory Management´ sub-process and move the process flow into the 'Product replenishment' activity, which again is a sub process. We step out of a sub process by raising a Business Exception at the activity 'Get Product Inventory status. A Business Exception is a functional error with actual meaning, contrary to a technical error like timing out. In a Gateway we can check the Inventory status, and when stock is too low we can throw an 'out-of-stock' Business Exception. The Business Exception can be handled at the boundary of the ´Inventory Management´ sub process where we've defined a catch event for the 'out-of-stock' Exception. Now we come to the next usage of (sub)processes, event (sub)processes. Event sub-processes can be used within processes to catch Business Events, such as errors or exceptions. They are placed separately within the process model, with an event listener placed on the boundary. In most cases (the happy process flow), these event sub-processes will not be executed.
Within BPMN20 sub-processes help you, on a functional level, in making the process understandable, and on a technical level sub-processes help you in defining a scope for related activities and enable error handling.
Thanks to Julian Esevich Sanchez (Oracle BPM) for discussions.
Léon Smiers, Oracle Solution Architect, Oracle ACE