Tuesday, August 11, 2020

Pick Activity in Oracle SOA 12c

Hi! In this post, I'm going to show you how we use pick activity in Oracle SOA. Pick activity can be used to pick specific operations or pick specific services. this post will show you how to use pick activity to pick a specific operation. Let's get started.

Here, I want to have two operations Square and Cube that should give the square and cube of a number  respectively.

1. Create a SOA project. Drag and drop a BPEL. Select the operation as No Service.


Drag and drop a SOAP adapter to the Exposed Services swim lane. Click on the highlighted icon to create a wsdl with two operations if you don't have one.


Select the interface type as Synchronous Interface. Give Operation as Square and create Input and Output variables with integer type.


Modify your WSDL to add one more operation as Cube. Your final wsdl should look like this.


My WSDL source looks like this.



Now wire the BPEL to SOAP service and select the transaction as notSupported.


Edit the BPEL and drag and drop a Pick activity from components pane.


Click on the Pick operation that is just above OnMessage and check the checkbox "Create Instance". Click Apply and click OK.


Click on the OnMessage and select the partner link as SOAP service that we created and select the operation as Square. Create an input variable and click Apply and then OK.


Drag and drop a Reply activity and drag it towards the partner link and select the operation as Square. Create a variable by clicking on green plus(+) icon. Click Apply and click OK.



Drag and drop an Assign activity and click on the Reply Square output variable and add the expression as below.

$OnMessage_Square_InputVariable.Input * $OnMessage_Square_InputVariable.Input


Now do the same steps for cube operation as well.

On Message for cube operation:


Cube operation Reply activity:


In the cube Assign activity, multiple the input variable thrice as below.


After doing the above steps, your composite should look like below.


Now deploy your application and test it by selecting Square operation under Operation.




Your'll see the response as below.


Similarly, test the service with Cube operation.


You'll see the response as cube of the number you entered.


Happy learning SOA. Cheers!!

No comments:

Post a Comment

Featured Posts

Sample Real Time Assignment in Oracle SOA