Skip to main content
Skip table of contents

Text to Lines Converter from URL

This adapter reads lines of a text document from any valid URL and outputs an XML document containing an XML element for each line. With the operation Iterate, the adapter runs through the input document and outputs a result document for each iteration within the Technical Process.

Note:

  • If you want to define multiple Text to Lines Converters from URL 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 from URL and one or more Text to Lines Converters 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 function adapter

Possible values:

  • Parse: Read the complete text document

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

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

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter. text2lines.TextToLinesUrlAdapter: 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 from URL component within the process context respectively the process instance (if you want to use multiple independently iterating Text to Lines Converters from URL within the same process context)

Possible values:

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

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

url

URL of the text document to be read

Possible values: Any valid URL (e.g. xstore://Project/Folder/File.txt)

encoding

Encoding of the input text document

Possible values:

  • Any valid encoding (e.g. UTF-8)

  • (none): Use default system encoding

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.