public class DefaultIncidentHandler extends Object implements IncidentHandler
An incident handler that logs incidents of a certain type
as instances of Incident
to the engine database.
By default, the process engine has two default handlers:
failedJob
: Indicates jobs without retries left. This incident handler is active by default and must be disabled
via ProcessEngineConfiguration.setCreateIncidentOnFailedJobEnabled(boolean)
.
failedExternalTask
: Indicates external tasks without retries left
IncidentHandler
Constructor and Description |
---|
DefaultIncidentHandler(String type) |
Modifier and Type | Method and Description |
---|---|
Incident |
createIncident(IncidentContext context,
String message) |
void |
deleteIncident(IncidentContext context)
Delete an incident that arose in the context of an execution.
|
String |
getIncidentHandlerType()
Returns the incident type this handler activates for.
|
void |
handleIncident(IncidentContext context,
String message)
Handle an incident that arose in the context of an execution.
|
protected void |
removeIncident(IncidentContext context,
boolean incidentResolved) |
void |
resolveIncident(IncidentContext context)
Resolve an incident that arose in the context of an execution.
|
protected String type
public DefaultIncidentHandler(String type)
public String getIncidentHandlerType()
IncidentHandler
getIncidentHandlerType
in interface IncidentHandler
public void handleIncident(IncidentContext context, String message)
IncidentHandler
handleIncident
in interface IncidentHandler
public Incident createIncident(IncidentContext context, String message)
public void resolveIncident(IncidentContext context)
IncidentHandler
resolveIncident
in interface IncidentHandler
public void deleteIncident(IncidentContext context)
IncidentHandler
deleteIncident
in interface IncidentHandler
protected void removeIncident(IncidentContext context, boolean incidentResolved)
Copyright © 2017. All rights reserved.