Class DefaultIncidentHandler
java.lang.Object
org.camunda.bpm.engine.impl.incident.DefaultIncidentHandler
- All Implemented Interfaces:
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:
- type
failedJob
: Indicates jobs without retries left. This incident handler is active by default and must be disabled viaProcessEngineConfiguration.setCreateIncidentOnFailedJobEnabled(boolean)
. - type
failedExternalTask
: Indicates external tasks without retries left
- Author:
- nico.rehwaldt, roman.smirnov, Falko Menge, Thorben Lindhauer
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateIncident
(IncidentContext context, String message) void
deleteIncident
(IncidentContext context) Called in situations in which an incident handler may wish to delete existing incidents Example: when a scope is ended or a job is deleted.Returns the incident type this handler activates for.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) Called in situations in which an incident handler may wish to resolve existing incidents The implementation receives this callback to enable it to resolve any open incidents that may exist.
-
Field Details
-
type
-
-
Constructor Details
-
DefaultIncidentHandler
-
-
Method Details
-
getIncidentHandlerType
Description copied from interface:IncidentHandler
Returns the incident type this handler activates for.- Specified by:
getIncidentHandlerType
in interfaceIncidentHandler
-
handleIncident
Description copied from interface:IncidentHandler
Handle an incident that arose in the context of an execution.- Specified by:
handleIncident
in interfaceIncidentHandler
-
createIncident
-
resolveIncident
Description copied from interface:IncidentHandler
Called in situations in which an incident handler may wish to resolve existing incidents The implementation receives this callback to enable it to resolve any open incidents that may exist.- Specified by:
resolveIncident
in interfaceIncidentHandler
-
deleteIncident
Description copied from interface:IncidentHandler
Called in situations in which an incident handler may wish to delete existing incidents Example: when a scope is ended or a job is deleted. The implementation receives this callback to enable it to delete any open incidents that may exist.- Specified by:
deleteIncident
in interfaceIncidentHandler
-
removeIncident
-