Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WS-BPEL 2.0 Beginner's Guide
  • Table Of Contents Toc
WS-BPEL 2.0 Beginner's Guide

WS-BPEL 2.0 Beginner's Guide

By : Matjaz B Juric
4.8 (5)
close
close
WS-BPEL 2.0 Beginner's Guide

WS-BPEL 2.0 Beginner's Guide

4.8 (5)
By: Matjaz B Juric

Overview of this book

If you are a software architect, a designer, a software developer, an SOA and BPM architect, a project manager, or a business process analyst who is responsible for the design and development of business processes, composite applications, and BPM/SOA solutions, then this book is for you. You should have a clear grasp of general SOA concepts including business processes and web services, but no prior knowledge of the BPEL language is required.
Table of Contents (14 chapters)
close
close
13
Index

Time for action – implementing the BPEL process

In this step, we will implement the BPEL process itself. The goal is to return the book data, including the stock quantity. For this, we would usually need to access the database to query for the stock of the specified book. In our case, we do not want to complicate the example, so we will simply return a fixed value.

To achieve this, we will use the Assign activity to assign a fixed value to a BPEL variable. Assign is one of the basic BPEL activities. We will explain the BPEL language later in this chapter.

For now, let's perform the following steps. First, we will copy BookISSN from request inputVariable to response outputVariable. Second, we will copy a number 5 to the StockQuantity element of the output message:

  1. Open our BookstoreABPEL process by selecting the already opened BookstoreABPEL.bpel tab. Alternatively, you can double-click on the BookstoreABPEL component on the composite design view or double-click on the BookstoreABPEL.bpel file from the project tree on the left-hand side window.
  2. Drag-and-drop the Assign activity from the right-hand component palette to the BPEL process in the middle between the receiveInput and replyOutput activities, as shown in the following screenshot:
    Time for action – implementing the BPEL process
  3. Double-click on the Assign activity and set the parameters. Name the activity as DetermineStockQuantity. Copy BookISSN from inputVariable to outputVariable by dragging BookISSN from inputVariable and dropping it on BookISSN in outputVariable, as shown in the following screenshot:
    Time for action – implementing the BPEL process
  4. To set the StockQuantity element of the output message, we will need to use an expression. Drag-and-drop Expression from the upper-right corner of the window to the StockQuantity element. Doing this, the Expression Builder window will appear.
  5. Click on the Conversion Functions tab and select the n()number function. Let's assume that we will return stock quantity of 5. This means we need to write number(5):
    Time for action – implementing the BPEL process
  6. Clicking on OK twice and saving all we have performed brings us to the following screenshot:
    Time for action – implementing the BPEL process

What just happened?

We implemented our first BPEL processes. It contains a very simple logic for returning the book data, including the stock quantity. It assigns the book ISSN and the stock quantity to the constant value of 5. Obviously, this is an oversimplified process, but it is sufficient for our first example and to get a feeling about BPEL. Next, we will try to deploy the BPEL process.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
WS-BPEL 2.0 Beginner's Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon