Extract node

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.

You receive orders from new clients and you want to collect their names and addresses for future promotions. To do this, you 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.

Configuring the Extract node

When you have put an instance of the Extract node into a message flow you can configure it. Right-click the node in the editor view and select Properties. The node's basic properties are displayed.

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

Configure the Extract node as follows:

  1. In Mapping Module, identify the associated mapping routine that is to be executed in this node. By default, the name 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 is displayed that lists all available mapping routines that are accessible 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 associated with this node, 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 already exists, you can also open file <flow_name>_<node_name>.mfmap in the 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.

  2. Select Description in the properties dialog navigator to enter a short description, a long description, or both.
  3. Click Apply to make the changes to the Extract node without closing the properties dialog. Click OK to apply the changes and close the properties dialog.

    Click Cancel to close the dialog and discard all the changes that you have made to the properties.

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 on the properties dialog 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 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.

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

Property M C Default Description
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.