How to: Manage Mobile APIs

For information about prerequisites, see Integrate with Dispatch.

Update Execution Task Status

To update the Execution Task status, call the Update Execution Task Status endpoint and pass the following required members in the request body. Also, specify the workflowInstanceId and taskId in the path parameter.

MemberDescriptionRemarks
jobIdID of the Job.string
dispatchIdID of the Dispatch.string
attemptIdAttempt number of the workflow instance.number
statusStatus of the task.string
Enum: [ STARTED, CLOSED ]
sequenceIdSequence number of the Execution Task.number
stateNameTask/state name of the taskId.string
timestampEpoch timestamp of the status.
number.
minimum: 1
dataOutput of the Execution Task.
metaMeta data related to the Task.
updatedBy > idID.string
minLength: 1
maxLength: 64
updatedBy > nameName.string
maxLength: 256
updatedBy > appIdApp ID.string
maxLength: 64

The JSON request body should be similar to the following:

{
  "jobId": "string",
  "dispatchId": "string",
  "attemptId": 0,
  "status": "STARTED",
  "sequenceId": 0,
  "stateName": "string",
  "timestamp": 1,
  "data": {},
  "meta": {},
  "updatedBy": {
    "id": "string",
    "name": "string",
    "appId": "string"
  },
  "_event_meta": {}
}

Update Execution Workflow Status

To update the Execution Workflow status, call the Update Execution Workflow Status endpoint and pass the following required members in the request body. Also, specify the workflowInstanceId in the path parameter.

MemberDescriptionRemarks
statusStatus of the workflow.string
Enum: [ STARTED, CLOSED ]
timestampEpoch timestamp of the status.number
minimum: 1
dispatchIdID of the Dispatch.string
jobIdID of the Job.string
attemptIdAttempt number of the workflow instance.number
codeWorkflow objective code.string
dataCollated data of output of each execution task.
metaMeta data related to the Workflow.
updatedBy > idID.string
minLength: 1
maxLength: 64
updatedBy > nameName.string
maxLength: 256
updatedBy > appIdApp ID.string
maxLength: 64

The JSON request body should be similar to the following:

{
  "status": "STARTED",
  "timestamp": 1,
  "dispatchId": "string",
  "jobId": "string",
  "attemptId": 0,
  "closeJob": true,
  "data": {},
  "meta": {},
  "code": "string",
  "updatedBy": {
    "id": "string",
    "name": "string",
    "appId": "string"
  },
  "_event_meta": {}
}