Part IV of this tutorial is comprised of Steps 13 through 15. You build on the business process you created in Adding Looping Logic, Parallel Paths . . ..
The Message Broker provides a publish and subscribe message-based communication model for WebLogic Integration business processes, and includes a message filtering capability. In this scenario, your RequestQuote business process publishes the Request for Quote message it receives from a client to a Message Broker channel. A number of services, which validate the Request for Quote in some way, can subscribe to that channel. If the request is determined to be invalid by one of these services, that service publishes a message on a second Message Broker channel, to which the RequestQuote process is subscribed. If the running RequestQuote process receives such a message, it is terminated and a message is sent to the client indicating why the quote is not processed.
One external service that validates the Request for Quote as well as a Channel file that specifies two Message Broker channels are provided for you to support the tutorial scenario. You learn about creating Message Broker channels, publishing and subscribing to those channels, and designing your business process to handle the receipt of an out-of-bound message that causes it to terminate.
To learn about the WebLogic Integration Message Broker, see Introducing the Message Broker. For a description of the scenario modeled in this part of the tutorial, see Understanding the Validation Service Scenario.
The Message Broker provides typed channels, to which messages can be published, and to which services can subscribe to receive messages. You can design your system for subject-based or content-based routing of messages:
Two Message Broker controls are available when you build WebLogic Integration applications: Message Broker (MB) Publish and Message Broker (MB) Subscription. Business processes use MB Publish controls to publish messages to channels and MB Subscription controls to dynamically subscribe to channels and receive messages:
In addition to the dynamic subscriptions you design at the Control nodes in your business process, you can design static subscriptions at Start nodes. A business process that is subscribed to a Message Broker channel at its Start node starts when a message is received on the channel to which it is subscribed.
To learn more about using the Message Broker controls in WebLogic Integration applications, see Message Broker Controls.
A service that validates a Request for Quote and a channel file that defines two Message Broker channels are provided for you in the tutorial application. The validation service is a process (ValidateOrder.jpd
) that subscribes to a Message Broker channel named ValidateOrder. It validates the client's Request for Quote based on the number of widgets requested. ValidateOrder.java
starts when a Request for Quote message is published to the ValidateOrder Message Broker channel. In this part of the tutorial scenario, if the number of widgets requested is greater than 400, the Request for Quote is determined to be invalid and the ValidateOrder.java
process publishes a message to a second Message Broker channel (named StopQuote). Your RequestQuote business process subscribes to the StopQuote Message Broker channel—when it receives the message from that channel, the RequestQuote business process is terminated.
The following figure outlines the flow of execution at run time for the RequestQuote business process you build in Part IV and the interaction with the ValidateOrder business process:
The interactions between the business processes via the Message Broker channels is indicated by the numbers in the figure. The following steps describe the flow:
Proceed to the next topic to start the steps included in Part IV of the tutorial.