Tuesday, June 19, 2012

Fusion Apps --> great resource from OUG

I am getting more involved with Fusion Apps at the moment and am very grateful to my colleague Angelo S. for the following link.



Check out The Stations

Monday, June 18, 2012

Mediator Resequencing - simple example

Ok, so we lost against Spain - but at least now the world knows "The Fields of Athenry"

Her is a simple example of Mediator re-sequencing - a not so well known SOA Suite feature.
Very interesting for AIA style integrations e.g. multiple order updates in EBS being passed on to Siebel.

I have the following simple scenario -
Order processing - orders are defined as follows -


Notice the key fields - orderID / msgID. There can be multiple messages for the same orderID. Unfortunately they do not always come in the required sequence. For example we could receive -
orderID=1 msgID=3
orderID=1 msgID=2
orderID=1 msgID=1

Fortunately we have the Mediator which can do the re-sequencing for us, so that our output will be as follows -
orderID=1 msgID=1 orderID=1 msgID=2
orderID=1 msgID=3

To illustrate this, I create the following composite -


ReadOrder - is a ReadFileAdapter based on the XSD above.
WriteOrder - is a WriteFileAdapter based on the XSD above.

The Mediator is configured as follows -


Resequencing level is set to component, I could also set this to operation. This is useful when a mediator supports multiple operations and resequencing is not required for all of them.

I set the mode to standard - others are Best Effort and FIFO.

I set the Group By to orderID and the sort criteria (ID) to msgID. In other words, for each orderID - sort the messages in msgID order starting with msgID 1. Note the increment setting is also equal to 1.

Deploy and test.

I drop the orders into the inbox in the order - order1-3 (orderID=1/msgID=3), order1-2, order1-1.
I then re-test with the next 3 in the sequence order1-6 (orderID=1/msgID=6), order1-5, order1-4

I then view the outbox -




The meta-data is stored in the MEDIATOR_RESEQUENCER_MESSAGE table for Standard re-sequencing.


The last 6 entries are from my test today.

Now If I re-submit (orderID=1/msgID=6), order1-5, order1-4 - I get an error 


Checking the WLS log...

Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV_SOAINFRA.MEDIATOR_RESQ_MSG_UNIQUE1) violated

Another interesting table is MEDIATOR_GROUP_STATUS -


Note the entries for /ResequenceRoute - my Mediator.



So we see the next expected sequence id = 7.

The following blog post explains purge strategies for the above tables -

SOA Purge Strategies

We can purge the completed messages from the MEDIATOR_RESEQUENCER_MESSAGE table


There are my messages with status=2 which signals that they are completed.

btw. the relevant purge scripts are available at -

\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\mediator

Thursday, June 14, 2012

Ireland vs Spain tonight

So tonight's the night that Ireland will make football history and thrash World /European champion Spain.
The time is ripe, we have lulled them into a false sense of security through our engineered performance against Croatia!

Looking fwd to telling the story to my grandchildren in 30 years...

 
The only difference between the above Irish fans and myself, is that Angela knows I'm at work!

Beir bua muintir na h'Eireann!

Monday, June 4, 2012

Updating BPM payload thru various channels

Scenario:
Service request process started for a process. Payload as follows -



an incoming document, adhering to the product definition from the XSD, starts off the process.
The process will get technical data information regarding the product thru various channels
- DB
- File
- WS call to name but 3.

The techData is defined as via the productTechData in the XSD. The techData element will then be used to update the techData element in product.


So we will need some sort of Event Sub-process(es) to manage this interaction.

I chose the following approach -
A File Adapter and DB Adapter are used to process the incoming messages via the File and DB channels.




As you can see both of these have Mediators which generate the same Event - FileTechDataUpdateEvent (Ok, I should have chosen a more general name here!). Naturally the event payload is of type productTechData.

Naturally I need an Event sub-process that picks up the published event. I use a start event of type signal here.


This is the bottom event sub-process. I copy the incoming argument to a process variable and use this later
to update the Human Task Payload.






Correlation is set up as follows -



For the WS interface I simply create a  second Event Sub-process ala the first. However this time I define the interface.



Data Associations / Correlation as per the previous event sub-process.

The Correlation is initiated by the Start activity in the main process -



JDev project available HERE