public void handleIncident(String processDefinitionId, String activityId, String executionId, String jobId, String message) {
createIncident(processDefinitionId, activityId, executionId, jobId, message);
}
public Incident createIncident(String processDefinitionId, String activityId, String executionId, String jobId, String message) {
IncidentEntity newIncident;
if(executionId != null) {
newIncident = IncidentEntity.createAndInsertIncident(INCIDENT_HANDLER_TYPE, executionId, jobId, message);
newIncident.createRecursiveIncidents();
} else {
newIncident = IncidentEntity.createAndInsertIncident(INCIDENT_HANDLER_TYPE, processDefinitionId, activityId, jobId, message);
}
return newIncident;