Showing posts with label OSB 12c For Each. Show all posts
Showing posts with label OSB 12c For Each. Show all posts

Wednesday 15 June 2016

SOA - Using ora:getPreference() in BPEL process to get Environment specific Values

Hi Folks,

There are scenarios, when we have SOA Services (Composites), which uses Environment specific data in the transaction.
For Example - You have created Logging or BAM Service, which can be deployed across various Environments like Staging(Testing), Production. Now to identify the Transaction between various environment, you may need some sort of Identifiers. Like :

Environment Identifier
Development DEV
Test         TST
Production PRD

To achieve this, there could be multiple solutions. Here I am going to discuss one solution which uses function
ora:getPreference()

The syntax of function is  :
ora:getPreference('environmentName')

Here 'environmentName' is variable name.



Steps of implementation:

STEP 1 : Use Assign Action in BPEL flow & add function ora:getPreference('environmentName') in required field.





STEP 2 :  Once your code is compiled & Deployed to Server, you need to set the value of this variable in EM console.

STEP 3 : Login to EM console. On the left go to : Farm_soa_domain > Weblogic Domain > soa_domain > right mouseclick and select ‘System MBean Browser’.



STEP 4 : Then Navigate to : Defined MBeans > oracle.soa.config > Server : soa_server1 > SCAComposite > your_project > SCAComposite.SCAComponent > your bpel_process.





STEP 5 : Change the Value, and Apply.


Thats all !







Saturday 5 March 2016

OSB 12c - For Each action

Hey guys !

In this Post I am going through the For Each functionality in OSB 12c.


Use Case 

Simple Integration  Scenarios, Where Source system payload has Repeated Nodes, Target System expects one node at a time.



Design


Step 1 : 

Create a OSB Project, Add a Pipeline. Inside Pipeline Add a For Each Action.





Step 2:

Provide the required data in For Each Properties. Shown below



This is all we need to Implement For Each. 
However we will have to further process the Data, This could depend on your Requirement.
For the Demo Purpose, I am Sending this data to a Business Service using Publish Action.


Step 3:

Add a Publish Action inside For Each. Add a Assign action to see the Payload of the For Each iteration in Testing. Screens Below





Step 4:

Export and Deploy your code to Server.



Testing







Request Payload

<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
  <Message>
        <MessageID>1</MessageID>
        <OrderReport>
            <OrderID>102-4552-913811</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-2066</SKU>                
             </Item>
        </OrderReport>
  </Message>
  <Message>
        <MessageID>2</MessageID>
        <OrderReport>
            <OrderID>102-4556812-97811</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-20166</SKU>                
             </Item>
        </OrderReport>
  </Message>
  <Message>
        <MessageID>3</MessageID>
        <OrderReport>
            <OrderID>102-4556812-91371</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-266</SKU>                
             </Item>
        </OrderReport>
  </Message>
</Envelope>


For Each output for Last Iteration

<Message>
<MessageID>3</MessageID>
<OrderReport>
<OrderID>102-4556812-91371</OrderID>
<Item>
<OrderItemCode>09588730573218</OrderItemCode>
<SKU>05988-266</SKU>
</Item>
</OrderReport>
</Message>



Thats All Folks !






Here are some other posts, which may interests you

1. Fusion Middleware 12c – SAP Adapter Configuration

http://osb-dheeraj.blogspot.in/2016/02/fusion-middleware-12c-sap-adapter.html

2. Oracle Integration Cloud Service (ICS)

http://osb-dheeraj.blogspot.in/2016/02/oracle-integration-cloud-service-ics.html


3. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1

http://osb-dheeraj.blogspot.in/2016/02/soa-interview-questions-service.html



http://osb-dheeraj.blogspot.in/2016/02/osb-12c-domain-value-map-dvm.html