In one of our project we needed to track what happened in the system. I wanted to check when the object instance has been created and some audit log entries in
- The object instance had been created from another object instance as a copy.
- Inside transformation I used just copy all fields.
- I have expected that the fields
RecordUpdatedByare always filled automatically as system fields by current datetime and current users.
- I have expected that
OrigamDataAuditLogwould display current datetime as the entry changes.
- As the object instance has been copied. The “system” fields have been copied as well. So my new object instance had creation date the same as the original instance.
OrigamDataAuditLogsaved datetime the same as
RecordCreated, so the original datetime of the original object instance.
- I can solve by changing XSLT transformations to always empty these fields.
I would recommend that these fields are suggested as system fields and always displays the truth. As for backtracking the changes and evaluate the software behaviour I would expect the auditlog always truthful.
I can imagine following scenarios:
- Enable / Disable the behaviour in application (origam) settings (something like
AlwaysSetSystemFields). Default value would be
true. This setting can be configured for backwards compatibility if there is some solution / model which expects this behaviour.
- Set up at transformation properties or on the workflow step in the model whether to (not) replace system fields. Default would be again
true. This would allow to change behaviour if I really want to replace such fields and I know what I want to achieve.
- I don’t want to always test if I copy object how the system fields are filled. I want to have platform that ensures this default behaviour.
- And I don’t want to always remember that if I make a copy by transformation, I want to remove copy of these “system” fields. I guess that it could be also a surprise for new designers.