Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WS-BPEL 2.0 Beginner's Guide

You're reading from   WS-BPEL 2.0 Beginner's Guide Design and develop WS-BPEL executable business processes using Oracle SOA Suite 12c

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781849688963
Length 388 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Hello BPEL FREE CHAPTER 2. Service Invocation 3. Variables, Data Manipulation, and Expressions 4. Conditions and Loops 5. Interaction Patterns in BPEL 6. Fault Handling and Signaling 7. Working with Scopes 8. Dynamic Parallel Invocations 9. Human Tasks 10. Events and Event Handlers 11. Compensations A. Pop Quiz Answers Index

Time for action – deploying and testing the second BPEL process

To deploy and test our second BPEL process, we will redeploy the whole SOA composite, which now includes both BPEL processes. Let's perform the following steps:

  1. Right-click on the project in the project tree and select the Deploy submenu.
  2. Then, select Deploy to Application Server.
  3. We will use the default deployment configuration, but make sure that we check the Overwrite any existing composites with the same revision ID option.
  4. Choose the IntegratedWebLogicServer server for the deployment and click on Finish.

After the successful deployment, we are ready to test the process. We will use Enterprise Manager Console. As we created the new BPEL process within the same application, we deployed it inside the Bookstore composite application. After clicking on the application, click on the Test button, which will now have two options, BookstoreA and BookstoreB.

  1. Test the BookstoreBBPEL process by clicking on it.
  2. Let's do the test for the 1111-1111 ISSN. To perform the test, first select the XML View.
  3. This time we will enter the request message in plain XML. For this, simply enter the required data in the following predefined XML form:
    Time for action – deploying and testing the second BPEL process
  4. After clicking on the Test Web Service button, we will see the screen with the response of 10:
    Time for action – deploying and testing the second BPEL process

What just happened?

We successfully tested our second BPEL process. First, we redeployed the whole SOA composite application, which now consists of the two BPEL processes. Then, we invoked the BookstoreBBPEL process and monitored the response for different ISSNs.

Note

There are other ways to test the BPEL process than using the Enterprise Manager. The SOA Suite test framework can be used directly from JDeveloper to test and debug SOA composites. A popular option is using the SoapUI tool, which can generate the requests and show the responses in a similar way, as we did with the Enterprise Manager. For more information on SoapUI, visit http://www.soapui.org/.

To get more insight into the BPEL execution, a nice option is to click on the Launch Flow Trace button. This opens a new window, which shows the execution flow trace. Our BPEL process is relatively simple; therefore, we see only one component. If we click on the BookstoreBBPEL instance, we will see another view named Audit Trail:

What just happened?

An even more interesting view is the Flow view, which can be activated on the Flow tab. It shows the visual execution flow. For our process, it will look like the following screenshot:

What just happened?

Clicking on any activity on the visual flow allows us to inspect the variables, which is very useful for debugging.

With this, we have concluded our discussion. You have successfully developed, deployed, and tested your second BPEL process, which is already a bit more complex than the first one. Still, it was an oversimplified BPEL process, which took four parameters as an input (the book ISSN, title, edition, and publishing year) and returned the quantity of the book together with the ISSN. However, this time different ISSN returned different stock quantities.

In the next chapter, we will use both BPEL processes, BookstoreABPEL and BookstoreBBPEL, and will orchestrate them into a more complex process.

Have a go hero – test the process

It's your turn now. Test the BookstoreBBPEL process for different parameters, including ISSNs 2222-2222, 3333-3333, and others, and verify that the process returns the correct response.

Pop Quiz – BPEL basics

Q1. Try to answer which of the following items are true:

  1. BPEL is a language for composing services and orchestrating and coordinating the flow of services.
  2. BPEL is a programming-in-the-small language.
  3. BPEL is used to implement specific functionalities.
  4. BPEL is used to compose (orchestrate) functionalities exposed though services (service interfaces) into composite applications.
  5. BPEL is a graphical language.
  6. BPEL code uses XML syntax.

Q2. Which is the latest version of the BPEL language?

  1. 1 .0.
  2. 1 .1.
  3. 2 .0.

Q3. BPEL process starts with which root-element activity?

Q4. Does BPEL support variables?

Q5. Which activity is used to manipulate variables?

Q6. What is the correct syntax of the <if> activity?

  1. <if><then><else>.
  2. <if><then><endif>.
  3. <if><then><else><endif>.
  4. <if><elseif><endif>.
  5. <if><elseif><else>.

Q7. What is the default expression and query language in BPEL?

  1. XQuery.
  2. XPath.

Q8. What is the purpose of the <receive> activity?

  1. To send response to the client.
  2. To wait for incoming messages.
  3. To receive e-mail messages.

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You have been reading a chapter from
WS-BPEL 2.0 Beginner's Guide
Published in: Sep 2014
Publisher:
ISBN-13: 9781849688963
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image