Thursday, September 16, 2010

Non intrusive set title for BPEL, AIA

If you check my blog http://chintanblog.blogspot.com/2010/03/bpel-set-title.html you can see how to configure set title for BPEL process and why it is almost absolutely necessary for enterprise implementation. It also makes search in BPEL console quite useful http://chintanblog.blogspot.com/2010/03/bpel-title-wildcard-search_01.html.

We did encounter multiple issues which forced us to think non intrusive approach of setting title of BPEL process
  • We had to change title of more than 80 processes and writing logic and changing each process was very cumbersome (it had to go through un-necessary QA cycles)
  • Lot of process were already deployed and had lot of instances, we couldn't go back in time and set the title for them
  • Due to business requirement, if we plan to change the title, we have to go through this cycle again
  • We didn't want to touch OOTB process which comes with PIP, but we needed our custom title for those

Here is what I came up with:



Implementation Steps
  1. EJB 3.0 timer which polls for new instances in BPEL DB
  2. Via JDBC, extract Audit Information and Audit Trail (it would be configurable how much data to extract)
  3. Once payload is available, apply XPath (based on configuration) to extract the title for a particular process
  4. Update the title of the BPEL process

It sounded pretty complicated and resource exhaustive, but when I implemented and ran on the huge amount of data. I could see that we could set title of individual process in just 0.03 seconds, which was quite acceptable. It runs in separate JVM and doesn't talk with BPEL Runtime Engine so it doesn't increase any load on BPEL. It does increase some load on database but it is just select and update, there is no heavy processing going inside the database.

With this approach, we could achieve following
  • Centralized approach to configure and set the titles
  • We could change title of OOTB processes without touching the code
  • We could set the title of old instances (even stale instances)
  • Changing title was just matter of configuration and pure XPath. I also increased the size to title from 50 to 256, so you could put more data in title (e.g. order number, organization id, etc...)

1 comment:

Shanmu said...

Hi Chintan,
I am interested in knowing how you extract the payload and audit trail from the dehydration db - when I tried myself sometime back (in version 10.1.3.4), the BLOB storing the audit trail was a gzipped object serialised into the DB and I couldnot quite get the class to deserialise it into.
When I had to do something similar, I followed the same approach, but I had to use the BPEL Client API (which connects to the engine beans, I guess) to get the payload and audit trail.