![]() ![]() ![]() ![]() ![]() ![]() |
In this step, you create a message path on your business process that specifies the logic to handle a callback from the channel to which the ValidateOrder service posts a message.
In this case, you associate the Message path you create with the Start node in your business process. It is also possible to associate Message paths with individual nodes or groups of nodes. For the case in which a Message path is associated with the Start node, the logic defined within the path applies to the entire business process in the event a message is received on this path. (The same is true for Exception paths and Timeout paths created on business process Start nodes.) The logic defined for paths associated with individual nodes or groups of nodes applies to those individual or groups of nodes. To learn more about Message, Exception, and Timeout paths for business processes, see Related Topics.
This step includes the following tasks:
In this step, you learn how to create a message path on your business process that handles the following tasks:
Message paths can be associated with individual nodes or groups of nodes that contain a blocking element, or with the business process (global). In this case, you design a global message path for the business process by specifying the message path at the Start node.
A path, which contains a placeholder for the event that invokes the path at run time, is created to the right of the Start node in the Design View:
Note: | The Message Broker Subscription control you created in Step 13 does not define callback methods for you. You design a Control Receive node on this message path to define a custom callback that specifies how the business process expects to receive the event messages from the StopQuote channel to which it is subscribed. |
A Control Receive node is added to the OnMessage path. This node specifies that this path waits to receive a message from a control.
void onMessage(String message)
The Control Receive node in the OnMessage path changes to reflect the binding of the Subscription control method: the node is named onMessage and the Start node icon reflects a Message Broker Subscription control. Your message path should resemble that displayed in the following figure:
The Control Returns field is populated with the data type and the name of the parameter expected by the control: String message
.
java.lang.String
is populated in the Type Name field.This completes the assignment of the message from the StopQuote Message Broker channel to the stopQuote variable.
This step completes the design of the callback handler that handles a message event on the StopQuote channel to which your RequestQuote business process is subscribed.
Note: | In a preceding step, you created a variable of type String to hold the message received from the ValidateOrder service, via the StopQuote channel. This is the message your RequestQuote business process sends to clients in the event that the Request for Quote is invalid. Therefore we are concerned with String Java Types at this node. |
java.lang.String
. The Client Expects field is populated with the data type and parameter name you specified on the General Settings tab: String stopQuote.
In the Design view, note that by completing the tasks in the node builder, the completeness icon associated with the Send Quote node changed from to
indicating that the design of the node is complete.
In this step you learn how to specify the run-time behavior of your business process in the event this message path is triggered. To do so, you use the Property Editor to set the after execute property for your message path.
Note: | If the Property Editor is not visible in BEA Workshop, select Windows![]() ![]() |
Valid options for this property include skip and resume, described here for heuristic purposes. In our scenario, you should not change the default specification.
skip—Specifies that after execution of the message path, the process engine skips the node or group with which the message path is associated. That is, the process engine resumes execution of the process at the node following the node or group for which the message path is defined. In the special case of a global message path—one defined for the business process on the Start node—the process is terminated after execution of the message path.
resume—Specifies that after execution of the message path, the process engine resumes execution of the business process at the node that was executing when the message was received. That is, the process state returns to what it was before the message path executed and the On Message port is still active.
This step completes the design of the message path on your RequestQuote business process.
By completing this section, you created the logic that allows your RequestQuote business process to publish the Request for Quote message it receives from clients to a Message Broker channel. (A validation service is subscribed to that channel). You also created a dynamic subscription to another Message Broker channel to allow your RequestQuote business process to receive messages published by the validation service.
To run the business process you created by following the steps in Part IV of this tutorial, proceed to Step 15: Run and Test the Request Quote Business Process With the Quote Validation Service.
To learn about designing Message paths, Exception paths, and Timeout paths for your business process, see the following topics in the Guide to Building Business Processes:
![]() ![]() ![]() |