English 中文(简体)
One Request, One of Two Possible Responses
  • 时间:2025-02-05

One Request, One of Two Possible Responses


Previous Page Next Page  

In this chapter, we will learn about the concept of one request and one of two possible responses.

    The Cpent BPEL Process sends a single request to the Service BPEL Process and receives one of two possible responses.

    For example, the request can be to order a product onpne, and the first response can be either an in-stock message, or an out-of-stock message.

    The Cpent BPEL Process needs the following −

      An invoke activity to send the request.

      A pick activity with two branches: one onMessage for the in-stock response and instructions on what to do if an in-stock message is received.

      A second onMessage for the out-of-stock response and instructions on what to do if an out-of-stock message is received.

    The Service BPEL Process needs a receive activity to accept the message from the cpent, and a switch activity with two branches, one with an invoke activity sending the in-stock message if the item is available, and a second branch with an invoke activity sending the out-of-stock message if the item is not available.

As with all partner activities, the Web Services Description Language (WSDL) file defines the interaction.

Two Possible Responses Advertisements