Generic Audit History Application

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:

  • One version is compatible with Appian 22.1 (and above)
  • One version is compatible with Appian v17.3 to Appian v21.4

Audit History for Appian v22.1 and Above

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

  • A record type for Audit History
  • Additional fields in the Audit History data type to improve compatibility with Appian Process Mining. These fields allow the designers to capture roles, departments and end dates.

Setup

Note: to use this application, you must be running Appian 22.1+.

  1. Download the Audit History Application from AppMarket.

  2. Import the application from the folder "v22.1" into the environment. See instructions on importing an application.

  3. Publish the AH_AuditHistory_DS datastore.

  4. 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.

Using the Generic Audit History Process Model

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

  • startTimestamp (Date and time) - the date and time when the event started
  • endTimestamp (Date and time) - the date and time when the event completed
  • role (Text) - the role of the initiator associated with the event. E.g. "Supervisor", "Manager"
  • department (Text) - the department of the initiator associated with the event. E.g. "Sales", "Finance"
  • automated (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?

Using the Generic Report Template

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

Groups

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 records
  • View the Audit History Datastore

Please add members to these groups to facilitate administration and viewing of audit history data.

Audit History Integration Checklist

In summary, here is a checklist for how to integrate the Audit History application into your existing application.

  1. Create a Constant for each Record Type that will have an audit history

  2. For all important business events, add sub-process activity that invokes the AH Write Audit History process model

  3. Use the rule!AH_auditHistoryReport to show audit history events across an entire record type

  4. 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.

Audit History for Appian v17.3 to v21.4

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

  • 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

Setup

Note: to use this application, you must be running Appian 17.3+.

  1. Download the Audit History Application from AppMarket.

  2. Import the application from the folder "v17.3" into the environment. See instructions on importing an application.

  3. Publish the AH_AuditHistory_DS datastore.

  4. 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.

Using the Generic Audit History Process Model

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 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

  • auditHistoryDSE (Data Store Entity) - the data store entity in which audit history events will be stored

  • recordId (Text) - the ID of the record this audit history event is associated with

  • 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

Using the Generic Audit History Record View

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:

Using the Generic Report Template

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:

  • Event Timestamp

  • Record Name, linked to the record

  • initiatorName, linked to the initiator’s user record

  • Action Type

  • Action Description

  • Notes

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:

  • recordType - the Record Type

  • 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:

Groups

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.

Audit History Integration Checklist

In summary, here is a checklist for how to integrate the Audit History application into your existing application.

  1. Create a Constant for each Record Type that will have an audit history

  2. For all important business events, add sub-process activity that invokes the AH Write Audit History process model

  3. For each record type that has an audit history trail:

    1. Add a new record view using the rule!AH_recordView rule to show audit history events for that record
    2. Add a new related action using the Discuss an Audit History Item process model
  4. Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type

  5. 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.

June 2022

  • Updated the application to 22.1 objects

October 2017

  • Updated the application to 17.3 objects
  • Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)
  • Added the ability to filter by action description and text
  • Improved event search performance
  • Converted recordId to text
  • Simplified the process model - removed ability to post event to News feed