EnumRunningTasks

Returns information about the running tasks that meet the selection criteria. Criteria include task type, user, application server, user session, and task status. Task information is returned in arrays that have a one-to-one correspondence.

Returns information about the running tasks that meet the selection criteria; the information returned includes an array of flags that indicate whether the tasks are running. Criteria include task type, user, application server, user session, and task status. Task information is returned in arrays that have a one-to-one correspondence.

Note:

To also return flags that indicate whether the tasks currently are running or stopped, use EnumRunningTasksEx.

The lStartRecord and lEndRecord arguments specify the starting and ending indexes of the range of records, and the plTotalRecords argument returns the total number of records that match the selection criteria. To iterate through all the matching records, in the first call to EnumRunningTasks pass 0 to lStartRecord, then use the count returned by plTotalRecords to loop through the remaining records.

Note:

The number of matching records can change after you call this method. For example, a new task could be added.

Syntax

<HsvSystemInfo>.EnumRunningTasks vbAllTaskTypes, lTaskType, vbAllUsers, lUserID, vbAllServers, bstrServerName, vbAllSessions, vbAllStatus, lStatus, lStartRecord, lEndRecord, pvaralTaskIDs, pvaralTaskTypes, pvaralTaskProgress, pvaralTaskStatus, pvarabstrUserNames, pvarabstrServerNames, pvaradStartTimes, pvaradStartRunningTimes, pvaradLastUpdateTimes, pvarabstrDescriptions, pvarabstrLogFiles, plTotalRecords

Argument

Description

vbAllTaskTypes

Boolean (ByVal). Specifies whether to filter for a specific type of task. Pass TRUE to return information for all tasks, FALSE to filter by the type of task specified by the lTaskType argument.

lTaskType

Long (ByVal). The ID of the task type for which to return information. This argument is used only if the vbAllTaskTypes argument is set to FALSE.

Following are the constants that represent valid values. These are from the HFMConstants enumeration tagUSERACTIVITYCODE:

  • USERACTIVITYCODE_CONSOLIDATION: consolidations

  • USERACTIVITYCODE_DATA_LOAD: data loads

  • USERACTIVITYCODE_EA_EXPORT: Extended Analytics exports

  • USERACTIVITYCODE_IC_POSTALL: post all intercompany transactions

  • USERACTIVITYCODE_IC_UNPOSTALL: unpost all intercompany transactions

  • USERACTIVITYCODE_IC_DELETEALL: delete all intercompany transactions

  • USERACTIVITYCODE_IC_UNMATCHALL: unmatch all intercompany transactions

  • USERACTIVITYCODE_IC_AUTOMATCHBYID: automatch intercompany transactions by ID

  • USERACTIVITYCODE_IC_AUTOMATCHBYACCT: automatch intercompany transactions by account

  • USERACTIVITYCODE_IC_MATCHINGRPTBYID: matching intercompany transactions by ID report

  • USERACTIVITYCODE_IC_MATCHINGRPTBYACCT: matching intercompany transactions by account report

  • USERACTIVITYCODE_IC_TRANSACTIONRPT: intercompany transactions report

vbAllUsers

Boolean (ByVal). Specifies whether to filter by user. Pass TRUE for all users, FALSE to filter by the user specified with the lUserID argument.

lUserID

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

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

vbAllServers

Boolean (ByVal). Specifies whether to filter by application server. Pass TRUE for all application servers, FALSE to filter by the application server specified with the bstrServerName argument.

bstrServerName

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

vbAllSessions

Boolean (ByVal). Specifies whether to return information for all user sessions or only the session for the connected user. Pass TRUE for all sessions, FALSE otherwise.

vbAllStatus

Boolean (ByVal). Specifies whether to filter by task status. Pass TRUE for all statuses, FALSE to filter by the status specified with the lStatus argument.

lStatus

Long (ByVal). The task status by which to filter. This argument is used only if the vbAllStatus argument is set to FALSE. Valid values are represented by the HFMConstants type library constants listed in Task Status Constants.

lStartRecord

Long (ByVal). The index of the first record in the range of records to retrieve. This is a zero-based index.

lEndRecord

Long (ByVal). The index of the last record in the range of records to retrieve. This is a zero-based index.

pvaralTaskIDs

Variant. Returns an array containing the task IDs that identify the running tasks. The array is returned as a Long subtype.

pvaralTaskTypes

Variant. Returns an array containing the tasks’ types. Valid values are represented by the constants listed as valid values for the lTaskType argument. The array is returned as a Long subtype.

pvaralTaskProgress

Variant. Returns an array containing the progress complete percentages of the running tasks. The array is returned as a Long subtype.

pvaralTaskStatus

Variant. Returns an array containing the tasks’ statuses. Valid values are represented by the HFMConstants type library constants listed in Task Status Constants. The array is returned as a Long subtype.

pvarabstrUserNames

Variant. Returns an array containing the usernames of the running tasks’ users. The array is returned as a String subtype.

pvarabstrServerNames

Variant. Returns an array containing the names of the application servers for the running tasks. The array is returned as a String subtype.

pvaradStartTimes

Variant. Returns an array containing the timestamps of the tasks’ scheduled start times. Array items are formatted as Doubles that can be cast to the Date format.

The array is returned as a Double subtype.

pvaradStartRunningTimes

Variant. Returns an array containing the timestamps of the tasks’ actual start times. Array items are formatted as Doubles that can be cast to the Date format.

The array is returned as a Double subtype.

pvaradLastUpdateTimes

Variant. Returns an array containing the timestamps of the last time the tasks were updated. Array items are formatted as Doubles that can be cast to the Date format.

The array is returned as a Double subtype.

pvarabstrDescriptions

Variant. Returns an array containing the descriptions for the tasks. The array is returned as a String subtype.

pvarabstrLogFiles

Variant. Returns an array containing the file names and paths of the tasks’ log files. The array is returned as a String subtype.

plTotalRecords

Long. Returns a count of the number of tasks returned by EnumRunningTasks.