X4 Produktdokumentation

UUID Generator

This adapter generates universal unique identifiers (UUIDs).

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Generate: generates an XML document with one or several UUIDs

  • SetUUID: generates UUIDs in an already existing XML document using XPath UUIDs

Parameters

count

Number of the UUIDs to be generated
info Only important for the operation Generate

Possible values: Any positive number, e. g. 1
info Mustn't be negative or 0.

generateBraces

Set generated UUIDs in braces

Possible values:

  • true: sets generated UUID in braces

  • false: doesn't generate braces

xPath

XPath to the desired XML element
info Only important for the operation SetUUID

Possible values: Any XPath expression, e. g. Data/Beispiel

elementName

Name of the XML element containing the UUID to be generated. The element may already exist and will be overwritten, if necessary.
info Only important for the operation SetUUID

Possible values: Any XML element name, e. g. Id

Status values

1

The adapter has been executed successfully and the output contains an XML document with the UUID(s)

-1

The adapter execution failed

Possible reasons:

  • Operation Generate: the parameter count is smaller or equal 0

  • Operation SetUUID: the input is not an XML document

Input

The adapter expects an XML document for the operation Generate.

Output

The output depends on the selected operation:

  • Generate: the adapter outputs an XML document with the generated UUID(s)

  • SetUUID: the adapter outputs an XML document with the added UUID(s)

    Sample output

    XML
    <?xml version="1.0" encoding="UTF-8"
    <Data>
        <UUID>de41435e-f0a2-4fea-bdf7-9c8a261f8948</UUID>
    	<UUID>fdeb6f6f-1abb-4d34-a405-a8f9a893e0ea</UUID>
    	<UUID>d124a7fe-17d1-4850-a49c-6bdbe92a4c3c</UUID>
    </Data>