Microsoft Dynamics NAV Documentation

How To: Setup Splitter Activity

Use the Splitter activity to break a composite message into a series of individual messages, where each message contains data related to one item.

To setup splitter activity:

  1. Create a connection and insert the element SPLITTER.
  2. On the elements line, click Edit.
  3. On the Message Splitter setup, fill in the following fields:
Field Description
Document Type Select the type of document which can be either internal or external.
Document No. Based on the document type, select the document.
Do you want to split at a specific node path? If you select this field, you must specify the Split Node Path field.
Split Node Path You can provide a specific node path where the document should be split.
Split Batch Size You can provide a batch size in which you would like to split the source file. In default the Splitter will split the source file on the first node under the Root node. So when splitting 1 XML file which contains 1000 Sales Orders, the Splitter will generate 1000 several XML files. You can choose to split the file in larger batches, E.g. a Batch Size of 250. In that case, the Splitter will generate 4 several XML files, with 250 Sales Orders each.
Post with Job Queue Select this field if you want to process the connection using the job queue with a specific category. Further processing of messages will always run in a background (job queue) session. See scheduler for more info.
Job Queue Category Code Specifies the code of the job queue category to which the job queue entry belongs. Choose the field to select a code from the list.
  1. Click Check Configuration to see if there are any configuration errors.
  2. Click Ok.

Splitter Setup

Examples:

Given the following document definition:

<Header>
    <SubNode1>Sub node 1 value</SubNode1>
    <SubNode2>Sub node 2 value</SubNode2>
    <Header>
        <SubNode>Sub node 3 value</SubNode>
        <SubNode>Sub node 4 value</SubNode>
        <SubNode>Sub node 5 value</SubNode>
    </Header>
</Header>
  1. "Do you want to split at a specific node path?" set to false. This will generate the entire document.

  2. "Do you want to split at a specific node path?" set to true and "Split Node Path" set to "SubNode1"

<SubNode1>Sub node 1 value</SubNode1>
  1. "Do you want to split at a specific node path?" set to true and "Split Node Path" set to "Header/Header"
<Header>
    <SubNode>Sub node 3 value</SubNode>
    <SubNode>Sub node 4 value</SubNode>
    <SubNode>Sub node 5 value</SubNode>
</Header>
  1. "Do you want to split at a specific node path?" set to true and "Split Node Path" set to "Header/Header/SubNode". This example will result into 3 messages.
Message1:

<SubNode>Sub node 3 value</SubNode>

Message2: 

<SubNode>Sub node 4 value</SubNode>

Message3: 

<SubNode>Sub node 5 value</SubNode>

If you set the batch size to 2 for example, you will get 2 messages

Message1: 

<document>
    <SubNode>Sub node 3 value</SubNode>
    <SubNode>Sub node 4 value</SubNode>
</document>

Message2:

<document>
    <SubNode>Sub node 5 value</SubNode>
</document>