SOA Suite 11g - api tricks part 3 - composite mode / state

Yesterday one of my colleagues called in to ask how to retrieve the state of a composite.

The first important piece to understand is that there are two parts to the state
a) active | retired (this setting decides whether new instances can be created [active], or old ones are allowed to finish w/o new ones being allowed to be created [retired] - this is referred to as composite mode
b) on | off (this is the composite state) and overrides (a) in either allowing call access [invoke / callback] to the composite revision [on] or not at all [off]. This is referred to as composite state.

This entry explained how to find a specific instance back via composite sensor values, instance id, or conversation id, yet the starting point is the same.

From oracle.soa.management.facade.Locator one can use getComposite(CompositeDN), which gets you to the composite (an impl of oracle.soa.management.facade.Composite)

In order to retrieve the mode (a) and the state (b) - use the api (and unfortunately the implementation).


System.out.println("Mode: " + composite.getMode() + " state: " +
((oracle.soa.management.internal.facade.CompositeImpl)composite).getState());

This will get you something along the below line

Mode: active state: on.

A few comments in general on the api

Comments:

Dear, I'm sorry but I can't find any getState() method CompositeImpl. I linked my java project with soa-infra-mgmt.jar. Can you help me to find the solution ? Regards

Posted by Daniel Rousset on January 14, 2010 at 04:22 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips and tricks straight from the SOA / BPM development team at Oracle HQ

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