Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The sequence in it self is a very simple object:

Code Block
languagexml
<sequence>
    <name>Unix UID numbers</name>
    <counter>1001</counter>
    <maxUnusedValues>10</maxUnusedValues>
</sequence>

The sequence remembers just one important value: the counter. The counter value is assigned to the next object, then the counter value is (atomically) incremented. There are also other settings such as the maximum counter value, settings that influence the use of reclaimed values and so on. This may seem simple, but the real power in using sequences are in combination with Mappings and Expressions. The sequence can easily be used in a mapping:

Code Block
languagexml
            <mapping>
                <name>sequenceUID</name>
                <strength>weak</strength>
                <expression>
                    <sequentialValue>
                        <sequenceRef oid="7d4acb8c-65e3-11e5-9ef4-6382ba96fe6c"/>
                    </sequentialValue>
                </expression>
                <target>
                    <path>extension/uidNumber</path>
                </target>
            </mapping>

This mapping will take a counter from the sequence and place it in the target property. The mapping will also make sure that the value is returned to the sequence for reclamation in case that the processing fails. See Using Sequences page for more details.

See Also