Skip to main content
Skip table of contents

Text to Lines Converter

This adapter reads all lines or specified lines of a text document and outputs an XML document containing an XML element for each line.

As input, the adapter expects a text document provided by the preceding process action. The Iterate operation allows to iterate through the input text document and to output a result document for each iteration within the Technical Process.

Note:

  • If you want to define multiple Text to Lines Converters within the same process context, set in parameter id a unique ID for each adapter, e.g. 1001, 1002 etc. This ensures that each adapter will iterate or will be reset correctly (see operation Clear).
    This also applies if you use one or more Text to Lines Converters and one or more Text to Lines Converters from URL within a process context.

  • When the id parameter's value remains 0, a random ID is generated that is used as the ID in the current process. This ID might not be unique if a subprocess contains a Text to Lines Converter with the same ID.
    Therefore, it is recommended to always set an id not equal to 0.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Parse: Read lines of the text document

  • Iterate: Activate iterator mode and read the text document line by line

  • Clear: Reset iterator of a Text to Lines Converter having the same ID as the corresponding Text to Lines Converter with the operation Iterate (see parameter id)

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter. text2lines.TextToLinesAdapter: Main class (Default)

start

First line to be read (counting begins with 0)

Possible values:

  • Any integer number

  • 0: Start to read from the first line (default)

count

Number of lines to be read

Note:

When using the Iterate operation, the lines are read for each iteration.

Possible values:

  • Any integer number

  • 0: No limitation, read all lines at once (default)

id

Unique ID of the Text to Lines Converter component within the process context respectively the process instance (if you want to use multiple independently iterating Text to Lines Converters within the same process context)

Possible values:

  • 0: Use current action ID (process action number) as ID; Note, that another Text to Lines Converter in a subprocess could have the same action ID. (default)

  • Any integer number except 0 to uniquely identify the corresponding Text to Lines Converter component within the process context; Use a value >1000 to avoid catching an already existing action ID accidentally.

Output

The adapter outputs a UTF-8-encoded XML document with the following structure. An XML element <Line/> containing the line number and the line's content will be created for each line:

HTML/XML
<Text>
  <Line lineNo="line number"><!--line content--></Line>
</Text>

Status values

-1

Error while executing the adapter (for details, see server log)

0

The adapter doesn't output data (anymore). When using the operation Iterate, this status can be used as stop criterion of a loop within the Technical Process and it indicates that no further data row is available.

1

The adapter outputs a result document. When using the operation Iterate, this status can be used as condition to enter a loop within the Technical Process and it indicates that another data row is available.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.