<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application</link><pubDate>Tue, 23 Apr 2024 13:16:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Current Revision posted to Guide by Appian Max Team on 4/23/2024 1:16:39 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Configuration Management, Architecture&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/11</link><pubDate>Thu, 22 Feb 2024 21:35:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 11 posted to Guide by Appian Max Team on 2/22/2024 9:35:21 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Configuration Management, Architecture&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/10</link><pubDate>Tue, 31 Oct 2023 20:37:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 10 posted to Guide by matt.cosenza on 10/31/2023 8:37:57 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Configuration Management, Architecture&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/9</link><pubDate>Tue, 31 Oct 2023 20:36:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 9 posted to Guide by matt.cosenza on 10/31/2023 8:36:40 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Configuration Management, Architecture&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/8</link><pubDate>Thu, 19 Oct 2023 15:26:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 8 posted to Guide by matt.cosenza on 10/19/2023 3:26:59 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/23.3/Application_Deployment_Guidelines.html#applications"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/7</link><pubDate>Thu, 19 Oct 2023 15:24:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 7 posted to Guide by matt.cosenza on 10/19/2023 3:24:09 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One version is compatible with Appian 22.1 (and above)&lt;/li&gt;
&lt;li&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/6</link><pubDate>Thu, 19 Oct 2023 15:22:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 6 posted to Guide by matt.cosenza on 10/19/2023 3:22:17 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#v22.1"&gt;Once version is compatible with Appian 22.1 (and above)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#v17.3"&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and_above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/5</link><pubDate>Thu, 19 Oct 2023 15:21:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 5 posted to Guide by matt.cosenza on 10/19/2023 3:21:47 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#v22.1"&gt;Once version is compatible with Appian 22.1 (and above)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#v17.3"&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="audit_history_for_appian_v22.1_and-above"&gt;Audit History for Appian v22.1 and Above&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/4</link><pubDate>Thu, 19 Oct 2023 15:20:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 4 posted to Guide by matt.cosenza on 10/19/2023 3:20:15 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#v22.1"&gt;Once version is compatible with Appian 22.1 (and above)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#v17.3"&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Audit History for Appian v22.1 and aboveThe application contains the following tools:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="audit_history_for_appian_v17.3_to_v21.4"&gt;Audit History for Appian v17.3 to v21.4&lt;/h2&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h3&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h3&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h3 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h3&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h3 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h3&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/3</link><pubDate>Thu, 19 Oct 2023 15:14:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 3 posted to Guide by matt.cosenza on 10/19/2023 3:14:25 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#v22.1"&gt;Once version is compatible with Appian 22.1 (and above)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#v17.3"&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Audit History for Appian v22.1 (and above)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h2&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h2 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h2&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Audit History for Appian v17.3 to v21.4&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h2&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h2 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h2&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h2 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h2&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Groups&lt;/h3&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h2 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h2&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/2</link><pubDate>Thu, 19 Oct 2023 15:12:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 2 posted to Guide by matt.cosenza on 10/19/2023 3:12:10 PM&lt;br /&gt;
&lt;div class="row content_container" style="margin:8px 16% 8px 8%;"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The listing on the App Market contains 2 versions of the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#v22.1"&gt;Once version is compatible with Appian 22.1 (and above)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#v17.3"&gt;One version is compatible with Appian v17.3 to Appian v21.4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Audit History for Appian v22.1 (and above)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;A record type for Audit History&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="setup"&gt;Setup&lt;/h2&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 22.1+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the&amp;nbsp;&lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt;&amp;nbsp;from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v22.1&amp;quot; into the environment. See instructions on&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the&amp;nbsp;AH_AuditHistory_DS&amp;nbsp;datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups. See the Groups section below for explanations on permissions assigned to each group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h2&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;model is a generic process model for writing audit history events to the database.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH Write Audit History&amp;nbsp;may be added to existing process models as a sub-process using the&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;(Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt;&amp;nbsp;(User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt;&amp;nbsp;(Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt;&amp;nbsp;(Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt;&amp;nbsp;(Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;startTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event started&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;endTimestamp&lt;/strong&gt; (Date and time) - the date and time when the event completed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;role&lt;/strong&gt; (Text) - the role of the initiator associated with the event. E.g. &amp;quot;Supervisor&amp;quot;, &amp;quot;Manager&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;department&lt;/strong&gt; (Text) - the department of the initiator associated with the event. E.g. &amp;quot;Sales&amp;quot;, &amp;quot;Finance&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;automated&lt;/strong&gt; (boolean) - the designation of the event in terms of automation. Is the event performed by a human or by a system?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The report grid may be searched and filtered like other read-only grids powered by a record type.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Interface and use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt;&amp;nbsp;- the Record Type&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="groups"&gt;Groups&lt;/h2&gt;
&lt;p&gt;There are two groups provided with the application:&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Admins&amp;nbsp;group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;View the Audit History records&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h2 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h2&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the&amp;nbsp;AH Write Audit History&amp;nbsp;process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the&amp;nbsp;rule!AH_auditHistoryReport&amp;nbsp;to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the&amp;nbsp;AH AuditHistory Admins&amp;nbsp;and&amp;nbsp;AH AuditHistory Viewers&amp;nbsp;groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Audit History for Appian v17.3 to v21.4&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The application contains the following tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A filterable audit history SAIL grid that can be added to record types as an additional view to records&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A related action template that allows users to select and start a conversation about an audit history item&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A report SAIL template that allows users to filter across all audit history events for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="setup"&gt;Setup&lt;/h2&gt;
&lt;p&gt;Note: to use this application, you must be running Appian 17.3+.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the &lt;a href="/b/appmarket/posts/audit-history-application"&gt;Audit History Application&lt;/a&gt; from AppMarket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the application from the folder &amp;quot;v17.3&amp;quot; into the environment. See instructions on &lt;a href="https://docs.appian.com/suite/help/latest/Applications.html#Import_and_Export"&gt;importing an application&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Publish the AH_AuditHistory_DS datastore.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="using_the_generic_audit_history_process_model"&gt;Using the Generic Audit History Process Model&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The AH Write Audit History may be added to existing process models as a sub-process using the &lt;a href="https://docs.appian.com/suite/help/latest/Sub-Process_Activity.html"&gt;Sub-Process Activity&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;Inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; (Text) - a text identifier for a particular record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;auditHistoryDSE&lt;/strong&gt;&amp;nbsp;(Data Store Entity) - the data store entity in which audit history events will be stored&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt;&amp;nbsp;(Text) - the ID of the record this audit history event is associated with&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;initiatorName&lt;/strong&gt; (User) - the user that will be associated with the audit history event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionType&lt;/strong&gt; (Text) - the type of event being stored in history, ex: &amp;quot;Created&amp;quot;, &amp;ldquo;Updated&amp;rdquo;, &amp;ldquo;Deleted&amp;rdquo;. These values are determined by the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;actionDescription&lt;/strong&gt; (Text) - a longer summary of the event&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;notes&lt;/strong&gt; (Text) - any other miscellaneous information about the event&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="using_the_generic_audit_history_record_view"&gt;Using the Generic Audit History Record View&lt;/h2&gt;
&lt;p&gt;The view consists of a grid of all the audit history events related to this record. The record grid consists of the following columns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initiator Name, linked to the initiator&amp;rsquo;s User record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This grid may be filtered by Initiator Name, Action Type, Action Description, Notes, and&amp;nbsp;Start and End Times.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The inputs required are the record type and record ID.&lt;/p&gt;
&lt;p&gt;Example: rule!AH_recordView(cons!TEST_EMPLOYEE_RECORD_TYPE, rf!id)&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example record view:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/982x525/__key/communityserver-wikis-components-files/00-00-00-00-46/3286.AH_5F00_RecordView.png_2D00_982x525.png" /&gt;&lt;/div&gt;
&lt;h2 id="using_the_generic_&amp;quot;discuss_an_audit_history_item&amp;quot;_related_action"&gt;Using the Generic &amp;quot;Discuss an Audit History Item&amp;quot; Related Action&lt;/h2&gt;
&lt;p&gt;A template related action named &amp;quot;Discuss an Audit History Item&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;To configure the template related action, add it as a related action to the the record type. Select the process model &amp;quot;Discuss an Audit History Item&amp;quot;. In the context field, provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the string&amp;nbsp;representing the record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordId&lt;/strong&gt; - the ID of the record&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example context: ={recordType: cons!TEST_EMPLOYEE_RECORD_TYPE, recordId: rf!id}&lt;/p&gt;
&lt;p&gt;Below is a screenshot of an example related action:&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/873x726/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png" /&gt;&lt;/div&gt;
&lt;h2 id="using_the_generic_report_template"&gt;Using the Generic Report Template&lt;/h2&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Event Timestamp&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Record Name, linked to the record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;initiatorName, linked to the initiator&amp;rsquo;s user record&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Action Description&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Notes&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report grid may be filtered by Initiator Name, Action Type, and Start and End Times.&lt;/p&gt;
&lt;p&gt;To configure the template report, create a new Tempo report and use the rule!AH_auditHistoryReport template. The template requires the following inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordType&lt;/strong&gt; - the Record Type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;idField&lt;/strong&gt; - name of the primary key field in the record, e.g. &amp;quot;id&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;recordNameField&lt;/strong&gt; - name of the record name field in the record, e.g. &amp;quot;userName&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a screenshot of an example report:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/4101.AH_5F00_RelatedAction.png"&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png"&gt;&lt;img src="https://community.appian.com/cfs-filesystemfile/__key/communityserver-components-secureimagefileviewer/communityserver-wikis-components-files-00-00-00-00-46/3034.AH_5F00_RelatedAction.png_2D00_873x726.png_2D00_873x726.png?_=638333251324260714" /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="groups"&gt;Groups&lt;/h2&gt;
&lt;p&gt;There are two groups provided with the application: AH AuditHistory Admins and AH AuditHistory Viewers.&lt;/p&gt;
&lt;p&gt;The AH AuditHistory Admins group is used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The process model administrators for the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The administrator of the Rules and Constants folder for the application&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AH AuditHistory Viewers may:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Initiate the generic audit history process model and related action template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the Audit History Datastore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please add members to these groups to facilitate administration and viewing of audit history data.&lt;/p&gt;
&lt;h2 id="audit_history_integration_checklist"&gt;Audit History Integration Checklist&lt;/h2&gt;
&lt;p&gt;In summary, here is a checklist for how to integrate the Audit History application into your existing application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a Constant for each Record Type that will have an audit history&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For all important business events, add sub-process activity that invokes the AH Write Audit History process model&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For each record type that has an audit history trail:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a new record view using the rule!AH_recordView rule to show audit history events for that record&lt;/li&gt;
&lt;li&gt;Add a new related action using the Discuss an Audit History Item process model&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new Tempo Report using the rule!AH_auditHistoryReport rule to show audit history events across an entire record type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add appropriate members to the AH AuditHistory Admins and AH AuditHistory Viewers groups&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id="august-2017"&gt;June 2022&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 22.1 objects&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="august-2017"&gt;October 2017&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Updated the application to 17.3 objects&lt;/li&gt;
&lt;li&gt;Added the ability to specify an AuditHistory entity to create the event (allows for multiple Audit History tables)&lt;/li&gt;
&lt;li&gt;Added the ability to filter by action description and text&lt;/li&gt;
&lt;li&gt;Improved event search performance&lt;/li&gt;
&lt;li&gt;Converted recordId to text&lt;/li&gt;
&lt;li&gt;Simplified the process model - removed ability to post event to News feed&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Generic Audit History Application</title><link>https://community.appian.com/success/w/guide/3288/generic-audit-history-application/revision/1</link><pubDate>Wed, 06 Sep 2023 14:42:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4286b161-9324-4f5a-984f-9c9759f3199a</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3288/generic-audit-history-application#comments</comments><description>Revision 1 posted to Guide by joel.larin on 9/6/2023 2:42:02 PM&lt;br /&gt;
&lt;p&gt;dsfsf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>