Entity item change document
Datatypes
ENTITY_ITEM objects always contain the _entityId, _internalId and _externalId attributes
_internalId = Service API syntax with internal numeric IDs - includes the container in case the entity item has one
_externalId = Service API syntax with the alphanumeric identifier of the entity item. Includes the container as well in case the entity item has one
_entityId = The numeric id of the repository entity
MIME_VALUE objects always contain the relative _filePath, the _label and the _mimeType
timestamp: ISO 8601, e.g.: 2012-04-23T18:25:43.511Z
date: ISO 8601, e.g.: 2019-07-04
numbers: standard JSON
"no value" is either provided as null, or the attribute is not in the document.
Empty string is returned as null, which is omitted when possible!
Enumeration fields
_key: always holds the unique key of the enumeration entry
In case the enumeration field is of datatype ENTITY_ITEM, then the key will be provided with the ENTITY_ITEM syntax (see above)_code: the external code of the enumeration entry, if the enum entry has one, and it differs from the key!
Meta attributes
Meta attributes are prefixed with an underscore.
_module |
The area of the application which has triggered the modification: IMPORT, MERGE, CLONE, SERVICEAPI, REVISION, ENVIRONMENT_TRANSFER, UI, OTHER. |
_user |
The entity item of the user which executed the CRUD operation |
_eventTimestamp |
The timestamp at which this document is created |
_revision |
The entity item of the revision in which the operation has been performed |
_changeType |
The change type of the entity record. The change type of the parent record applies if no change type is given.
|
_qualification |
The qualification of the entity. The combination of the fields in the qualification object define this record as unique within it's parent. Qualification values do not have current and old values as a change in the qualification implies a create/delete of the record even if that is not the case in our database. |
_entity |
The root entity which is changed |
_identifier |
The identifier of the entity item |
_container |
The container of the root entity record |
_entityItem |
The root entity record's proxy information
|
_changedFields |
An array of fields which got changed (fields are without qualifications)
|
_changedEntities |
An array of entity identifiers which are part of the change summary (but only in case the entity is created, changed or deleted - not for changed_child!) |
_transactionStatus |
State of the current audit trail transaction. Every record has one of the following status
|
_invalidReason |
Defines the reason why the document was marked as invalid or had an exception |
_relationshipType |
Internal attribute This defines what type of document it is. It can be of either of these 2 types
|
Change Summary
All data elements are located within the _changeSummary attribute. The _current and _old attributes for fields provide the current and old value, if one of them is omitted, it means there was/is no corresponding value. Qualifications do not have current and old values, in case a qualification field is modified, the whole record is twice in the document, one time with the old value marked as deleted, one time with the new one, marked as created.
In case an entity item has been deleted, the change document does not contain a change summary!
Field or entity names
A new repository property has been added in the custom section of the repository. The new "shortIdentifier" can be generated by a function in the repository editor in case no value is set for it.
However, it should never be changed for standard fields. There might be specially contributed logic which is linked to the short identifier. On the other hand, when enabling a reserved field in the custom section, the short identifier must be defined. It should reflect the logical content of the field, and not it's field type. So, instead of having "res_Text_200" as short identifier, chose something more meaningful.
The short identifier must be unique within it's parent entity. This short identifier is available for entities, fields and logical keys. In case of logical keys which are bound to a field, it should be identical.
Please see the Domain Model (Repository) documentation on details on allowed characters and syntax.
What is not part of the change summary
Object permissions. If someone modifies the object permission of an entity item, this is not recorded in the audit log
Password fields: fields which are marked as password fields are not recorded in the audit trail
Fields/Entities without the "shortIdentifier" attribute in the repository
Qualifiations which have a fixed value and are not modifiable by the user - so called "disabled" logical keys
Fields/Entities which has supportsAuditTrail set to false
Root Entities which do not have an AuditTrailSettings child element, or in which the retention policy has been set to "NO_RETENTION"
Examples
CREATE |
CHANGED |
Item is created with a name and description in English and French { |
Item is changed. New value for German, modified value for English and { |
DELETED |
Item is deleted in the system. { |
Characteristic Values
Characteristic values are rendered in a specialized structure in order to honor their hierarchical nature.
This structure is not identical to the repository as it is fully hierarchical. This is the reason for extra meta attributes which help to not get in conflict with repository based data.
Additional Meta Attributes
_characteristicRecords |
Top level element for all characteristic records |
_recordLang |
Language specific record values. In case the characteristic is not language specific, the qualification for "not language specific" is returned (-1 or xxz) |
_children |
Children of the current characteristic record |
_datatype |
The characteristic data type - to be able to interpret the values even in case the characteristic is no longer in the system |
_formatPattern |
The format pattern of the characteristic - to be able to format the values even in case the characteristic is no longer in the system |
Examples
{
"_module": "IMPORT",
"_user": {
"_entityId": 2600,
"_internalId": "47",
"_externalId": "\u0027abuehler\u0027"
},
"_eventTimestamp": "2020-05-28T23:28:56.782Z",
"_revision": {
"_entityId": 5600,
"_internalId": "1",
"_externalId": "\u0027HEAD\u0027"
},
"_entity": "Item",
"_identifier": "MyItem",
"_container": {
"_entityId": 2900,
"_internalId": "1",
"_externalId": "\u0027MASTER\u0027"
},
"_entityItem": {
"_entityId": 1000,
"_internalId": "345@1",
"_externalId": "\u0027MyItem\u0027@\u0027MASTER\u0027"
},
"_changeType": "CREATED",
"_changedEntities": [
"Article",
"ArticleLang",
"ArticleCharacteristicValue",
"ArticleCharacteristicValueLang"
],
"_changedFields": [
"Article.GTIN",
"ArticleLang.Name",
"ArticleLang.Description",
"ArticleCharacteristicValueLang.Values"
],
"_changeSummary": {
"item": {
"gtin": {
"_current": "11112222333"
},
"lang": [
{
"_qualification": {
"language": {
"_key": 9,
"_code": "eng"
}
},
"name": {
"_current": "spicy cookie"
},
"description": {
"_current": "yummy cookie"
}
}
],
"_characteristicRecords": [
{
"_changeType": "CREATED",
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "7",
"_externalId": "\u0027AnimalIngredient\u0027"
},
"_code": "AnimalIngredient"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "root"
},
"_dataType": "LOOKUP",
"order": {
"_current": -32767
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
{
"_entityId": 7300,
"_internalId": "23@5",
"_externalId": "\u0027Down\u0027@\u0027AnimalIngredient\u0027"
}
]
}
}
],
"_children": [
{
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "8",
"_externalId": "\u0027CertDown\u0027"
},
"_code": "CertDown"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "LOOKUP",
"order": {
"_current": -32766
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
{
"_entityId": 7300,
"_internalId": "25@6",
"_externalId": "\u0027Other\u0027@\u0027CertDown\u0027"
}
]
}
}
],
"_children": [
{
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "11",
"_externalId": "\u0027CertDownExpDate\u0027"
},
"_code": "CertDownExpDate"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "DATE",
"order": {
"_current": -32765
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
"1977-05-28"
]
}
}
]
}
]
},
{
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "8",
"_externalId": "\u0027CertDown\u0027"
},
"_code": "CertDown"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "LOOKUP",
"order": {
"_current": -32766
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
{
"_entityId": 7300,
"_internalId": "25@6",
"_externalId": "\u0027Other\u0027@\u0027CertDown\u0027"
}
]
}
}
],
"_children": [
{
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "11",
"_externalId": "\u0027CertDownExpDate\u0027"
},
"_code": "CertDownExpDate"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "DATE",
"order": {
"_current": -32765
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
"1977-05-28"
]
}
}
]
}
]
}
]
}
],
"_children": [
{
"_changeType": "CREATED",
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "8",
"_externalId": "\u0027CertDown\u0027"
},
"_code": "CertDown"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "LOOKUP",
"order": {
"_current": -32766
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
{
"_entityId": 7300,
"_internalId": "25@6",
"_externalId": "\u0027Other\u0027@\u0027CertDown\u0027"
}
]
}
}
],
"_children": [
{
"_qualification": {
"characteristic": {
"_key": {
"_entityId": 8000,
"_internalId": "11",
"_externalId": "\u0027CertDownExpDate\u0027"
},
"_code": "CertDownExpDate"
},
"recordKey": "0000.0000.RK",
"parentRecordKey": "0000.0000.RK"
},
"_dataType": "DATE",
"order": {
"_current": -32765
},
"_recordLang": [
{
"_qualification": {
"language": {
"_key": -1,
"_code": "zxx"
}
},
"values": {
"_current": [
"1977-05-28"
]
}
}
]
}
]
}
]
}
}
}