Martin,
I have logged process execution results to a cube in the past... code example is below.
You need the following at the start of Prolog
Code: Select all
vAuditProcessName = '<ProcessName>' ;
vAuditProcessYearVariable = <Year being loaded>;
vAuditProcessMonthVariable = <Month being loaded>;
# Start ProcessAudit - This belongs at the start of Prolog
NumericGlobalVariable ( 'PrologMinorErrorCount' ) ;
NumericGlobalVariable ( 'MetaDataMinorErrorCount' ) ;
NumericGlobalVariable ( 'DataMinorErrorCount' ) ;
StringGlobalVariable ( 'ProcessReturnCode' ) ;
vAuditProcessCube = 'TM1ProcessAudit' ;
vAuditProcessStart = Now;
vDate = TIMST ( Now, '\D \M \Y' ) ;
CellPutN ( vAuditProcessStart, vAuditProcessCube, vAuditProcessName, 'StartTime' ) ;
CellPutS ( vDate, vAuditProcessCube, vAuditProcessName, 'Date' ) ;
CellPutS ( vAuditProcessYearVariable, vAuditProcessCube, vAuditProcessName, 'Year Variable' ) ;
CellPutS ( vAuditProcessMonthVariable, vAuditProcessCube, vAuditProcessName, 'Month Variable' ) ;
# End ProcessAudit
and the following at the end of Epilog
Code: Select all
# Start ProcessAudit - This belongs at the end of Epilog
vAuditProcessEnd = Now;
CellPutN ( vAuditProcessEnd, vAuditProcessCube, vAuditProcessName, 'EndTime' ) ;
CellPutN ( vAuditProcessEnd - vAuditProcessStart, vAuditProcessCube, vAuditProcessName, 'TimeTaken' ) ;
CellPutS ( NumberToString ( PrologMinorErrorCount ), vAuditProcessCube, vAuditProcessName, 'Prolog Error' ) ;
CellPutS ( NumberToString ( MetaDataMinorErrorCount ), vAuditProcessCube, vAuditProcessName, 'MetaData Error' ) ;
CellPutS ( NumberToString ( DataMinorErrorCount ), vAuditProcessCube, vAuditProcessName, 'Data Error' ) ;
CellPutS ( ProcessReturnCode, vAuditProcessCube, vAuditProcessName, 'Return Code' ) ;
CellPutS ( GetProcessErrorFilename, vAuditProcessCube, vAuditProcessName, 'Errorlog' ) ;
# End ProcessAudit
This writes all the results to a Cube made up of the }Processes dimension and a Measure dimension that has all the following
StartTime
Date
Year Variable
Month Variable
End Time
Time Taken
Prolog Error
Metadata Error
Data Error
Return Code
Error Log
Now, back to the question...
If you did all of that then you could use the API to return the cube values back, maybe the Return Code and a link to the Error Log file that was created.
Hope this helps.
DL.