Business Objects and Lombardi Coaches
October 26, 2011 11 Comments
We’re working with IBM BPM 7.5 these days, or rather making it work, and a little idiosyncrasy of the product had us head-scratching for a few hours.
You may or may not know that the Lombardi part of the product uses variables to represent business process data. You would usually define variables local to the business process definition (BPD) and use data mappings to select what data will be used as inputs and outputs to the various activities within the process.
You can define your own data types (business objects) for these variables. So as way of example we defined an Individual, with string attributes for first and last names. Nothing fancy.
Then added a private variable to the BPD named individual of type Individual. Note how we did not specify a default value for the variable.
The log activity has a simple system script service to write the individual’s attributes to the system log:
When you run this, the first activity will let you populate the individual variable values:
What happens next is not that predictable. One would assume that the UI form took the user supplied values for fname and lname and used them to initialise and populate the individual.
Once the Coach task completed the process moved on to the log activity and failed. Crashed and burned.
The BPD instance has failed and the error is in the Log activity:
The details of the error are self explanatory, the individual variable is undefined:
It turns out that complex type variables need to be explicitly initialised, particularly when Coaches are involved!
So, the IBM documented approach is to use a script activity to intitialise them:
But we also found out in our tests that giiving the variable default values also solves the problem, even if the values are empty strings:
So, hope this tip comes useful to someone else and you can look fwd to more posts on BPM 7.5
I’m sure we’re not going to be short of material for quite some time…