Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  What is the status code (number) for each returned status

    Posted Sat March 02, 2024 07:18 AM

    I can test each one to know the exact number but if someone has it at hand, it would save some time. Especially there is a new one - ProcessExecutionInProgress() in v12. Thanks.

    https://www.ibm.com/docs/en/cognos-tm1/10.2.2?topic=variables-processreturncode

    ​StatusCode:​
    – ProcessExitByBreak() = Indicates that the process exited because it encountered a ProcessBreak function.​
    – ProcessExitByChoreQuit() = Indicates that the process exited due to execution of the ChoreQuit function.​
    – ProcessExitByChoreRollback() = Indicates that the process exited because it encountered a ChoreRollback function.​
    – ProcessExitByProcessRollback() = Indicates that the process exited because it encountered a ProcessRollback function.​
    – ProcessExitByQuit() = Indicates that the process exited because of an explicit quit command.​
    – ProcessExitMinorError() = Indicates that the process executed successfully but encountered minor errors.​
    – ProcessExitNormal() = Indicates that the process executed normally.​
    – ProcessExitOnInit() = Indicates that the process aborted during initialization.​
    – ProcessExitSeriousError() = Indicates that the process exited because of a serious error.​
    – ProcessExitWithMessage() = Indicates that the process exited normally, with a message written to tm1server.log.



    ------------------------------
    mvp morgan
    ------------------------------


  • 2.  RE: What is the status code (number) for each returned status

    Posted Mon March 04, 2024 01:02 AM

    Hello,

    I am not at the PC right now but I can provide the full list later today.

    Just a bit of lateral thinking, can you do an AsciiOutput with a NumberToString of the constant name ? (For each name so copy/paste below each other)

    Wim Gielis



    ------------------------------
    Wim Gielis
    ------------------------------



  • 3.  RE: What is the status code (number) for each returned status
    Best Answer

    Posted Mon March 04, 2024 01:18 AM

    Here's a list of process run outcomes in TI and TM1 REST API - a comparison and overview of the constants

    # case 1
    - TI ==> ProcessExitNormal(): 0
    - REST API ==> "ProcessExecuteStatusCode": "CompletedSuccessfully"
        # "ErrorLogFile": null

    # case 2
    - TI ==> ProcessExitWithMessage(): 5
    - REST API ==> "ProcessExecuteStatusCode": "CompletedWithMessages"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413113444_44979784__02.log" }

    # case 3
    - TI ==> ProcessExitMinorError(): 7
    - REST API ==> "ProcessExecuteStatusCode": "HasMinorErrors"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413113828_13888604__03.log" }

    # case 4
    - TI ==> ProcessExitByBreak(): 8
    - REST API ==> "ProcessExecuteStatusCode": "CompletedSuccessfully"
        # "ErrorLogFile": null

    # case 5
    - TI ==> ProcessExitByQuit(): 9
    - REST API ==> "ProcessExecuteStatusCode": "QuitCalled"
        # "ErrorLogFile": null

    # case 6
    - TI ==> ProcessExitSeriousError(): 11
    - REST API ==> "ProcessExecuteStatusCode": "Aborted"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413114013_19988604__06.log" }

    # case 7
    - TI ==> ProcessExitOnInit(): 12
    - REST API ==> "ProcessExecuteStatusCode": "Aborted"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413114855_79806516__07.log" }

    # case 8
    - TI ==> ProcessExitByChoreQuit(): 17
    - REST API ==> "ProcessExecuteStatusCode": "QuitCalled"
        # "ErrorLogFile": null

    # case 9
    - TI ==> ProcessExitByProcessRollback(): 20
    - REST API ==> TI ==> "ProcessExecuteStatusCode": "RollbackCalled"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413114107_74288604__09.log" }

    # case 10
    - TI ==> ProcessExitByChoreRollback(): 21
    - REST API ==> "ProcessExecuteStatusCode": "RollbackCalled"
        # "ErrorLogFile": { "Filename": "TM1ProcessError_20230413114125_03488604__10.log" }



    ------------------------------
    Wim Gielis
    ------------------------------



  • 4.  RE: What is the status code (number) for each returned status

    Posted Mon March 04, 2024 03:50 AM

    Hi,

    Wim beat me to it but wanted to add that whilst they seem like constants, this is still TI after all, they are just another TI function that does nothing more and nothing less than always return the same number (at least for a particular version of TM1, albeit I don't recall us changing those numbers).

    And since Wim didn't include the ExecutionInProgess code here's how you can keep up to date with the latest (provided you set or pass pFileName):

    DataSourceASCIIQuoteCharacter = '';
    DataSourceASCIIDelimiter = ' ';
    TextOutput( pFileName, 'ProcessExitByBreak():', Str( ProcessExitByBreak(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitByChoreQuit():', Str( ProcessExitByChoreQuit(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitByChoreRollback():', Str( ProcessExitByChoreRollback(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitByProcessRollback():', Str( ProcessExitByProcessRollback(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitByQuit():', Str( ProcessExitByQuit(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitMinorError():', Str( ProcessExitMinorError(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitNormal():', Str( ProcessExitNormal(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitOnInit():', Str( ProcessExitOnInit(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitSeriousError():', Str( ProcessExitSeriousError(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExitWithMessage():', Str( ProcessExitWithMessage(), 1, 0 ));
    TextOutput( pFileName, 'ProcessExecutionInProgress():', Str( ProcessExecutionInProgress(), 1, 0 ));



    ------------------------------
    Hubert Heijkers
    STSM, Program Director TM1 Functional Database Technology and OData Evangelist
    ------------------------------



  • 5.  RE: What is the status code (number) for each returned status

    Posted Mon March 04, 2024 04:41 AM

    Thank you, both!



    ------------------------------
    mvp morgan
    ------------------------------



  • 6.  RE: What is the status code (number) for each returned status

    Posted Mon March 04, 2024 10:04 AM

    Thanks Hubert



    ------------------------------
    Wim Gielis
    ------------------------------