# Adding Message Paths

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.

Message paths can be associated with individual nodes, a group of nodes, or with the process (global).

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.

This section contains the following topics:

- Creating a Message Path
- Deleting Message Paths

## Creating a Message Path

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.

This section contains the following topics:

- To Create a Message Path
- To Configure a Message Path
- To Delete a Message Path

To Create a Message Path

1. Select the node or groups of nodes for which you want to create a message path. (To learn about grouping nodes, see Grouping Nodes in Your Business Process)
2. 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 follows.

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 Property Editor.

To Configure a Message Path

1. Double-click Starting Event to invoke the starting event node builder.
2. 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.

3. Click the X in the top-right corner 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.

4. Select the message path which you want to configure.

The related properties are displayed in the Property Editor. If the Property Editor is not visible in WebLogic Workshop, choose View —> Property Editor from the menu bar.

5. In the Property Editor, configure the following properties:

- name—Enter the name you want displayed in the WebLogic Workshop 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.
- 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.

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

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

- Client Request with Return nodes, see To Complete the Design of Your Client Request Node.
- Client Request nodes, see Design Your Client Request Node.
- Control Receive nodes, see Designing Your Control Nodes.

7. Add any business process nodes to the exception path, as required to define the message path logic.

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:

| 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 Business Process 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.

| 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

1. Right-click the path which you want to delete.
2. 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.

Related Topics

Grouping Nodes in Your Business Process

Writing Custom Java Code in Perform Nodes

Handling Exceptions

Adding Timeout Paths

Transaction Boundaries