ExtractTaskAudit

Extracts to a file the task audit records that meet the specified criteria. Criteria include date range, application server, user, and task.

Syntax

<HsvSystemInfo>.ExtractTaskAudit bstrClientFileName, bstrClientLogFileName, bstrDelimitChar, dStartTime, dEndTime, vbAllServers, bstrServer, vbAllUsers, lActivityUserID, vbAllTasks, lActivityTaskID

Argument

Description

bstrClientFileName

String (ByVal). The name and path of the extract file.

bstrClientLogFileName

String (ByVal). The name and path of the log file for the extract operation.

bstrDelimitChar

String (ByVal). The delimiter for records in the extract file.

dStartTime

Double (ByVal). The starting date and time of the date range. Pass a Double that can be cast to a Date format.

dEndTime

Double (ByVal). The ending date and time of the date range. Pass a Double that can be cast to a Date format.

vbAllServers

Boolean (ByVal). Specifies whether to extract task audit records for all application servers. Pass TRUE for all application servers, FALSE to specify an application server with the bstrServer argument.

bstrServer

String (ByVal). The name of the application server for which to extract task audit records. This argument is used only if the vbAllServers argument is set to FALSE.

vbAllUsers

Boolean (ByVal). Specifies whether to extract task audit records for all users. Pass TRUE for all users, FALSE to specify a user with the lActivityUserID argument.

lActivityUserID

Long (ByVal). The activity user ID of the user for whom to extract task audit records. This argument is used only if the vbAllUsers argument is set to FALSE.

To get a user’s activity user ID, use GetActivityUserID.

vbAllTasks

Boolean (ByVal). Specifies whether to extract task audit records for all tasks or a given task. Pass TRUE for all tasks, FALSE to specify a task with the lActivityTaskID argument.

lActivityTaskID

Long (ByVal). The ID of the task for which to extract audit records. This argument is used only if the vbAllTasks argument is set to FALSE.

Task IDs are represented by the HFMConstants type library constants listed in User Activity Constants.

Example

The following example extracts task audit records for all logons.

Dim cSysInfo As HsvSystemInfo
'g_cSession is an HsvSession object reference
Set cSysInfo = g_cSession.SystemInfo
cSysInfo.ExtractTaskAudit "c:\temp\Audit.txt", "c:\temp\Audit.log", _
   ",", 0, CDbl(Now()), True, "", True, -1, False, USERACTIVITYCODE_LOGON