Enrich the Audit Trail Log for Request

Using transformation (XSLT) file to enrich the audit trail log data.

You can extract data from the request payload message or the request transport context and use it to enrich the audit trail logging data that is stored in the Central Logger database. The parse step XSLT transformation supports the following elements in its output document to support this function:

  • Reference Id

    referenceId is a specific element that is used to store an external transaction ID or reference key for the request. Any value mapped into the referenceId element of the output document generated by the parse step XSLT transformation is stored in the TRN_TRANSACTION_ID column of the ASG_TRANSACTIONS table in the Central Logger database.

  • Key

    key is a repeatable element in the output document of the parse step XSLT transformation that can be used in a more generic fashion. It is typically used to store business keys extracted from the received request. Each populated key element is stored as a separate row in the ASG_TRANSACTION_KEYS table and includes a foreign key to the associated row in the main ASG_TRANSACTIONS table of the Central Logger database. The value of the key element is stored in the KEY_VALUE column.

    The key element provides the following attributes:

    • @type
    • @log

@type attribute

When you set a @type attribute for the key element, the @type attribute is stored in the KEY_TYPE column in the ASG_TRANSACTION_KEYS table.

By using the @type attribute for the key element, users can search for specific audit trial logging records in the Central Logger database through the business keys from the request message. This also provides the flexibility to enrich the standard audit trail logging data with any key, value pair based contextual information without the need for customization of TIBCO API Exchange Gateway itself.

@log attribute

If you do not want to store the parameters in the Central Logger database, you can use the @log attribute of the key element. The @log attribute is a Boolean attribute and its value determines whether this key should be stored in the Central Logger database or not. When there is no @log attribute set for key elements, a default value of true is set for the key elements and the key elements are stored as rows in the ASG_TRANSACTION_KEYS table of the Central Logger database. If you do not want to store the key elements in the database, set the @log attribute to false.