Rest API behaviour
Posted: Thu Apr 04, 2019 4:01 am
Hi Guys,
I'm observing some odd behavior when trying to call a process via Rest API (in Postman).
It works as expected until I force the TI to ProcessQuit by introducing invalid parameter value. When I run the same process from TM1, ProcessQuit works as expected.
In TM1 Logs I get an following error when I execute via Postman with an invalid parameter value, e.g. DIMIX ( 'Year', pYear ) = 0, Invalid file name etc. While ProcessQuit is expected, I'm not sure why there is a Rollback on executing an Unknown function. Moreover, I have a cube that gets update based on errors encountered in a Prolog, however when I try to force errors in a TI via API call that cube does not get updated.
Process "ProcessName": : Execution was aborted by ProcessQuit Function.
CommitActionLog::Rollback: Called for thread '7856' of user '...'' executing function 'Unknown'.
API Call below:
POST /api/v1/Processes('ProcessName')/tm1.Execute HTTP/1.1
{
"Parameters": [
{
"Name": "pFileName",
"Value": "FileName"
},
{
"Name": "pYear",
"Value": "2017"
},
{
"Name": "pYearTo",
"Value": "2019"
},
{
"Name": "pMonthFrom",
"Value": "1"
},
{
"Name": "pMonthTo",
"Value": "12"
},
{
"Name": "pVersion",
"Value": "Actual"
},
{
"Name": "pAdjustment",
"Value": "N"
},
{
"Name": "pDebug",
"Value": 0
}
]
}
Any help or insights would be much appreciated
Thanks
Evgeny
I'm observing some odd behavior when trying to call a process via Rest API (in Postman).
It works as expected until I force the TI to ProcessQuit by introducing invalid parameter value. When I run the same process from TM1, ProcessQuit works as expected.
In TM1 Logs I get an following error when I execute via Postman with an invalid parameter value, e.g. DIMIX ( 'Year', pYear ) = 0, Invalid file name etc. While ProcessQuit is expected, I'm not sure why there is a Rollback on executing an Unknown function. Moreover, I have a cube that gets update based on errors encountered in a Prolog, however when I try to force errors in a TI via API call that cube does not get updated.
Process "ProcessName": : Execution was aborted by ProcessQuit Function.
CommitActionLog::Rollback: Called for thread '7856' of user '...'' executing function 'Unknown'.
API Call below:
POST /api/v1/Processes('ProcessName')/tm1.Execute HTTP/1.1
{
"Parameters": [
{
"Name": "pFileName",
"Value": "FileName"
},
{
"Name": "pYear",
"Value": "2017"
},
{
"Name": "pYearTo",
"Value": "2019"
},
{
"Name": "pMonthFrom",
"Value": "1"
},
{
"Name": "pMonthTo",
"Value": "12"
},
{
"Name": "pVersion",
"Value": "Actual"
},
{
"Name": "pAdjustment",
"Value": "N"
},
{
"Name": "pDebug",
"Value": 0
}
]
}
Any help or insights would be much appreciated
Thanks
Evgeny