Académique Documents
Professionnel Documents
Culture Documents
This article is from the excellent Blog by Niall Commiskey. See complete article here - http://niallcblogs.blogspot.com/2010/09/oracle-file-adapter-osb-11gdebatching.html . It is reproduced here for easy reference only.
Simple scenario I have a large input file adhering to the following XSD -
Business Processing: The SSN will only be visible in the Response for persons living in the province specified in the
Such an input file could be large e.g. 1 PersonList Header element (specifying the province we are sending the data to e.g. the Irish province of Munster) and 1000s of Person elements, containing sensitive data such as SSN or as we in Ireland say PSN. So how can we leverage SOA Suite/OSB to do this efficiently? Throttling is available with the Oracle File adapter so let's leverage it
I created a simple SOA Composite (File Read --> Mediator --> FileWrite) and tested with the above input. I checked in FMW console and saw that 3 instances had been created Instance 1 - Header + Person 1 Instance 2 - Person 2 + Person 3 Instance 1 - Person 4 Nice that the file adapter de-batching feature which gives us the Person elements wrapped in a
The only issue here is we have to validate the Person/Province against the Header/Province and, as you can see from the above, - it isn't there! However, we do get this PersonList wrapper, so let's leverage this but changing the XSD slightly to include the destinationProvince as an attribute of the PersonList.
When I test this using the SOA composite I get 3 instances. e.g.
Looks good lets go on to OSB. OSB Create an OSB Project and import JCA artifacts you created in JDeveloper
Create a variable v_PersonList and Assign the $body/exam:PersonList to it Add a FOR EACH action to the Request Pipeline
As you can see, the FOR EACH includes the following Log - Log the number of Persons in the Message
IF THEN --> here we check whether the province values match. If not we need to wipe the SSN.
Test
This could also be a good use case for leveraging OSB's SplitJoin functionality!