Neat pro-tip for getting the ECID in BPEL
By christian on Dec 07, 2011
Are you writing a BPEL process and want to get the ECID for the process instance for some reason? Maybe you're building a homebrew tracking mechanism or something. Maybe you want to write it to the database for later reference.
The easy way to do it: go to your "input" partnerlink receive activity. If you edit the properties, you can assign the "tracking.ecid" to a BPEL variable. Simple, and very effective.
First we edit the properties of the receive activity of the input partnerlink.
Here we select the tracking.ecid property on the properties panel.
Here we assign the tracking.ecid to a variable (here it's just called ecid). Note it's BPEL2.0 notation.
You can download this microscopic demonstration application here.
Many thanks to the developer who showed me this trick.