« Oracle - the ID Management acquisition trail | Main | Is Forms Dead? »

Changing Processes on the Fly

Modifying a Running BPEL Process


In an earlier entry I wrote about different types of dynamic BPEL.  There are times when you want to be able to modify the BPEL process whilst an instance is executing and have the changes be picked up immediately.  For example imagine a long running process that calls a service that has different implementations over time.  The service may be provided as part of an external commercial contract.  When the process starts at time T1 then vendor A has the contract and interface A1 should be used.  However by the time the process is ready to invoke the service the contract has expired and now vendor B has the contract and provides the service via a different interface B1.  How would we deal with this.


Well we can't actually change the BPEL code being executed once the process instance has started so what can we do?


Changing BPEL on the Fly


First of all we encapsulate the variable part of the process in a sub-process.  This removes the restriction on being unable to update the code of a running process instance because we now have two processes, one of which will initiate instances of the other.


Now because we have a seperate process for the variable part we can create a new version of the second BPEL process, possibly on the fly, and deploy it with a new revision number.  The only constraints on the changeable BPEL process are that the interface must not change (otherwise the calling process will get confused) and that the revision number must increase (otherwise any currently executing instances of the old process will be aborted).


We need to make the new process version the default version so that the calling BPEL process always calls the default version and gets the latest version.


Possible Use Cases


When might I want to do this.  Well obviously one use case is when calling a service that changes over time as outlined in the introduction.  This is a good method for encapsulating access to external services anyway, as it allows you to build to a standard interface that is then adapted in the second process to the needs of the real service.


Another use case is when the BPEL processes are all highly dynamic and part of the process path must be created on the fly from semantic introspection.  Very much a research topic at the moment.


Another use may be to allow different business rules to take effect and be combined in different ways, particularly if the parent process is very long running.


Not a Panacea


I have to confess that allowing BPEL processes to be changed on the fly is not my favorite approach.  I prefer to see what can be accomplished within the confines of BPEL first, such as the use of dynamic partner links or switch statements.  Still if you want to push the envelope be my guest!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on January 5, 2006 6:36 PM.

The previous post in this blog was Oracle - the ID Management acquisition trail.

The next post in this blog is Is Forms Dead?.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle