15.13.1. Get a single job
GET management/jobs/{jobId}
Table 226. Get a single job - URL parametersParameter | Required | Value | Description |
---|
jobId | Yes | String | The id of the job to get. |
Success response body:
{
"id":"8",
"url":"http://localhost:8182/management/jobs/8",
"processInstanceId":"5",
"processInstanceUrl":"http://localhost:8182/runtime/process-instances/5",
"processDefinitionId":"timerProcess:1:4",
"processDefinitionUrl":"http://localhost:8182/repository/process-definitions/timerProcess%3A1%3A4",
"executionId":"7",
"executionUrl":"http://localhost:8182/runtime/executions/7",
"retries":3,
"exceptionMessage":null,
"dueDate":"2013-06-04T22:05:05.474+0000",
"tenantId":null
}
Table 227. Get a single job - Response codesResponse code | Description |
---|
200 | Indicates the job exists and is returned. |
404 | Indicates the requested job does not exist. |
15.13.2. Delete a job
DELETE management/jobs/{jobId}
Table 228. Delete a job - URL parametersParameter | Required | Value | Description |
---|
jobId | Yes | String | The id of the job to delete. |
Table 229. Delete a job - Response codesResponse code | Description |
---|
204 | Indicates the job was found and has been deleted. Response-body is intentionally empty. |
404 | Indicates the requested job was not found. |
15.13.3. Execute a single job
POST management/jobs/{jobId}
Body JSON:
{
"action" : "execute"
}
Table 230. Execute a single job - JSON Body parametersParameter | Description | Required |
---|
action | Action to perform. Only execute is supported. | Yes |
Table 231. Execute a single job - Response codesResponse code | Description |
---|
204 | Indicates the job was executed. Response-body is intentionally empty. |
404 | Indicates the requested job was not found. |
500 | Indicates the an exception occurred while executing the job. The status-description contains additional detail about the error. The full error-stacktrace can be fetched later on if needed. |
15.13.4. Get the exception stacktrace for a job
GET management/jobs/{jobId}/exception-stacktrace
Table 232. Get the exception stacktrace for a job - URL parametersParameter | Description | Required |
---|
jobId | Id of the job to get the stacktrace for. | Yes |
Table 233. Get the exception stacktrace for a job - Response codesResponse code | Description |
---|
200 | Indicates the requested job was not found and the stacktrace has been returned. The response contains the raw stacktrace and always has a Content-type of text/plain . |
404 | Indicates the requested job was not found or the job doesn’t have an exception stacktrace. Status-description contains additional information about the error. |
15.13.5. Get a list of jobs
GET management/jobs
Table 234. Get a list of jobs - URL query parametersParameter | Description | Type |
---|
id | Only return job with the given id | String |
processInstanceId | Only return jobs part of a process with the given id | String |
executionId | Only return jobs part of an execution with the given id | String |
processDefinitionId | Only return jobs with the given process definition id | String |
withRetriesLeft | If true , only return jobs with retries left. If false, this parameter is ignored. | Boolean |
executable | If true , only return jobs which are executable. If false, this parameter is ignored. | Boolean |
timersOnly | If true , only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly' . | Boolean |
messagesOnly | If true , only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly' | Boolean |
withException | If true , only return jobs for which an exception occurred while executing it. If false, this parameter is ignored. | Boolean |
dueBefore | Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter. | Date |
dueAfter | Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter. | Date |
exceptionMessage | Only return jobs with the given exception message | String |
tenantId | No | String |
Only return jobs with the given tenantId. | tenantIdLike | No |
String | Only return jobs with a tenantId like the given value. | withoutTenantId |
No | Boolean | If true , only returns jobs without a tenantId set. If false , the withoutTenantId parameter is ignored. |
sort | Field to sort results on, should be one of id , dueDate , executionId , processInstanceId , retries or tenantId . | String |
Success response body:
{
"data":[
{
"id":"13",
"url":"http://localhost:8182/management/jobs/13",
"processInstanceId":"5",
"processInstanceUrl":"http://localhost:8182/runtime/process-instances/5",
"processDefinitionId":"timerProcess:1:4",
"processDefinitionUrl":"http://localhost:8182/repository/process-definitions/timerProcess%3A1%3A4",
"executionId":"12",
"executionUrl":"http://localhost:8182/runtime/executions/12",
"retries":0,
"exceptionMessage":"Can't find scripting engine for 'unexistinglanguage'",
"dueDate":"2013-06-07T10:00:24.653+0000",
"tenantId":null
}
],
"total":2,
"start":0,
"sort":"id",
"order":"asc",
"size":2
}
Table 235. Get a list of jobs - Response codesResponse code | Description |
---|
200 | Indicates the requested jobs were returned. |
400 | Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error. |
发布评论