You are on page 1of 12

Here we are going to demonstrate how to undo series of scopes that are successfully executed.

1. Start the admin server and soa server.


2. Check the status of servers by logging into admin console(http://localhost:7001/console)

Create synchronous service as shown below:

Now go and modify your xsd to contain two input elements for request and three elements for response.

Your XSD will look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

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

Now take an assign activity after receiveinput activity and assign default values

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

0 to add_result
-1 to sub_result
Infinity to div_result

Your assign activity should look like below:

Now click on apply .


Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now add three scope activities after assign activity and name them as scope_add, scope_sub and div_scope.

Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now open the scope_add and do the addition functionality.


Now your scope_add should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now add a compensation handler by clicking on the symbol as shown below:

Now your scope_add will look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now expand the compensation handler, take an assign activity , create a copy operation and assign 0 to
add_result .
Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

In the same way do it for Scope_sub and this time assign -1 in the compensation handlers assign activity. Now
your scope_sub will look like below:

Now we have to implement the scope_div scope.


Expand the scope_div scope and implement the same functionality as we have implemented for business faults:

Now your BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now go to global scope and add either catch block/ catch all block.
If you have added catch block you have to configure the catch block with the details as follows:
http://friendzcorps.com/devideBYZeroException
devideBYZeroException.
Now your global scope should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now take a compensate activity into the catch block as shown below:

Now double click on the compensate activity and change the details as shown below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now click on apply and ok


Now take a reply activity, configure it with output variable and wire it to partner link .
Now your final BPEL should look like below:

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

Now make, deploy and test the service.

Friendz Corps
Suit #203, B S Residency, B K Guda Road, S R Nagar, Hyderabad-16
Mob: +91 8143 649946, Lnd: +91 40 66733228, Mail: training@friendzcorps.com
www.friendzcorps.com

You might also like