Edit History vs Action Logs

I am looking to keep a log of all changes to an object to display to an end user to provide visibility. I noticed that there are now two ways of tracking edits Edit History and Action Logs for OSV2 backed objects.

What is the recommended approach to solving this today? What are the tradeoffs to consider when deciding between the two options?

Here’s my rough take, though perhaps someone closer to the implementations can correct me if I’m off base:

Edits History - this is the more recent implementation and replaces the concept of edit history that was provided by the Phonograph-backed Object Storage v1 implementation. Edit history is tracked implicitly within the Highbury data store and is intrinsic to the object itself - rather than a side effect of the action writing the edit - so any edits are captured, regardless of their source.

Action Logs - Action logs track edit history by creating a new object type and creating new objects of that type whenever the paired action is taken.

Usage Considerations

  • Edits History is what you should use for the purpose of recording and making visible all the edits to an object. It works for all edits automatically and the corresponding Workshop Edits History makes it easy to display these information in your apps and object views.
  • Action Logs should be used if you need to treat edit history as data or if you need to capture additional metadata from the action as part of the log to use in your workflow or application building. You can materialize the action log object type to a dataset and further transform or analyze it.
  • Action Logs are “more fragile” - at least in my experience - and should be enabled after the main iteration/development is done, because changing the properties or their names/ids in the Action Form can make the schema for the Action Log object messy.
  • Since Action Logs are in effect “just another object type” they are more flexible and open ended in how you can use them in your application building.

For me at least, this boils down to: Turn on Edits History for objects that you want to display the comprehensive edit history for and enable Action Logs (in addition) for specific Actions from which you want to have a workflow or data analytical reason to have tracked as object data.

2 Likes