Class CompositeIncidentHandler
java.lang.Object
org.camunda.bpm.engine.impl.incident.CompositeIncidentHandler
- All Implemented Interfaces:
IncidentHandler
A composite incident handler that handles incidents of a certain type by the multiple handlers. The result of handling depends on main handler.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCompositeIncidentHandler
(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) Constructor that takes a list ofIncidentHandler
that consume the incident.CompositeIncidentHandler
(IncidentHandler mainIncidentHandler, IncidentHandler... incidentHandlers) Constructor that takes a varargs parameterIncidentHandler
that consume the incident. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(IncidentHandler incidentHandler) Adds theIncidentHandler
to the list ofIncidentHandler
that consume the incident.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
initializeIncidentsHandlers
(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) InitializeincidentHandlers
with data transfered from constructorvoid
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
-
mainIncidentHandler
-
incidentHandlers
-
-
Constructor Details
-
CompositeIncidentHandler
public CompositeIncidentHandler(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) Constructor that takes a list ofIncidentHandler
that consume the incident.- Parameters:
mainIncidentHandler
- the main incident handlerIncidentHandler
that consume the incident and return result.incidentHandlers
- the list ofIncidentHandler
that consume the incident.
-
CompositeIncidentHandler
public CompositeIncidentHandler(IncidentHandler mainIncidentHandler, IncidentHandler... incidentHandlers) Constructor that takes a varargs parameterIncidentHandler
that consume the incident.- Parameters:
mainIncidentHandler
- the main incident handlerIncidentHandler
that consume the incident and return result.incidentHandlers
- the list ofIncidentHandler
that consume the incident.
-
-
Method Details
-
initializeIncidentsHandlers
protected void initializeIncidentsHandlers(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) InitializeincidentHandlers
with data transfered from constructor- Parameters:
incidentHandlers
-
-
add
Adds theIncidentHandler
to the list ofIncidentHandler
that consume the incident.- Parameters:
incidentHandler
- theIncidentHandler
that consume the incident.
-
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
-
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
-