This Technote describes in ACC:
- how works the feature "Sequence auto-generation"
- how works the new API GenCreateOrUpdateSchemaSequenceDDL
- the change of sequence use for some OOB schemas
Actually, in ACC, schema ID values could be automatically generated by setting autopk="true" in the root element.
Without this attribute (or its value is set to false), the ID values will be fed manually by using Javascript or workflow.
In case of autopk="true", the ID will use the sequence name passed in the attribute pkSequence. In case of absence of pkSequence, by default, ACC uses OOB XtkNewId sequence.
To sum up :

The main purpose of this feature is to avoid, as much as possible, to use XtkNewId sequence, especially for custom schemas and for some OOB schemas (XtkWorkflowLog, etc.). Instead, we will generate dedicated sequences for them.
Märkus.
* custom autopk schema: a schema not having OOB namespace (i.e. nl, nms, xtk, crm or ncm), with autopk="true" and without specified pkSequence
** if the auto-generated sequence name has more than 30 characters, we will moderate the part <nameSpace><schemaName> using CRC32
This feature is implemented thanks to introducing a new API, which generates the SQL script used to create or update autopk schema sequence:
GenCreateOrUpdateSchemaSequenceDDL(schemaID, newSequenceName, oldSequenceName) schemaID (mandatory): "<nameSpace>:<schemaName>" newSequenceName (mandatory): new sequence name oldSequenceName (optional): old sequence name
Generally, we call this API to create autopk schema sequence, in which case "oldSequenceName" is empty. For example, when creating a custom autopk schema, we call internally this API with its schemaID and the auto-generated sequence name, then update the database structure to create the sequence in the database.
This new API can be also used to update an autopk schema sequence, by providing "oldSequenceName". For example: there was a custom autopk schema "cus:mySchema" using "XtkNewId" as its sequence. And now we would like to use a new sequence "mySequence". It can be done by calling the follow in javascript and execute the output DDL statements in database.
GenCreateOrUpdateSchemaSequenceDDL("cus:mySchema", "mySequence", "XtkNewId")
The XtkWorkflowLog schema could overuse the XtkNewID sequence. From ACC 18.4 release, the schema XtkWorkflowLog will use a new dedicated sequence XtkWorkflowLogId instead of XtkNewId. The switch will be done automatically at build upgrade to ACC18.4 for already existing instances. For new 18.4 instances, the XtkWorkflowLogId sequence will be used by default.
Märkus.
Some other schema that could over consumed id will be switch to a dedicated sequence in next releases.