An Example of Line Iterator Usage

Trade Parts table parsing - An Example of Line Iterator Usage.

Example Description

This example shows how to use Line Iterator component, which allows to parse data line by line and to execute a set of processing components for every parsed line.

To load the example, import the rules list rules.txt from Examples\LineIterator folder.

This example is solution of the task of parsing data from orders, which are represented in table form. Upon receipt of a message, a block with table is parsed from it. Using Line Iterator component rows of the table are parsed from the block. Fields values are parsed from them using Regular Expression Parser. The values are stored into a text file in user format.

Example Rule Description

Filtering

There is the Subject Filter that filters all messages except debug messages from the example.

Processing

Parsing of parts table to the PartsBlock variable.

Iterating through PartsBlock, parsing every line to the Part variable and executing for it next operations:

Parsing of part fields from Part to PartName, PartMan, PartDc, PartCount variables.

Storing of the data parsed into the text file.

Debug Messages

There is one debug message used to show how the rule works.

© 2017 Mediatwins s.r.o. All rights reserved.