Hi folks, I am announcing a new package I have loaded on the OEX, which I am also planning on entering into the contest this month. In a nutshell, what it offers you are the following. * Base classes to use on Persistent (table) classes for InterSystems IRIS to keep record history * These classes enable the historizing of persistent class records into another persistent class when touched. * This provides for a full history of any record. * It allows for record rollback to a specific version. * It can automatically purge old history records. ## Do you need it? Have you ever had the scenario where a data fix has gone terribly wrong, and you need to roll back the update? Have you ever tried to find out what or who updated or inserted a specific record? Have you ever needed to find out what has happened to a record over its lifetime? You can get all this now, by simply extending from two classes. What this article covers is what it offers. The package contains all the instructions needed, and there are only a few. ## The Basics The table that contains the "current" record have two sets of fields * Create * This contains the details of when the entry was created and is immutable. * Update * This contains the information of the last time the record was updated. The table that contains the history records have three sets of fields * Create * This is copied as is from the current record when inserted. * Update * This is copied as is from the current record when inserted. * Historize * This contains details on the historization entry on insertion, and is immutable. Each of the sets above contain the following fields:
Name | Content |
DateTimeStamp | The system's date and time |
Job | The PID value ($JOB) |
SystemUser | The system user performing the action. $USERNAME |
BusinessHost | The interoperability business host that was involved, if available. |
ClientIP | The client's IP address that instructed this, if available. |
CSPSessionID | The CSP Session ID that was involved, if available. |
Routine | The calling routing. This can really help pinpoint where in the code this originated from. |