A Message Path is used to interrupt an executing process on delivery of a message from either a client or a control. This allows the process to halt the current stream of execution and take alternate actions. You can have as many message paths as you like in your business process.
A Message path can be associated with a node that can receive messages. For example, a client request node, a control receive node, or a client request with return node.
Note:
Message paths are not supported on the following individual nodes: Perform, Client Response, Control Send, and Control Send with Return.
A Message Path can contain a Client Request or Control Receive node at which it receives the message. For the case in which an On Message path is specified for the process (that is, specified at the Start node) the first node on the path can be a Client Request with Return node.
You can associate a message path with individual nodes in your business process, with groups of nodes, or with the whole process (global). You create a global message path by adding a message path to the start node of your process.
Right-click the node or group of nodes and select Add Message Path from the drop-down menu.
A message path is added to your node or group of nodes and is displayed as shown in Figure 16-1.
Figure 16-1 Message Path
You can rename the path anything you like by double-clicking OnMessage and entering the new name. You can also change the name in the name field of the JPD Configuration pane.
To Configure a Message Path
Double-click Start node to invoke the starting event node builder.
Select the event which you want your message branch to wait for. Choose one of the following options:
A Client Request—Select this option if you want your message path to wait for a message from a client.
A Client Request with Return—Select this option if you want your message path to wait for a message from a client and then send a synchronous response back to the client. You can add optional nodes between the receive and send nodes inside the Client Request with Return node.
Note:
This option is only available when a Message Path is added to a Start node of a business process.
A Control Receive—Select this option if you want your message path to wait for a message from a specified control.
Click Close,to close the node builder.
The node you selected is added as the starting event to your message path. To configure your starting node see,
step 6
Select the message path which you want to configure.
The related properties are displayed in the JPD Configuration view. If the JPD Configuration viewis not visible in BEA WorkSpace Studio, choose Window > Show View > JPD Configuration from the BEA WorkSpace Studio menu bar.
In the JPD Configuration pane, configure the following properties:
general
name—Enter the name you want displayed in the BEA WorkSpace Studio for this path.
notes—Enter any notes you want associated with this message path. These notes can then be accessed through the WebLogic Integration Administration Console.
message
after execute—Select the action you want to take place after a message path is executed. Choose from:
skip—Skip the node or group with which the message path is associated. That is, resume execution of the process at the node following the node or group for which the path is defined.
resume—Resume execution of the process at the node that was executing when the message was received. The process state returns to what it was before the message path executed and the message port is still active.
exclusive—Blocks process execution until the handler completes.
retry count—Specify how many times, after the first attempt, the process engine tries to execute the node or group of nodes contained in the path, before the afterExecute path is taken.
Configure your starting event by double-clicking the node you chose as the starting event. The node builder is invoked. For information on how to configure:
Add any business process nodes to the exception path, as required to define the message path logic.
To configure the annotations, go to Properties view. If the Properties viewis not visible in BEA WorkSpace Studio, choose Window > Show View > Properties from the BEA WorkSpace Studio menu bar.
Viewing Message Paths in the Design View
When you create message path, the following icon appears beside a node (or group of nodes) in the Design view to indicate that an exception path is activated for the specified node:
Table 16-1 Message Path
This icon represents the message path in your business process. In this case, the path appears empty, indicating that the logic to execute when a message is received is not defined yet.
To define the exception handling logic, add business process nodes by dragging the nodes from the Node Palette and dropping them on the message path.
You can collapse the view of any message path (or exception handler or timeout path) by clicking the grey arrow of the message path icon. The following figure shows the icon associated with your node to indicate a collapsed path.
Table 16-2 Collapsed and Expanded View
You can toggle between collapsed and expanded views of paths in the Design view by clicking the message path icon.
Deleting Message Paths
To Delete a Message Path
Right-click the path which you want to delete.
Select Delete from the drop-down menu.
The path is deleted and removed from the Design view.
WARNING:
Deleting a path deletes any business process nodes you defined on that path. When you attempt to delete a path, a dialog box displays a warning message that you must acknowledge before proceeding with the deletion.