Create Incident
Creates a custom incident with given properties.
Method
POST /execution/{id}/create-incident
Parameters
Path Parameters
| Name | Description | 
|---|---|
| id | The id of the execution to create a new incident for. | 
Request Body
A JSON object with the following properties:
| Name | Description | 
|---|---|
| incidentType | A type of the new incident. | 
| configuration | A configuration for the new incident. | message | A message for the new incident. | 
Result
A JSON object that represents an incident object with the following properties:
| Name | Value | Description | 
|---|---|---|
| id | String | The id of the incident. | 
| processDefinitionId | String | The id of the process definition this incident is associated with. | 
| processInstanceId | String | The id of the process instance this incident is associated with. | 
| executionId | String | The id of the execution this incident is associated with. | 
| incidentTimestamp | String | The time this incident happened. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ. | 
| incidentType | String | The type of incident. | 
| activityId | String | The id of the activity this incident is associated with. | 
| causeIncidentId | String | The id of the associated cause incident which has been triggered. | 
| rootCauseIncidentId | String | The id of the associated root cause incident which has been triggered. | 
| configuration | String | The payload of this incident. | 
| tenantId | String | The id of the tenant this incident is associated with. | 
| incidentMessage | String | The message of this incident. | 
| jobDefinitionId | String | The job definition id the incident is associated with. | 
* For further information, please see the documentation.
Response Codes
| Code | Media type | Description | 
|---|---|---|
| 200 | application/json | Request successful. | 
| 400 | application/json | Returned if the incident type is null, the execution does not exist or the execution is not related to any activity. | 
Example
Request
POST /execution/anExecutionId/create-incident
Request Body:
{
  "incidentType" : "aType",
  "configuration" : "aConfiguration"
}
Response
Status 200.
  {
    "id": "anIncidentId",
    "processDefinitionId": "aProcDefId",
    "processInstanceId": "aProcInstId",
    "executionId": "anExecutionId",
    "incidentTimestamp": "2014-03-01T08:00:00.000+0200",
    "incidentType": "failedJob",
    "activityId": "serviceTask",
    "causeIncidentId": "aCauseIncidentId",
    "rootCauseIncidentId": "aRootCauseIncidentId",
    "configuration": "aConfiguration",
    "tenantId": null,
    "incidentMessage": "anIncidentMessage",
    "jobDefinitionId": "aJobDefinitionId"
  }