Returns arrays that represent the timestamps, usernames, action types, review levels, and comments for the process management actions of the specified process unit.
To get a process unit history that includes document attachments, use GetHistory2.
<HFMwManageProcess>.GetHistory bstrScenario, bstrYear, bstrPeriod, bstrEntity, bstrParent, bstrValue, pvaradTime, pvarabstrUser, pvarasAction, pvarasNewState, pvarabstrCommentThe label of the parent of the entity specified in the bstrEntity argument. | |
Returns an array of the timestamps for the process management actions. Array items are in a Double format. To render user-readable dates and times, you must perform conversions. For example, in VBScript, passing an array item to CDate returns a user-readable date and time. | |
Returns an array containing the usernames for the process management actions. | |
Returns an array of the action types of the process management actions. The return values are represented by the HFMConstants type library constants listed in Process Management Action Constants. | |
Returns an array of the review levels resulting from the process management actions. The return values are represented by the HFMConstants type library constants listed in Process Management Review Level Constants. To return the string equivalent of an array item, pass the item to MapReviewLevelToString. | |
Returns an array of the comments specified for the process management actions. |
The following example prints the specified process unit’s process management history to the browser as an HTML table. Note that if GetReviewLevel indicates that the process unit has not been started, a message is printed to the browser instead of a history.
Sub printUnitHistory(sScen, sYr, sPer, sEnt, sPar, sVal)
Dim cHFMProcMan, vaTime, vaUser, vaAction, vaLevel, vaComment
Set cHFMProcMan = Server.CreateObject("Hyperion.HFMwManageProcess")
'g_cHFMSession is an HFMwSession object reference
cHFMProcMan.SetWebSession g_cHFMSession
If cHFMProcMan.GetReviewLevel(sScen, sYr, sPer, sEnt, sPar, _
sVal) <> PROCESS_FLOW_STATE_NOT_STARTED Then
cHFMProcMan.GetHistory sScen, sYr, sPer, sEnt, sPar, sVal, _
vaTime, vaUser, vaAction, vaLevel, vaComment
Response.Write "<table cellpadding=" & chr(34) & "7em" & _
chr(34) & ">"
Response.Write "<tr>" & "<td><b>Date/Time</b></td>"
Response.Write "<td><b>User</b></td>" & "<td><b>Action</b></td>"
Response.Write "<td><b>Review Level</b></td>"
Response.Write "<td><b>Comment</b></td>" & "</tr>"
For i = lBound(vaTime) to uBound(vaTime)
Response.Write "<tr>"
Response.Write "<td>" & CDate(vaTime(i)) & "</td>"
Response.Write "<td>" & vaUser(i) & "</td>"
'getActionString() is not part of the API, is described below
Response.Write "<td>" & getActionString(vaAction(i)) & "</td>"
Response.Write "<td>" & _
cHFMProcMan.MapReviewLevelToString(vaLevel(i)) & "</td>"
Response.Write "<td>" & vaComment(i) & "</td>"
Response.Write "</tr>"
Next
Response.Write "</table>"
Else
Response.Write "<p>No actions taken for the process unit"
End If
End SubIn the example, the action descriptions printed to the browser are obtained by passing the action array items returned by GetHistory to the following custom function (getActionString). |
Function getActionString(lLevelId)
Select Case lLevelId
Case PROCESS_FLOW_ACTION_APPROVE
getActionString = "Approve"
Case PROCESS_FLOW_ACTION_PROMOTE
getActionString = "Promote"
Case PROCESS_FLOW_ACTION_PUBLISH
getActionString = "Publish"
Case PROCESS_FLOW_ACTION_REJECT
getActionString = "Reject"
Case PROCESS_FLOW_ACTION_SIGN_OFF
getActionString = "Sign off"
Case PROCESS_FLOW_ACTION_START
getActionString = "Start"
Case PROCESS_FLOW_ACTION_SUBMIT
getActionString = "Submit"
End Select
End Function