Demultiplexer

Usage

The Demultiplexer transfers an input message to one of several outputs, provided that the conditions are fulfilled, which are specified for the output.

The module can split XML-based input messages into several parts before transferring them to the module following the Demultiplexer. Consequently, the remaining workflow following the Demultiplexer is executed in several iterations, once for each part. For one iteration, the remaining workflow may either be executed in one go until its end before the next iteration starts, or it may be interrupted, e.g. at a Wait or Multiplexer module, and the next iteration already starts before the interrupted iteration is continued. This may have to be considered in your workflow design, e.g. when using semaphores.

It is possible to directly connect multiple Demultiplexer modules, e.g. if you prefer the better visualization of two functionally differing Demultiplexer like one splitting Demultiplexer followed by a routing or distributing Demultiplexer.

For a better overview, it is also possible replacing the second Demultiplexer module and the following modules by a Workflow Connector and integrate them in a separate Workflow.

Defining Conditions for Message Transfers

After you have added the Demultiplexer to a diagram and connected it with the subsequent modules, you will specify the conditions for transferring the input message.

Proceed as follows

  1. Select a connection by using one of the following alternatives:

    • Double-click a connection between the Demultiplexer and the subsequent module.

    • Select the connection, open the context menu, and select Edit Demultiplexer Configuration.

      The dialog is displayed.

  2. Define under which circumstances the selected connection should be used:

    • Always, if no condition or BPM Rule applies:

      Select the option use this connection in case no conditions on other connections apply.

    • If one or more conditions apply:

      Click the Add condition button.The entry fields for defining conditions are opened. A condition consists of the following elements:

      • Value in the XML input message itself or a variable value in the message or an XPath expression referring to the XML input message.

      • Comparison value (XML data, variables or a character string)

      • An operator that defines the type of the comparison value.

        For each connection, you can define several conditions, and you can match them with AND or OR.

    • If a BPM Rule applies:

      Click the button Use BPM rule. The control panels for selecting a routing rule are displayed. The routing rule must already be created and saved in the Repository.

      Refer to Using BPM Rules

  3. Split XML input message

    An XML input message can be split in several output messages. Thus, you can e.g. split an XML input message containing several orders in order elements into several messages each containing one order in one order element. If such a message is split e.g. at the order elements, order is the splitting element and becomes the root element in the newly created messages. The splitting element is defined by means of an XPath expression.

    1. In order to create the XPath expression, click the button next to the option XML splitting element. The XPath assistant opens.

      Refer to XPath Assistant

    2. Load a sample message containing the splitting element and drag the splitting element to the XPath field.

    3. Close the dialog with OK.

  4. To configure the next connection, select the next module for which you would like to define connection conditions from the Module for connecting drop-down list and repeat the steps 2 and 3.

  5. Click OK to save the configured connections and to close the dialog.

Dialog Demultiplexer Configuration

Existing Connections

List of all modules which are connected with the tool.

The dialog always shows the configuration of the currently selected module and its exit, respectively.

The modules connected to the Demultiplexer are displayed in the dialog based on the processing order. You can change this order by using the arrow buttons. In order to sort the module list according to the vertical layout of the modules in your Technical Workflow click the module guide 1295 0-Button.

Description

Explanatory comment. Shown on the connection line.

Conditions

  • Use this output if no conditions on other connections apply

    Defines the connection as the default output for all messages that do not fulfill any of the other conditions. This connection is automatically named otherwise.

    When the option is not enabled and the message does not fulfill any of the requirements, an error is generated and displayed in Monitoring.

  • Add condition (button)

    Shows the following control fields for defining conditions:

    module guide 1295 1
    • Operator: For connecting two or more conditions.

      • AND: All conditions must apply.

      • OR: One of the conditions must apply.

    • Button D: The condition applies to an element in the XML based data stream. In the input field, an XPath expression to must be entered.

      If there is a sample XML file, click on the module guide 1295 2 button and select the element interactively.

    • Button V: The condition applies to a system variable. The list offers all system variables.

    • Button X: The condition applies to n XPath expression The XPath is processed on an empty document, not on the data stream. The module guide 1295 2 button opens a wizard for creating the XPath expression.

    • Operator selection box

      Selects an operator for a value comparison. The following operators can be selected:

      Operator Meaning

      =

      equal to

      <

      less than

      >

      greater than

      >=

      greater than or equal to

      less than or equal to

      !=

      not equal to

      Exists

      exists

      NotExists

      does not exist

      XPath

      XPath expression

  • Buttons D and V: See above

  • Button S: The condition applies to a string.

    Example

    • /ORDER/ORDERTOTAL > 1000

    • /ORDER/DELIVERY/ = Express

    • /IBISProfile/Profile/Name Exists

      If the Name node exists in the incoming message, then the process branches to this connection.

    • count(/Order/test1) > 1

      If the XPath function’s count analysis shows that the /Order/test1 node exists more than once, then the process branches to this connection.

  • Use BPM Rule (Button)

    Displays the following controls for assigning a BPM Rule:

    module guide 1296 0

Splitting configuration

  • XML splitting element

    XML-based input messages can be split at a selected splitting element. For instance, you can split an invoice containing four individual items into four invoices each containing one item. The splitting element is defined by means of an XPath expression and is transformed into the root element in the newly created messages.

    The button next to the option opens the XPath assistant in order to define the XPath expression.

    Refer to XPath Assistant

  • Execute splitting on higher level

    Expands splitting to include the parent node of the splitting element. This option is useful if the parent node contains metadata needed for each message created by the splitting.

Displaying the iteration number and its result

When using the splitting functionality, in the Watchpoint dialog, the iterations and their values are displayed. Additionally, the two variables demux.iterator and demux.totalIerations with the values of the current iteration and the total number of iterations are displayed in the Workflow variable section. In the top-right corner of the Watchpoint dialog, the iteration can be selected by entering the value or by using the up and down icons. Afterward in the Message field, the current value is displayed.

module guide 1297 1