Auto Generating IDs Within an Entity

Unique IDs can be generated automatically for Simple and Nested IDs.

The modifications for auto-generated IDs for reference attributes are described in the subsequent section. The following table describes how UUID and sequential IDs are generated.

Table 1. Parameters
Parameter Required Description
name yes Name of the generator. It must be unique across the environment.
type yes Can be 'UUID' or 'SEQUENTIAL'.
rangestart no The starting value in the sequence. If omitted, the default is 0. Can be applied only to SEQUENTIAL generators.
step no The increment. If omitted, the default is 1. Can be applied only to SEQUENTIAL generators.
uuidversion yes, if type is UUID The version of UUIDs. Must be 4 (random UUIDs). Can be applied only to UUID generators.

The feature uses the following properties:

Table 2. Properties
Option Applies To Description Default Value
autoGenerated Attribute/Source If true, the value of attribute/crosswalk will be auto-generated. Use this to enable the feature. False
generateIfEmpty Attribute If true, the value will be generated even if it wasn't sent. False
generateIfNotEmpty Attribute If true, the value will be generated if it was sent.  
generatedValueUniqueForCrosswalk Attribute If true, existing value by crosswalk will be reused instead of generating a new one. False
generator Attribute/source The generator name. None
autoGenerationPattern Simple attribute/source {value} will be substituted by generated value. None
autoGenerationNestedPattern Nested attribute Used to specify auto-generated patterns for sub-attributes None
uniqueGeneratedValuePerEntityPerRequest Entity If true, only one value will be generated for all auto-generated attribute/crosswalk values per entity per request. False
Note: New values will be generated only for data provider crosswalks but will not be generated for crosswalks with the dataProvider=false option.

Here is the behavior for the obvious combinations of Boolean settings and the existing data.

generateIfEmpty = True and generatedValueUniqueForCrosswalk= True:
Value was Sent Value by Crosswalk Exists Reaction
Yes Yes Reuse existing value.
No Generate new value and use it instead of the value that was sent.
No Yes Reuse existing value.
No Generate new value.
generateIfEmpty = True
Value was Sent Value by Crosswalk Exists Reaction
Yes Doesn't matter Generate new value and use it instead of the value that was sent.
No Doesn't matter Generate new value.
 generatedValueUnique for Crosswalk = True
Value was Sent Value by Crosswalk Exists Reaction
Yes Yes Reuse existing value.
No Generate new value and use it instead of the value that was sent.
No Doesn't Matter Don't generate a value.

None (Neither Boolean setting set to True)

Value was Sent Value by Crosswalk Exists Reaction
Yes Doesn't Matter. Generate new value and use it instead of value that was sent
No Doesn't Matter Don't generate a value