How To Get The Instance ID of a BPEL Process at Runtime

Oracle(R) BPEL Process Manager - Version: 10.1.2
Goal
When an instance of a BPEL process/ suitecase is started the instance ID is added to the field CIKEY of cube_instance table. How is it possible to get the instance ID at runtime?

Solution
To get access to the instance If of a newly started BPEL suitecase/process the build-in method
getInstanceId() has to be used.
This method can be used in the bpel:exec action only.
<bpelx:exec name="Java_Embedding_1" language="java" version="1.3">
<![CDATA[ setVariableData("instance", new Long(getInstanceId())); ]]>
</bpelx:exec>
<bpelx:exec name="Java_Embedding_1" language="java" version="1.3"><!--[CDATA[ setVariableData("instance", new Long(getInstanceId())); ]]--></bpelx:exec>
In that case the instance ID is stored in the variable 'instance', which is of type 'long' and has been created in the scope in which the bpel:exec action resides.

Comments

Popular posts from this blog

ORA-44412: XE edition memory parameter invalid or not specified

BPEL DOM Exceptions ORABPEL 09200 - 09250

How to mount a WD Book Live as NFS in OEL6U3