# Understanding the Validation Service Scenario

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.jpd 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.jpd 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:

1. Your RequestQuote business process publishes the Request for Quote message to the ValidateOrder Message Broker channel.
2. The ValidateOrder business process starts when it receives a message on the ValidateOrder channel to which it is subscribed.
3. If the ValidateOrder business process determines that the order in the Request for Quote message is invalid, it publishes a message to the StopQuote Message Broker channel.
4. The RequestQuote business process subscribes to the StopQuote Message Broker channel and receives the message from the channel on the onMessage path. A response is sent to the client from the Deny Quote node on the onMessage path, and the RequestQuote business process is terminated.

Proceed to the next topic to start the steps included in Part IV of the tutorial.