Now the part comes is how to set titles. I am still working on implementing non-intrusive way of setting titles without ever changing BPEL code, but for now let's talk about how it is done Out of the Box:
Recommended Approach is:
I didn't like the idea of Java embed, just as it conflicts with other best practices Oracle has and it creates an additional workItem overhead for BPEL RT. Correct way of doing this would be to write BPEL function to do this. I wrote BPEL function as below:
This function sets the title of BPEL process
The signature of this function is : ora:setProcessTitle ('title', 'auditTrail'?)
auditTrail: true/false, it is optional and default value is true.
With this, you can set the title as native assign operation:
It doesn't reduce the code footprint that much, but still provides neater BPEL code and centralized way of handling Audit.