Version Control
The following preferences indicate how to treat upload exceptions that may occur when external systems have posted new data to OMD.
One of the exceptions that may occur during upload is a version mismatch. Whenever an entity is stored in OMD, it is stored along with an increasing version number, starting with 1. During an update of that entity, the version number is automatically increased. This version number is used to control whether updates of users are related to out-of-date information. In that case, OMD refuses to update the entity.
During the creation of an interface to OMD, this mechanism can be used to control whether OMD is leading or the ERP system is leading:
- Always setting the version to 0 during upload will cause OMD being leading in updating the entity. The uploaded version will always be lower than the stored value in OMD, therefore an update is refused. Only during the first posting, the entity will be inserted properly into OMD.
- Suppressing the version attribute on the posted data will cause OMD to always overwrite the current content on OMD. This should only be used for data that is never updated in OMD itself, such as task attachments with subtype itemsPlanned.
The following preferences describe the behaviour of OMD when a version mismatch occurs.
The uploadVersionMismatchLogWarning
indicates if all version mismatch exceptions should be logged to the application server's logging file. During production, many version mismatches may occur and this preference should be turned off.
uploadVersionMismatchLogWarning | ||
---|---|---|
Type | Default Value | Example |
Boolean | True | false |
During the upload process, an XML document is filled with information about the uploaded elements and possible errors. This result XML is sent back to the posting client to provide detailed information about the success of the posting. For version mismatches, a warning is appended to this XML document if the preference uploadVersionMismatchAppendWarning
is set to true
. During production, this preference should be turned off if external systems frequently post elements that are updated in OMD (such as the Task elements).
uploadVersionMismatchAppendWarning | ||
---|---|---|
Type | Default Value | Example |
Boolean | True | false |
During manual uploads, a default limit of 100 errors is applied. In case the maximum number of errors has been reached, the upload will be stopped. To change the maximum number of upload errors, increase the uploadMaxErrorsManual
preference.
uploadMaxErrorsManual | ||
---|---|---|
Type | Default Value | Example |
Integer | 100 | 1000 |
To avoid an upload of XML child elements of version-mismatched elements, the preference uploadVersionMismatchSkipChildren
is set to true
. If this is not the intended behavior, the preference needs to be turned off.
uploadVersionMismatchSkipChildren | ||
---|---|---|
Type | Default Value | Example |
Boolean | True | false |