Tell how process invoked via API has failed

Options
julio.harada
julio.harada Member, ALL USERS, Employee Posts: 5 Contributor

When we POST /processes/{{processid}}/tasks (API call to invoke process) to closed model, server will start attempt to open the model and at the same time, sends back 200 to client with taskId in its response body.

 

However in some occassion (like outage) the model fails to open. This will cause the process task to also fail.

 

To check the status of the invoked process, conventionally, we will be making GET request using the taskId.

When we GET the result of this process, response does not indicate how it has failed.

 

Example response:

 

{
    "meta": {
        "schema": https://api.anaplan.com/2/0/models/<modelGuid>/objects/task
    },
    "status": {
        "code": 200,
        "message": "Success"
    },
    "task": {
        "taskId": "<taskId>",
        "currentStep": "Failed.",
        "progress": 0.0,
        "result": {
            "failureDumpAvailable": false,
            "objectId": "<processId>",
            "successful": false
        },
        "taskState": "COMPLETE",
        "creationTime": <epoch>
    }
}

 

 

This will make it harder to debug the cause of failed process.

 

Internal ref: CORESRV-9976

Tagged: