Extract node

Attention: Start of changeThe Extract node is deprecated in WebSphere Message Broker Version 6.0. Although message flows that contain an Extract node remain valid in WebSphere Message Broker Version 6.0, where possible, redesign your message flows so that any Extract node is replaced by a Mapping node.End of change

This topic contains the following sections:

Purpose

Use the Extract node to extract the contents of the input message that you want to be processed by later nodes in the message flow. Using the Extract node, you can create a new output message that contains only a subset of the contents of the input message. The output message comprises only those elements of the input message that you specify for inclusion when configuring the Extract node, by defining mapping statements.

The Extract node is represented in the workbench by the following icon:

Extract node icon

Using this node in a message flow

You might find this node useful if you require only a subset of the message after initial processing of the whole message. For example, you might want to store the whole message for audit purposes (in the Warehouse node), but propagate only a small part of the message (order information, perhaps) for further processing.

For example, you receive orders from new clients and you want to collect their names and addresses for future promotions. Use the Extract node to get this information from each order, and send it as a new message to head office. These messages are processed at head office so that the customer details can be included in the next marketing campaign.

Start of change

Configuring the Extract node

When you have put an instance of the Extract node into a message flow, you can configure it. To display its properties, right-click the node and click Properties. (If you double-click the Extract node, you open the New Message Map dialog box.)

All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk.

Configure the Extract node as follows:

  1. Optional: On the Description tab, enter a short description, a long description, or both. You can also rename the node on this tab.
  2. On the Basic tab, in Mapping Module, identify the associated mapping routine that is to be executed in this node. By default, the name that is assigned to the mapping routine is identical to the name of the mappings file in which the routine is defined. The default name for the file is the name of the message flow concatenated with the name of the node when you include it in the message flow (for example, MFlow1_Extract.mfmap for the first Extract node in message flow MFlow1). You cannot specify a value that includes spaces.

    If you click Browse next to this entry field, a dialog box is displayed that lists all available mapping routines that can be accessed by this node. Select the routine that you want and click OK; the routine name is set in Mapping Module.

    To work with the mapping routine that is associated with this node, double-click the node, or right-click the node and select Open Mappings. If the mapping routine does not exist, it is created for you with the default name in the default file. If the file exists already, you can also open file <flow_name>_<node_name>.mfmap in the Resource Navigator view.

    A mapping routine is specific to the type of node with which it is associated; you cannot use a mapping routine that you have developed for an Extract node with any other node that uses mappings (for example, a DataInsert node). If you create a mapping routine, you cannot call it from any other mapping routine, although you can call it from an ESQL routine.

    For more information about working with mapping files, and defining their content, see Developing message mappings.

End of change
Start of change

Terminals and properties

The Extract node terminals are described in the following table.

Terminal Description
In The input terminal that accepts a message for processing by the node.
Failure The output terminal to which the input message is routed if a failure is detected during extraction.
Out The output terminal to which the transformed message is routed if the input message is processed successfully.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined), the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).

The Extract node Description properties are described in the following table.

Property M C Default Description
Node name No No The node type The name of the node.
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.

The Extract node Basic properties are described in the following table.

Property M C Default Description
Mapping Module Yes No Extract The name of the mapping routine that contains the statements to execute against the message tree. The routine is unique to this type of node.
End of change