Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel Applications Administration Guide > Siebel Audit Trail > Decoding the Audit Log FileAudit trail data is stored in an encoded form in the Siebel database to maximize the performance of the overall Siebel application. Audit Trail Item 2 Virtual Business ComponentYou can use the Audit Trail Item 2 virtual business component to export your audit trail data to a data warehouse. To maintain compatibility with data from previous Siebel versions, you must decode the new information and store the newly formatted records into the old format. All audit trail values for a single transaction are grouped together into one record in the S_AUDIT_ITEM table. Previously, values were stored in the OLD_VAL and NEW_VAL fields. The NEW_VAL and OLD_VAL columns are no longer populated in S_AUDIT_ITEM table. Instead, the fields and values for an audit transaction are grouped into the AUDIT_LOG column of the S_AUDIT_ITEM table. To decode audit items, you can call the Audit Trail Item 2 virtual business component. The Audit Trail Item 2 business component is no longer based on S_AUDIT_ITEM table. Instead, this business component is now a virtual business component that is based on a highly specialized class that has its own business logic to retrieve data from S_AUDIT_ITEM table. NOTE: Using the virtual business component to decode audit trail data is the only method that Oracle supports. The virtual business component will be updated to reflect any changes in the underlying data structure. Workflow to Decode Audit DataThe workflow that you use to decode audit data is dependent on how you use the data. If you are implementing an archival solution, then you might want to implement a solution that reads all created records. If you are implementing a more data-oriented solution, then you must implement a solution that has more control of the data. The following is an example of a high level flow for reconstructing data:
You can modify this flow to restrict the data returned by business component, user, position, and so on. However, the flow must always include the fundamental aspect of querying both the Audit Trail Item 2 virtual business component and the Audit Trail Item - Data business component to construct a record consistent with format of a previous version of a Siebel Audit Trail record. Use this flow to make sure that duplicate records are not included in the export of audit trail data to a data warehouse. In this flow, row IDs are not obtained from the Audit Trail Item - Data business component to create records with unique row IDs but to identify already-exported records. This identification occurs in the data warehouse. (Due to the encoded format of the Audit Trail Item - Data business component, a virtual record in the Audit Trail Item 2 virtual business component does not always map one-to-one to a physical database record in the Audit Trail Item - Data business component. Consequently, a record for the Audit Trail Item 2 virtual business component does not always have a unique row ID.) Next, you must create a trigger for the workflow you are using to decode audit data. You could use a reactive trigger through runtime events or workflow policies. If you need real-time or near-real-time onward transmission of the audit trail data, then consider using a reactive trigger. However, consider that the volume of transactions occurring on the audit tables is high, so any per-record solution might cause unwanted performance effects on the entire Siebel application. Any deployment using a reactive trigger on audit data requires extensive performance profiling. For any situation that does not require real-time data transmission, consider an asynchronous batch approach using a mechanism such as repeating component requests. You can tune and adjust these requests so that the frequency of the job matches the data and performance requirements of the Siebel application. In many cases, you can time these requests to run during periods of reduced activity in the Siebel application. It is recommended that you use this approach for the majority of use cases. You can use either a custom business service in conjunction with a workflow process, or you can use a workflow process on its own to implement your solution to decode audit trail data. Leveraging only a workflow process might assist in the long term maintenance of the solution if you think that it might require modification over time; however this approach also adds complexity to the solution due to the requirements of stepping through data sets and restricting records. Example Business ServiceThis example provides sample code for a business service that you can use to retrieve and decode data; note however that the search specification is arbitrary. Carefully consider this search specification for individual implementations. You can apply a search specification to only fields that map to physical columns, and not to encoded fields. /***********************************************************************************/ function decodeAuditTrail(strTimediff) var boAudit = TheApplication().GetBusObject("Audit Trail"); var bcAuditItem = boAudit.GetBusComp("Audit Trail Item 2"); // Set the search specification. In this example we are only SetSearchSpec("Date", ">= " + strTimediff); var strRecordId = GetFieldValue("Record Id"); var strBC = GetFieldValue("Business Component"); var strFieldName = GetFieldValue("Field"); var strOldVal = GetFieldValue("Old Value"); var strNewVal = GetFieldValue("New Value"); var strDate = GetFieldValue("Date"); /**************************************************************************/ var strAuditId = getAuditRowId(strRecordId, strDate); //Placeholder for function to write out values writeAuditValues(strAuditId, strBC, strFieldName, strRecordId, strOldVal, strNewVal, strDate); function getAuditRowId(strAuditRecordId, strAuditRecordDate) var boAudit = TheApplication().GetBusObject("Audit Trail"); var bcAuditData = boAudit.GetBusComp("Audit Trail Item - Data"); // Set the search specification for the combination of SetSearchSpec("Date", strAuditRecordDate); SetSearchSpec("Record Id", strAuditRecordId); strReturn = GetFieldValue("Id"); // Check to see that we only have one record |
![]() |
![]() ![]() |
Siebel Applications Administration Guide | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |