Enhancement
Implementation of two TLScript functions for managing sequence IDs:
- generateSequenceId
- resetSequence
These functions enable the generation and resetting of sequence numbers, taking into account an optional context within TLScript.
**generateSequenceId**
- Generates a new sequence number based on:
- A sequence identifier (mandatory parameter)
- An optional context
- The function returns the next available number in the sequence based on the combination of:
- The specified sequence identifier
- The optional context
**resetSequence**
- Resets an existing sequence to a specific value:
- Sequence identifier (mandatory parameter)
- Optional context
- Optional value to be reset to, otherwise 0
Test
TestSequenceIdFunctions.script.xml Tests the following sequence-function scenarios:
- Sequence generation for "invoice" with context "productA"
- Generates multiple sequences to test the incremental behavior
- Resets the sequence to the default value
- Resets the "invoice" sequence for "productA"
- Checks whether the next generated number starts at 1
- Resets the sequence to a specific value
- Resets the "invoice" sequence for "productA" to 100
- Checks whether the next generated number starts at 100