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:
<flow>
branch for the invocation of the AnotherBookstoreBPEL
process, as shown in the following screenshot:AnotherBookstoreBPEL
process, we need to declare two variables, AnotherBookstoreRequest
and AnotherBookstoreResponse
. They should be of AnotherBookstoreRequestMessage
and AnotherBookstoreResponseMessage
message types, respectively.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: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: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:
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.
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.