GetHistory2

Returns arrays containing the history of a process unit; the process unit’s dates and times, users, actions, levels, comments, and names and paths of attached document are returned. The arrays have a one-to-one correspondence.

Syntax

<HsvProcessFlow>.GetHistory2 lScenario, lYear, lPeriod, lEntity, lParent, lValue, pvaradTime, pvarabstrUser, pvarasAction, pvarasNewState, pvarabstrAnnotation, pvaravarabstrPaths, pvaravarabstrFiles

Argument

Description

lScenario

Long (ByVal). The member ID of the process unit's Scenario dimension member.

lYear

Long (ByVal). The member ID of the process unit's Year dimension member.

lPeriod

Long (ByVal). The member ID of the process unit's Period dimension member.

lEntity

Long (ByVal). The member ID of the process unit's child Entity dimension member.

lParent

Long (ByVal). The member ID of the process unit's parent Entity dimension member.

lValue

Long (ByVal). The member ID of the process unit's Value dimension member.

pvaradTime

Variant. Returns an array of the process unit’s times and dates. The array is returned as a Double subtype.

The numbers returned in this array are in a standard date format; for example, in Visual Basic you can convert a returned array element by passing it to CDate.

pvarabstrUser

Variant. Returns an array of the usernames that have performed actions for the process unit. The full usernames — the domains and the usernames — are returned.

The array is returned as a String subtype.

pvarasAction

Variant. Returns an array of the process unit’s actions. The valid return values are listed in Process Management Action Constants.

The array is returned as an Integer subtype.

pvarasNewState

Variant. Returns an array of the process unit’s levels. The valid return values are listed in Table 136, CEnumProcessFlowStates Enumeration.

The array is returned as an Integer subtype.

pvarabstrAnnotation

Variant. Returns an array of the process unit’s comments. The array is returned as a String subtype.

pvaravarabstrPaths

Variant. Returns an array of arrays that contain the paths of attached documents for each action. The array is returned as a String subtype.

pvaravarabstrFiles

Variant. Returns an array of arrays that contain the names of attached documents for each action. The array is returned as a String subtype.

Example

The following example prints the times of a process unit’s approvals, as well as the names and paths of documents attached to approvals. The example assumes that the process unit’s dimension member IDs have been specified.

Dim cProcessFlow As HsvProcessFlow, vaTimes, vaUsers
Dim vaActions, vaStates, vaNotes, vaPaths, vaNames
'g_cSession is an HsvSession object reference
Set cProcessFlow = g_cSession.ProcessFlow
'the example assumes that member IDs have been specified
cProcessFlow.GetHistory2 lScen, lYear, lPer, lEnt, lPar, lVal, vaTimes, _
  vaUsers, vaActions, vaStates, vaNotes, vaPaths, vaNames
For i = LBound(vaActions) To UBound(vaActions)
  If vaActions(i) = PROCESS_FLOW_ACTION_APPROVE Then
    Debug.Print CDate(vaTimes(i))
    If IsArray(vaPaths(i)) Then
      For j = LBound(vaPaths(i), 1) To UBound(vaPaths(i), 1)
        Debug.Print vaPaths(i)(j) & "\" & vaNames(i)(j)
      Next j
    End If
  End If
Next i