Class DefaultIncidentHandler
- java.lang.Object
-
- org.camunda.bpm.engine.impl.incident.DefaultIncidentHandler
-
- All Implemented Interfaces:
IncidentHandler
public class DefaultIncidentHandler extends java.lang.Object implements IncidentHandler
An incident handler that logs incidents of a certain type as instances of
Incidentto 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:
IncidentHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringtype
-
Constructor Summary
Constructors Constructor Description DefaultIncidentHandler(java.lang.String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IncidentcreateIncident(IncidentContext context, java.lang.String message)voiddeleteIncident(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.java.lang.StringgetIncidentHandlerType()Returns the incident type this handler activates for.IncidenthandleIncident(IncidentContext context, java.lang.String message)Handle an incident that arose in the context of an execution.protected voidremoveIncident(IncidentContext context, boolean incidentResolved)voidresolveIncident(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.
-
-
-
Method Detail
-
getIncidentHandlerType
public java.lang.String getIncidentHandlerType()
Description copied from interface:IncidentHandlerReturns the incident type this handler activates for.- Specified by:
getIncidentHandlerTypein interfaceIncidentHandler
-
handleIncident
public Incident handleIncident(IncidentContext context, java.lang.String message)
Description copied from interface:IncidentHandlerHandle an incident that arose in the context of an execution.- Specified by:
handleIncidentin interfaceIncidentHandler
-
createIncident
public Incident createIncident(IncidentContext context, java.lang.String message)
-
resolveIncident
public void resolveIncident(IncidentContext context)
Description copied from interface:IncidentHandlerCalled 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:
resolveIncidentin interfaceIncidentHandler
-
deleteIncident
public void deleteIncident(IncidentContext context)
Description copied from interface:IncidentHandlerCalled 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:
deleteIncidentin interfaceIncidentHandler
-
removeIncident
protected void removeIncident(IncidentContext context, boolean incidentResolved)
-
-