...
Usage Engine allows you to output information to user-defined database tables. This means that several workflows may output information about the same batch to the same table, which makes it possible to trace batches/UDRs between workflows. To increase this traceability, it is highly recommended to add fields to the UDRs, to make it possible to identify their origin. Useful values may be:
Name of the switch
Name of the original file name
Time stamp of the original file
You define the audit table column types in an Audit profile configurationan Audit profile configuration.
The Audit profile is loaded when you start a workflow that depends on it. Changes to the profile become effective when you restart the workflow.
The Audit profile configuration contains the following settings:
Setting | Description |
---|---|
Database | This is the database that the agent is to connect and send data to. Click the Browse... button to get a list of all the database profiles that are available. For further information see Database Profile(4.3). The Audit functionality is supported for use with the following databases:
|
Refresh | Select Refresh to reload the meta data for the tables residing in the selected database. |
Table | A list of selected audit tables. For further information about adding and editing tables, see the section below, Adding and Editing a Table Mapping. |
Adding and Editing a Table Mapping
From the Add and Edit Audit Table Attributes dialogs, the existing table columns are mapped to valid types in Usage Engine.
Item | Description |
---|---|
Table | A list from which you select the audit table. |
Column Name | The name of the columns in the selected table. |
Type | Clicking the cell, displays a list of |
valid Usage Engine types. Each column must be mapped against a type. Valid types are:
|
|
| |||||
Key Sequence | A key sequence is a defined way to assign a Key value, to identify in which order you need to send along key values when you use the Each key in a table must have a sequence number in order to be identified when passed on as parameters to the APL audit functions. The first key is identified as 1, the second as 2, and so on. The key sequence will uniquely identify all audit log entries to be inserted per batch. |
Audit Profile
In the Audit profile configuration, the column types are configured. To create a new Audit profile configuration, click the Configuration button in the navigation panel to the left in the Desktop the Desktop window, and then select Audit Profile from the menu. Select the database in which the table(s) reside, then select Add.
Adding the Table Mapping
From the Add and Edit Audit Table Attributes dialogs, the existing table columns are mapped to valid to valid types.
The data to insert, will be put in the UDRs column. Setting it to type Counter, makes it possible to use the auditAdd
function to increment the corresponding column value. If Value is used, the auditSet
function can be used to assign a value.
Workflow Workflow Properties - Audit Tab
The Audit tab in the Workflow Properties dialog defines the type of data entered in the table by the workflow. This is either MIM types or anything sent on with the APL audit functions.
The COMPLETE, INVALID and PARTIALS columns in the Audit table are populated by using the APL audit functions. COLLECTION_DATE and FILENAME are populated by the workflow MIM values. The CANCELED column name might be mapped directly to an existing MIM value or populated by the APL audit functions using the Analysis Agent.
Populating Populating Audit Tables
There are two ways of populating audit tables; either by using the auditAdd
function, which automatically increments the value of Counter columns, or by setting fixed values to columns of type Valuewith Valuewith the auditSet
function. Note that Counter columns are automatically set to 0 (zero) when a batch is canceled. This is not the case for Value columns.
Note | |
---|---|
title | Note!In terms of performance, it does not matter how many times an audit function is called. Each call is saved in memory and a summary for each key is committed at End Batch. |
...
Value columns are not reset when a batch is canceled. Hence there will be entries made in the table for the UDRs column for all batches.
Info | |||||||||
---|---|---|---|---|---|---|---|---|---|
Example - Use of auditAdd and auditSetIn this example code, each UDR is validated with respect to the contents of the
|
...