Configure event types and commands for business auditing

After you have enabled the WebSphere Commerce system for business auditing, the system is set to audit a base set of event types and commands. You can further customize which commands you want audited by configuring the BusinessAuditDataCapture.xml file, as this file determines what commands should be audited and what parameters need to be captured during an audit. You can enable commands that are disabled, add new commands, or remove existing ones. To configure commands for business auditing:

  1. Open the BusinessAuditDataCapture.xml file in a text editor. The file is located in the /xml/config directory of the WebSphere Commerce Enterprise Archive directory.

  2. The XML file lists the event types which may be associated with the audit, the parameters to exclude and on which to search, and the commands for a business audit. Edit the file as follows:

    • To specify whether or not a listed event type should be audited, under the <EventType> section, ensure that the audit flag for the event type is set to enabled=true if you want to audit the event type, and enabled=false if you do not want to audit it.

    • To add a new event type to be audited, refer to the <EventType> section and add an event type to be audited. You can simply copy and paste one of the existing lines under <EventType> and use it as a base for your custom event type. Ensure that you have a value for the command and audit. Optionally, you can specify the following:

      • Whether or not this is the default configuration if the command is not associated with an event. The default is false.

      • The factory class to use to generate the business audit event. The default is com.ibm.commerce.event.businessaudit.BusinessAuditCommandExecutionEventFactory.

    • To remove a command from the list, under the <AuditCommands> section, delete the line containing this command.

    • To specify whether or not a listed command should be audited, under the <AuditCommands> section, ensure that the audit flag for the command is set to enabled=true if you want to audit the command, and enabled=false if you do not want to audit it.

    • To add a new command to be audited, refer to the <AuditCommands> section and add a command to be audited. You can simply copy and paste one of the existing lines under <AuditCommands> and use it as a base for your custom command. Ensure that you have a value for the command and audit. Optionally, you can specify an event type. The following is an example of how to specify a command to this XML file: <AuditCommand eventType="CAT" command="com.ibm.commerce.catalog.commands.CategoryDisplayCmd" audit="true"/>

    • To remove a command from the list, under the <AuditCommands> section, delete the line containing this command.

  3. Save the XML file.

 

Related Concepts


Business auditing
XML files and resource bundles

 

Related tasks


Enabling business auditing