Skip to main content Skip to complementary content

Returning the status of a task executed in synchronous mode

Procedure

Use the runTask MetaServlet command to run the execution task.

Example

For example (on Windows):
MetaServletCaller.bat --tac-url=http://localhost:8080/org.talend.administrator/ 
--json-params="{'actionName':'runTask','authPass':'admin','authUser':'admin@company.com', 
'mode':'synchronous','taskId':'2502'}" --format-output

Example

If the task has been executed successfully, you will get for example:
{
  'errorStatus':  'NO_ERROR',
   'execBasicStatus':  'OK',
   'execDetailedStatus':  'ENDED_OK',
   'execDetailedStatusLabel':  'Ok',
   'execRequestId':  '1406816118032_sYHGd',
   'executionTime': {
     'millis': 6011,
     'seconds': 6
  },
   'jobExitCode': 0,
   'returnCode': 0,
   'status':  'READY_TO_RUN'
}
The task status at the end of the execution is Ready to run and the execution status Ended OK as well as the Job exit code 0 indicate that it ended successfully.

Example

If the task has failed, you will get for example:
{
  'errorStatus':  'JOB_ERROR',
   'execBasicStatus':  'ERROR',
   'execDetailedStatus':  'JOB_ERROR',
   'execDetailedStatusLabel':  'Job ended with error(s)',
   'execRequestId':  '1406817091606_fVsht',
   'executionTime': {
     'millis': 3847,
     'seconds': 3
  },
   'jobExitCode': 1,
   'returnCode': 0,
   'status':  'READY_TO_RUN'
}
The execution status Job error as well as the Job exit code 1 indicate that an error occurred during the task execution.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!