The Audit History application contains components that allow designers to easily store an audit trail in the database. It also allows users to post key events to the News feed to encourage collaboration.
The listing on the App Market contains 2 versions of the application:
The application contains the following tools:
A generic process model that can be invoked via a sub-process node in existing process models as a way to store audit history events in a database
A filterable audit history SAIL grid that can be added to record types as an additional view to records
Note: to use this application, you must be running Appian 22.1+.
Download the Audit History Application from AppMarket.
Import the application from the folder "v22.1" into the environment. See instructions on importing an application.
Publish the AH_AuditHistory_DS datastore.
Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups. See the Groups section below for explanations on permissions assigned to each group.
The AH Write Audit History model is a generic process model for writing audit history events to the database.
The AH Write Audit History may be added to existing process models as a sub-process using the Sub-Process Activity. It is recommended to run the sub-process asynchronously unless there is a need to confirm that the write was successful. To determine whether or not the write was successful, the sub-process outputs a flag that returns true if the write was successful.
Inputs:
recordType (Text) - a text identifier for a particular record type
recordId (Text) - the ID of the record this audit history event is associated with
auditHistoryDSE (Data Store Entity) - the data store entity in which audit history events will be stored
initiatorName (User) - the user that will be associated with the audit history event
actionType (Text) - the type of event being stored in history, ex: "Created", “Updated”, “Deleted”. These values are determined by the designer.
actionDescription (Text) - a longer summary of the event
notes (Text) - any other miscellaneous information about the event
The audit history report will display a grid of all audit history information across a single record type. The report grid renders all the attributes of the Audit History record.
The report grid may be searched and filtered like other read-only grids powered by a record type.
To configure the template report, create a new Interface and use the rule!AH_auditHistoryReport template. The template requires the following inputs:
recordType - the Record Type
There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.
The AH AuditHistory Admins group is used for:
The process model administrators for the generic audit history process model and related action template
The administrator of the Audit History Datastore
The administrator of the Rules and Constants folder for the application
The AH AuditHistory Viewers may:
Initiate the generic audit history process model and related action template
View the Audit History Datastore
Please add members to these groups to facilitate administration and viewing of audit history data.
In summary, here is a checklist for how to integrate the Audit History application into your existing application.
Create a Constant for each Record Type that will have an audit history
For all important business events, add sub-process activity that invokes the AH Write Audit History process model
Use the rule!AH_auditHistoryReport to show audit history events across an entire record type
Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups
NOTE: If you wish to modify the behavior of the model or rules, we recommend you make a copy instead of changing the provided model or rule. This will simplify change management when new versions of the Audit History application are provided by Appian.
A related action template that allows users to select and start a conversation about an audit history item
A report SAIL template that allows users to filter across all audit history events for a particular record type
Note: to use this application, you must be running Appian 17.3+.
Import the application from the folder "v17.3" into the environment. See instructions on importing an application.
The AH Write Audit History model is a generic process model for writing audit history events to the database. It can also optionally post information to the News feed.
The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:
Event Timestamp
Initiator Name, linked to the initiator’s User record
Action Type
Action Description
Notes
This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and Start and End Times.
This view can be added to any record type by configuring the template in record view list. The view template is named rule!AH_recordView.
The inputs required are the record type and record ID.
Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)
Below is a screenshot of an example record view:
A template related action named "Discuss an Audit History Item" can be added to every record with an audit history. The related action form will consist of a grid of all the audit history events related to the record. Users will be able to select any particular audit history event, provide a comment for the resulting News post to initiate a conversation around the item. In addition, the user may specify viewer groups and users for the resulting News post.
To configure the template related action, add it as a related action to the the record type. Select the process model "Discuss an Audit History Item". In the context field, provide:
recordType - the string representing the record type
recordId - the ID of the record
Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}
Below is a screenshot of an example related action:
The audit history report will display a grid of all audit history information across a single record type. The report grid consist of the following columns:
Record Name, linked to the record
initiatorName, linked to the initiator’s user record
The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.
To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:
idField - name of the primary key field in the record, e.g. "id"
recordNameField - name of the record name field in the record, e.g. "userName"
Below is a screenshot of an example report:
For each record type that has an audit history trail:
Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type