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:
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.
BookstoreBBPEL
process by clicking on it.10
: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.
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:
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:
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.
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.
Q1. Try to answer which of the following items are true:
Q2. Which is the latest version of the BPEL language?
1 .0.
1 .1.
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?
<if><then><else>
.<if><then><endif>
.<if><then><else><endif>
.<if><elseif><endif>
.
<if><elseif><else>
.Q7. What is the default expression and query language in BPEL?
Q8. What is the purpose of the <receive>
activity?
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.