Monitoring taskflow status with the status resource

Use the status resource to query the status of a taskflow that was run as an API. You can query the status of a taskflow based on the taskflow run ID.

GET request

To query the status of a taskflow that was run as an API, use the following URL:

<Informatica Intelligent Cloud Services URL>/active-bpel/services/tf/status/<run ID>

The GET request must be authenticated in one of the following ways:

  • Use basic authorization and specify the Informatica Intelligent Cloud Services user name and password.
  • Use the INFA-SESSION-ID in the HTTP header. To get the INFA-SESSION-ID, you must use the Platform REST API version 3 login resource. For more information about the login resource, see REST API Reference.

You must also specify the following HTTP header: Accept: application/json

Use one of the following GET requests:

GET <Informatica Intelligent Cloud Services URL>/active-bpel/services/tf/status/<run ID> 
Accept: application/json
INFA-SESSION-ID: <sessionId>
GET <Informatica Intelligent Cloud Services URL>/active-bpel/services/tf/status/<run ID> 
Accept: application/json
Authorization: Basic Auth
username: <Informatica Intelligent Cloud Services user name>
password: <Informatica Intelligent Cloud Services password>

GET response

Returns the taskflow status information if successful or an error object if errors occur.
If successful, returns the following status information for a taskflow:

FieldTypeDescription
assetNameStringName of the taskflow.
assetTypeStringType of the object. Returns the value TASKFLOW.
durationStringTime in seconds that the taskflow ran before it completed, was suspended, or was stopped.
endTimeDate/timeEnd time for the taskflow run. Uses Coordinated Universal Time (UTC).
errorMessageStringError message string.
locationStringThe project and folder path where the taskflow is located.
runIdLongRun ID for the taskflow.
runtimeEnvStringID of the runtime environment where the taskflow runs.
runtimeEnvNameStringName of the runtime environment where the taskflow runs.
startTimeDate/timeStart time for the taskflow run. Uses Coordinated Universal Time (UTC).
startedByStringUser who started the taskflow.
statusStringExecution status of the taskflow.
Returns one of the following values to indicate the taskflow status:
RUNNING. The taskflow is running.
SUCCESS. The taskflow completed successfully.
FAILED. The taskflow did not complete because it encountered errors.
SUSPENDED. The taskflow run was suspended.
subtasksStringNumber of subtasks that the taskflow contains.
updateTimeDate/timeLast time the taskflow run status was updated. Uses Coordinated Universal Time (UTC).
subtaskDetailsStringObject that contains status details for all subtasks in the taskflow.
detailsStringStatus details. Includes status information for each subtask in the tasks object.
tasksCollectionStatus information for all subtasks that the taskflow contains.

The tasks object includes the following status information for each subtask that the taskflow contains:

FieldTypeDescription
assetNameStringName of the subtask in the taskflow.
assetTypeStringType of the subtask. Returns one of the following values:
MTT. Mapping task.
DSS. Synchronization task.
durationStringTime in seconds that the subtask ran before it completed or was stopped.
endTimeDate/timeEnd time for the subtask run. Uses Coordinated Universal Time (UTC).
errorMessageStringError message string.
errorRowsStringTotal number of rows that resulted in errors in a subtask.
locationStringThe project and folder path where the subtask is located.
rowsProcessedStringTotal number of rows that were processed in a subtask.
runIdLongRun ID for the subtask.
runtimeEnvStringID of the runtime environment where the subtask runs.
runtimeEnvNameStringName of the runtime environment where the subtask runs.
startTimeDate/timeStart time for the subtask run. Uses Coordinated Universal Time (UTC).
startedByStringwho started the task. This field is the same as the user who started the taskflow.
statusStringExecution status of the subtask.
Returns one of the following values to indicate the subtask status:
QUEUED. The subtask is queued on a Secure Agent, but it has not started yet.
STARTING. The subtask is starting.
RUNNING. The subtask is running.
COMPLETED. The subtask completed successfully.
STOPPED. The taskflow has stopped running, so the subtask cannot start.
WARNING. The subtask completed with errors.
* FAILED. The subtask did not complete because it encountered errors.
subtasksStringReserved for future use. When this field is returned for a subtask, the value is always 0.
successRowsStringTotal number of rows that were processed successfully in a subtask.
updateTimeDate/timeLast time the subtask run status was updated. Uses Coordinated Universal Time (UTC).

GET Example

The following example shows a taskflow status request:

GET https://pod.ics.dev:444/active-bpel/services/tf/status/20262247166322413568
Accept: application/json
INFA-SESSION-ID: 9KA11tLGqxVcGeul8SQBK3

Based on the taskflow configuration and request inputs, the response can be of the following types:

*Taskflow without subtasks
If the request is successful and the taskflow does not contain subtasks, the response includes taskflow status information as shown in the following example:

{
    "assetName": "Empty",    
    "assetType": "TASKFLOW",    
    "duration": 2,
    "endTime": "2018-12-25T15:56:39Z",
    "errorMessage": "",
    "location": "Default",
    "runId": 262247166322413568,
    "runtimeEnv": "tf_runtime",
    "runtimeEnvName": "",
    "startTime": "2018-12-25T15:56:37Z",
    "startedBy": "sb",
    "status": "SUCCESS",
    "subtasks": 0,
    "updateTime": "2018-12-25T15:56:39Z",
    "subtaskDetails": {
        "details": {}
    }
}

The HTTP status code is 200 OK.

Taskflow with subtasks

If the request is successful and the taskflow contains multiple subtasks, the response includes status information for each subtask that the taskflow contains as shown in the following example:

{
    "assetName": "Taskflow1",
    "assetType": "TASKFLOW",
    "duration": 89,
    "endTime": "2018-12-23T17:25:16Z",
    "errorMessage": "",
    "location": "Default",
    "runId": 20262247166322413568,
    "runtimeEnv": "tf_runtime",
    "runtimeEnvName": "",
    "startTime": "2018-12-23T17:23:47Z",
    "startedBy": "sb",
    "status": "SUCCESS",
    "subtasks": 2,
    "updateTime": "2018-12-23T17:25:17Z",
    "subtaskDetails": {
        "details": {
            "tasks": [
                {
                    "assetName": "MTR",
                    "assetType": "MTT",
                    "duration": "3",
                    "endTime": "2018-12-23T17:24:45Z",
                    "errorMessage": "",
                    "errorRows": "0",
                    "location": "Default",
                    "rowsProcessed": "7",
                    "runId": "4",
                    "runtimeEnv": "01001Q25000000000002",
                    "runtimeEnvName": "tf_runtime_devagent",
                    "startTime": "2018-12-23T17:24:42Z",
                    "startedBy": "sb",
                    "status": "COMPLETED",
                    "subtasks": "0",
                    "successRows": "7",
                    "updateTime": "2018-12-23T17:24:46Z"
                },
                {
                    "assetName": "MTR",
                    "assetType": "MTT",
                    "duration": "10",
                    "endTime": "2018-12-23T17:23:59Z",
                    "errorMessage": "",
                    "errorRows": "0",
                    "location": "Default",
                    "rowsProcessed": "7",
                    "runId": "3",
                    "runtimeEnv": "01001Q25000000000002",
                    "runtimeEnvName": "tf_runtime_devagent",
                    "startTime": "2018-12-23T17:23:49Z",
                    "startedBy": "sb",
                    "status": "COMPLETED",
                    "subtasks": "0",
                    "successRows": "7",
                    "updateTime": "2018-12-23T17:24:00Z"
                }
            ]
        }
    }
}

The HTTP status code is 200 OK.

Purged logs
If logs are purged for the instance, the response is as follows:

{ "status": "No status available." }

The HTTP status code is 200 OK.

Empty run ID
If the run ID is not specified, the response is as follows:

{ "error": "No Run Id specified." }

The HTTP status code is *400 Bad Request.

*Invalid run ID
If the run ID is not valid, the response is as follows:

{
    "error": "CMN_003-Bad request. Error message - The property '<runID>', used in a query expression, is not defined in type 'OData.job-log-service.JobLogEntry'."
}

The HTTP status code is *400 Bad Request(From JLS).

Unavailable JLS service
If the JLS service is unavailable, the response is as follows:

{ "error": "503-Service Unavailable." }

The HTTP status code is *503 Service Unavailable.