[Human-readable Change History] Some additional details

[Human-readable Change History] Some additional details

  
Forge Component
(18)
Published on 2015-06-18 by Justin James
18 votes
Published on 2015-06-18 by Justin James
This component is really useful to provide an out-of-the-box auditing mechanism for your application's core entities. It is an indispensable feature when having to comply to US' Sarbanes–Oxley Act (SOX).

Just consume the DiffEntityDataToText eSpace's RecordDifferences action in the save operations of your application, inputting both the record(s) before the change and after. Notice that you can input a single record or a set of records or structures.

RecordDifferences action:
- OriginalRecord (record or set of records)
- ChangedRecord (same as above)
- AttributesToIgnore (comma-separated list of entity attributes to ignore, like, most commonly, LastUpdateDate)
- EntityNameToTranslate (when a single entity record is provided, you must provide its entity name for the introspection)
- EntityLabelsList (as you don't specifiy anywhere the real-world label for entities, you must provide the translation here - in the format ENTITY:EntityLabel,ENTITY2:EntityLabel2)
- Locale (to use the correct translated strings)

As it uses the entity and structure attribute label property, be sure to define them correctly in Service Studio.

The action does not raise exceptions. It just logs them in the platform's Error Log.

Is this also for java?

Can it be used with ORACLE?
Gerry -

I don't see an obvious reason for it to not work with Oracle, unless OutSystems does things really differently in Oracle in terms of table naming.

J.Ja

I'll try it. Can you give me an example of how to use the EntityNameToTranslate and EntityLabelsList parameters?
Gerry -

I use the Entity name for "EntityNameToTranslate" and I leave "EntityLabelsList" empty. You only need that if the "label" for an entity is different from the "usual" label names like "label", "name", and a few others.

J.Ja

I might be being dense here, but I can't get RecordDifferences to produce anything. If I look at the output of DiffEntries, I can see that it know there has been a change. I attached an eSpace as an example. Maybe you can look at it and tell me what's wrong... Thanks!
I am also having issues with this component. I am unable to get the sample eSpace to return any text differences. You can see my attached screen shot. I also tried to pull the component into my code - and I get the same resutl: an empty string of text is all that gets returned. Can anyone suggest steps to get this to work?  I tried both the oldest verion and the latest version. Same negative results.   

Thanks,
----Erik
Have you guys tried debugging through to see why it is bringing nothing back?

J.Ja