I recently had the pleasure of presenting the Oracle Key Note at the
Butler Business Process Management & Integration symposium. The
subject of the keynote was to look at how we can use business analytics
to enable us modify processes already in-flight.
Collecting Real Time Business Analytics
Business
Activity Monitoring (BAM) provides us with the tool to collect the near
time analytics on which we can base our decision on how we wish to
modify our in-flight processes.For those of you who are not familiar with Oracle BAM, it enables the business to gain a real-time view of what’s happening with the business. To achieve this it provides the following key components:
Modifying In-Flight Processes
Once we have the real time analytics, the next challenge here is to use the data to modify the processes already in flight.Now when we talk about modifying In-Flight Processes; most people assume that this involves quickly writing a new version of the process, testing it, deploy it, and then migrating the existing in-flight processes to this new improved version. The reality is that is rarely as quick as required!!! Rather what’s really required from a business perspective is to be able to modify the flow through a process (and its sub-processes) in order to obtain the desired business outcome. There are three basic patterns here which provide a way of achieving this, these are:
Modify Process Flow
With
this approach we are not looking to modify the actual process, rather
modify the “path” through the process. If we look at any process, then
at various points the process will hit a decision point which will
determine which route it should take the through the process. Rather
than building these decision points directly into the process we can
externalise them in a rules engine such as Oracle Business Rules or iLog
JRules, as illustrated below.![]() This then enables the business to modify the rules based on what’s currently happening within the business (as indicated through BAM) and thus get the process to take a different route. An excellent case study for this is Cattles (a UK company which lends money to the secondary market), which uses a combination of BPEL, BAM and Rules for this purpose.
Exception Management
BPEL already
provides a comprehensive way to handle exceptions, within the context of
a process. However on some occasions we want to take a more holistic
view to managing exceptions. This is certainly the case where we are
suddenly “hitting” a common exception across multiple processes.For example, if we have a loan flow process that’s going out to an external credit rating agency, and for some reason that credit rating check fails. Within the individual process BPEL process, we could have built in a simple re-try mechanism that simply waits a period of time before re-trying the service. However if we start having a high number of failures (e.g. we may 1000’s of these processes running at any time), rather than handle the same exception multiple times (at least the same root cause) we can use BAM to detect that we have an issue and kick-off a single process to handle that exception (as illustrated below). ![]()
Dynamic Process Assembly
Rather
than use BAM to feed a Dashboard, we can use it as a real time data
source. A BPEL process can then query this real time data and pass this
to the rules engine; enabling us to evaluate rules based on real time
data.At this point we could just use the result from the rules engine to dictate the flow through a process (as we did with the first example – Modify Process Flow). However (as the title implies) we can take it a step further and dynamically assemble the process. The trick here is to have multiple “sub” processes all with the same WSDL definition. The rules engine rather than returning a “decision” now returns the end-point of the sub process to call, which the main BPEL process can then call dynamically (as illustrated below). ![]() For more details on how to implement dynamic routing, see my previous blog; Using BPEL to Implement Dynamic Content Based Routing. |
Wednesday, May 9, 2012
Using Analytics to Modify In-Flight Processes
Writing a Recursive BPEL Process
Recently I was working with a client who wanted to implement a recursive
process (i.e. one that calls itself). Now Recursion is a classic
programming pattern, and in theory it should be pretty straight forward
for a process to call itself. However at first sight it’s not so
obvious.
Example
I’ve created a simple example process, based of course on the classic Factorial example. You can download this here.
Deployment Considerations
The
one drawback with this approach is that the WSDL file will now contain
the Endpoint location for the service within in it. Thus is you were to
deploy the process on a different server it would fail at run-time.So you need to modify the WSDL file at deployment time so that the endpoint reflects the hostname and port number of where the process is actually being deployed. The simplest way to do this is update your build script so that ant will automatically do this for you.
Final Thought
Now
in theory you could have incredibly nested processes using this
approach, however I would advise is bad practice and is likely to have
performance implications.For example; if we ran the Factorial process to work out 50 Factorial, that would result in 50 process instances. Now if we expected to handle 1000 process running in parallel, this would result in 50,000 process instances – so the actual number of process instance could increase very dramatically. So I would recommend using this approach with caution to ensure that it doesn’t result in a dramatic increase in the overall number of process instances. |
Labels: BPEL



