Time for action – selecting VintageBookstore

Let us now implement the condition regarding the publishing year. Each book, published before 1970, should be automatically delivered to VintageBookstore. To achieve this, we will perform the following steps:

  1. Add a new <if> activity to the BookWarehousingBPEL process:
    Time for action – selecting VintageBookstore
  2. We will write the condition using the year-from-dateTime() XPath function, which returns the publishing year:
    Time for action – selecting VintageBookstore
  3. If the publishing year is lower than 1970, we should prepare the request and invoke the VintageBookstoreBPEL process. Otherwise, we should execute the activities previously defined within the BPEL process.

What just happened?

We have implemented the following BPEL condition:

What just happened?

Have a go hero – implementing vintage branch

It's your turn now. You should implement the branch for handling the books older than 1970. First, you should prepare the request. Then you should invoke the VintageBookstoreBPEL process and finally return the response that the book has been directed to the VintageBookstore.

You should develop the VintageBookstoreBPEL process, which should look like this:

Have a go hero – implementing vintage branch

The source code should read like this:

Have a go hero – implementing vintage branch

With this, we have concluded our discussion of conditions. In the next section, we will have a look at loops.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.175.7