I've set up a workflow such that when a datapump task fails, flow goes to an ActiveScript task. In that script task, I would like to obtain the error code and description for the failure that occurred in the datapump task. My code looks something like this:

Function Main()
Dim oPackage
Dim oStep
Dim ErrorCode
Dim ErrorSource
Dim ErrorDescription

'Set the ErrorText global variable
Set oPackage = DTSGlobalVariables.Parent
oPackage.Steps("DTSStep_DTSDataPumpTask_1").GetExe cutionErrorInfo CLng(ErrorCode), CStr(ErrorSource), CStr(ErrorDescription)

MsgBox ErrorCode & vbcrlf & ErrorSource & vbcrlf & ErrorDescription

DTSGlobalVariables("gvErrorText").Value = DTSGlobalVariables("gvErrorText").Value & vbcrlf & ErrorDescription

Main = DTSTaskExecResult_Success
End Function

I was able to get around the strong typing of the call to GetExecutionErrorInfo by casting my variables (all variants because VBScript doesn't allow anything else) in the function call. At least, the function doesn't report a type mismatch or other failure. It simply doesn't return any values in any of the variables passed in.

If anyone knows of another way to get the error information (code and/or text) of a failed package step from another step in the same package, that would be most helpful.