SOA Suite 11g: set the Composite Instance title with a Mediator component

In this blog I will describe how to set the composite title with a Mediator component. I will also describe where this approach matches and where it differs from setting the title with a BPM or BPEL component.

Lets first start with an overall important match: you need the setCompositeInstanceTitle function. This function sets the composite instance title and returns it. The return value brings us to the biggest difference: the assignment of the return value. In BPMN and BPEL you must assign the return value to a variable. In Mediator you must assign it to a property.

This post shows the Mediator approach. In parallel posts I show the BPM and BPEL approach.

1) Start by creating a new SOA Project

SOA Suite 11g: set the Composite Instance title with a Mediator component image0013

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2) This will start the ‘Create SOA Project’ wizard. Specify a name for the project. I used ‘scaMediator_setCompositeInstanceTitle’ for the name. Make sure that the SOA technology is selected.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0033

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 3) In the next step, select the ‘Composite with Mediator’ template. 

SOA Suite 11g: set the Composite Instance title with a Mediator component image0052

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 4) After that, the ‘Create Mediator’ wizard is started. Specify a name for the process. I used ‘setTitle’ for the name. Create or select a wsdl that defines the service contract. I used the one that is created in the parallel BPEL post (a String input and output field).

SOA Suite 11g: set the Composite Instance title with a Mediator component image0072

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5) At this moment the created composite looks like the image below. Nothing special happened yet.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0092

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 6) To set the title, a routing rule is required. Add it to the mplan by clicking the green cross. After that select the ‘Echo’ type.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0112

 

 

 

 

 

 

 

SOA Suite 11g: set the Composite Instance title with a Mediator component image0132 

 

 

 

 

 

 

 

 

 

 

 

 

 

7) Now it is time to set the title. Open the Assign Values field editor by clicking the button after the ‘Assign Values’ field. The ‘Assign Value’ editor appears. Remember that in Mediator the return value of the ‘setCompositeInstanceTitle’ function must be assigned to a property. All Oracle documentation references to the invisible ‘tracking.compositeInstanceTitle’ attribute. But because the actual work is done by the ‘setCompositeInstanceTitle’ function it seems any String property is sufficient. After trying this with the ‘testfwk.testRunName’ property this assumption still holds.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0152

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8 ) Supply the title expression by typing it or using the expression builder.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0172

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9) Now the composite title is set and also assigned to the title variable. 

SOA Suite 11g: set the Composite Instance title with a Mediator component image0191

 

 

 

 

 

 

 

 

 10) Deploy the application and test if from the Enterprise Manager Console. The created instance contains the specified title/name.

SOA Suite 11g: set the Composite Instance title with a Mediator component image0211

 

 

 

 

 

 

 

 

 

 

 

 

 

Related posts:
https://technology.amis.nl/2011/11/28/soa-suite-11g-set-the-composite-instance-title-with-a-bpel-component/
https://technology.amis.nl/2011/11/28/soa-suite-11g-set-the-composite-instance-title-with-a-bpm-component/