You are on page 1of 23

Here we are going to call one synchronous and one asynchronous activities using

scope activities.

1. Start the admin server and soa server.


2. Check the status of servers by logging into admin console(http://localhost:7001/console)
3. In this demo we are going to call one synchronous and one asynchronous webservices. So
Take the WSDL file for the addition service from the em console
Subtraction (Asynchronous) WSDL:
http://murali:8001/soainfra/services/default/AsynchSubtraction/asynchsubtractionprocessor_client_ep?WSDL
Addition (synchronous) WSDL:
http://murali:8001/soainfra/services/default/SynchAddition/synchadditionprocessor_client_ep?WSDL
4. Now Create A synchronous BPEL process in Jdeveloper:
Project name: ScopeandPickActivity
BPEL name: ScopeandPickActivityProcessor
Type: Synchronous.
Your BPEL should look like below:

Now Modify the XSD to contain two elements in request and two elements in response.
Your XSD should look like below now:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now open your composite.xml file. It will be as shown below:


er

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now drag a web service component on to External references area(right hand side) to
configure synchronous addition.

Provide the details as shown below:

Click on Ok

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now your composite.xml should look like below:

Now take another webservice component to configure subtraction details as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Click on Ok.

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now your composite should look like below:

Wire the bpel with two webservice components created . after wiring your BPEL should look
like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now go to BPEL. Your BPEL should look like below:

Now drag a scope activity between receiveInput and replyOutput from component panel .
After dragging your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now double click on the scope activity and rename it as scope_add as shown below:

Now click on Ok.


Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Your bpel should look like below:

Now expand the addition scope by clicking on + symbol. After expansion your BPEL should
look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now drag a invoke activity in to the add scope to invoke addition service.
Now your BPLE should look like below:

Now wire invoke activity to addition partner link and configure the invoke activity as shown
below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now click on OK to complete the invoke variable creation.


Now click on + symbol to create the output variable

But this time select the scope as local as shown below:


Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Click on Ok. Click on Ok in invoke activity.


Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now take an assign activity after receive input to map user input to invoke add input as shown
below:

Now double click on the assign activity and go to general tab give the name as
Assign_input_TO_addInput.
Now go to copy operation tab and create two copy operations as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now click on Apply and ok.

Now your BPEL will look like below:

Now drag and assign activity after invoke_add as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now double click on the assign activity, go to general tab and name the assign activity as
Assign_addoutput_TO_Output.

Now go to copy operation tab and create a copy operation as shown below:

Click on ok. You will return to assign activity configuration and click on ok there.

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now your BPEL should look like below:

Now take another scope activity before replyOutput activity to do subtraction functionaliy.
Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Name the scope activity as scope_subtraciton.


Expand the scope activity and drag and invoke activity into the scope.
Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now wire invoke to subtraction partner link and configure the invoke as shown below:
Select the variable scope as local as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now click on Ok.


Click on Ok in invoke activity.
Now your BPEL should look like below:

Now drag and assign activity before the invoke activity and map the input to subtraction
input(two copy operations).
Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now take a receive activity after the invoke activity and wire with subtraction partner link as
shown bleow:
Scope of the variable is local as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now click on ok and click on OK in receive activity.


Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now take another assign activity after receive activity to map the subtraction result to output
variable(one copy operation).
Now your BPEL should look like below(Scope_subtraction):

Now minimize both the scopes.


Now your Final BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

Now make your application. After successful compilation deploy it and test(invoke) it from em
console.

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad 16. INDIA
+91 40 667 33228, www.friendzcorps.com

You might also like