Time for action – extending the BookWarehousing process

We are now prepared to extend the BookWarehousingBPEL process. The goal is to invoke the AnotherBookstoreBPEL process in addition to the BookstoreABPEL and BookstoreBBPEL processes. We will do the following:

  1. We will add a new <flow> branch for the invocation of the AnotherBookstoreBPEL process, as shown in the following screenshot:
    Time for action – extending the BookWarehousing process
  2. Before we can invoke the AnotherBookstoreBPEL process, we need to declare two variables, AnotherBookstoreRequest and AnotherBookstoreResponse. They should be of AnotherBookstoreRequestMessage and AnotherBookstoreResponseMessage message types, respectively.
  3. We will need to assign the values for the AnotherBookstoreRequest variable. For this, we will use the <assign> activity, which we will drag-and-drop from the Components palette to the <flow> branch. We will copy field-by-field the book ISSN, title, edition, and publishing year from the inputVariable variable to the corresponding elements of the AnotherBookstoreRequest variable, as shown in the following screenshot:
    Time for action – extending the BookWarehousing process
  4. Next, we will make the invocation of the AnotherBookstoreBPEL process. We will drag-and-drop the <invoke> activity to the process, connect it with the AnotheBookstoreBPEL process (this way, we will set the partner link), and map the variables. We will use the AnotherBookstoreRequest variable for the input and AnotherBookstoreResponse variable for the output:
    Time for action – extending the BookWarehousing process

What just happened?

You have successfully transformed the data from the inputVariable variable to the AnotherBookstoreRequest variable and invoked the AnotherBookstoreBPEL process. The source code for this should look like the following:

What just happened?

With this, we have successfully invoked the AnotherBookstoreBPEL process. However, we also need to modify the <if> activity, which should now select among the three options. We will also need to deal with AnotherBookstoreResponse, which has a different structure than the responses from the other two bookstores.

Have a go hero – implementing the rest of the BookWarehousing process

It's your turn now. You should modify the <if> activity, which should now select among the three options. You should also map the AnotherBookstoreResponse to the outputVariable in case AnotherBookstore has the lowest stock quantity.

After you have successfully implemented the modified process, try to deploy it and test it.

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

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