How should I generate an external reference to a composite instance?

A common problem in SOA Suite and one that we have a variety of tools to solve is the need to obtain a reference to some kind of tracking identity of the process (or processes) which processed some activity, for use in some kind of external system. For example, I have a composite that processes orders. I wish to know which composite instance relates to which order in my order monitoring system. To do so, I would need to obtain some sort of reference identity within the composite flow that I can pass to my order monitoring system.

We offer the ComponentID, the CompositeID and the ECID, all of which could be used to fulfill this role. Each of these has a different scope.

  • The ComponentID is the identity of the component in question and generally only exists for BPEL processes. 
  • The CompositeID is the identity of the enclosing composite object and generally exists for any composite.
  • The ECID is a globally unique identifier, usually generated at the time of receiving the input message.

Each of these values could be used legitimately as a reference value from external systems. Traditionally, the "BPEL Process ID" from earlier versions, which most analogously maps to the ComponentID, was used for this reference value. For 11g, however, you should really only consider the ECID. There are various reasons why.

When auditing is turned to "OFF", CompositeID is effectively null, as there is no "tracking composite" generated when auditing is disabled. Calls to ora:getCompositeInstanceId will return null, and trying to assign from the property tracking.compositeInstanceId will again generate a null reference. This means that code that, for example, assigned from ora:getCompositeId to a process variable, will find they will fail with a "selection failure" when auditing is turned off. Clearly this is undesireable behaviour, as the auditing state should be orthogonal to the process flow and there should be no feedback.

The ComponentID suffers in that it is only applicable for BPEL process instances, and is difficult to search for easily within the Enterprise Manager console.

So, in summary, if you wish to create a long term identity for external reference that will always exist and is unique, you should always use the ECID.

One quick and easy way to populate an ECID is demonstrated in my previous blog post.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About


This is the blog for the Oracle FMW Architects team fondly known as the A-Team. The A-Team is the central, technical, outbound team as part of the FMW Development organization working with Oracle's largest and most important customers. We support Oracle Sales, Consulting and Support when deep technical and architectural help is needed from Oracle Development.
Primarily this blog is tailored for SOA issues (BPEL, OSB, BPM, Adapters, CEP, B2B, JCAP)that are encountered by our team. Expect real solutions to customer problems, encountered during customer engagements.
We will highlight best practices, workarounds, architectural discussions, and discuss topics that are relevant in the SOA technical space today.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today