Class IncidentEntity
java.lang.Object
org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity
- All Implemented Interfaces:
DbEntity
,HasDbReferences
,HasDbRevision
,Incident
public class IncidentEntity
extends Object
implements Incident, DbEntity, HasDbRevision, HasDbReferences
- Author:
- roman.smirnov
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected Date
protected String
protected String
protected static final IncidentLogger
protected String
protected String
protected int
protected String
protected String
Fields inherited from interface org.camunda.bpm.engine.runtime.Incident
EXTERNAL_TASK_HANDLER_TYPE, FAILED_JOB_HANDLER_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static IncidentEntity
static IncidentEntity
createAndInsertIncident
(String incidentType, IncidentContext context, String message) protected void
createRecursiveIncidents
(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) Instantiate recursive a new incident a super execution (i.e.void
delete()
boolean
protected void
fireHistoricIncidentEvent
(HistoryEventType eventType) Returns the id of the activity of the process instance on which this incident has happened.Returns the annotation of this incidentReturns the id of the incident on which this incident has been triggered.Returns the payload of this incident.Returns the specific execution on which this incident has happened.Returns the id of the activity on which the last exception occurred.Returns the history payload of this incident.getId()
Returns the unique identifier for this incident.Returns the incident message.Time when the incident happened.Returns the type of this incident to identify the kind of incident.Returns the id of the job definition the incident belongs to.Returns a representation of the object, as would be stored in the database.Returns the id of the process definition of this process instance on which the incident has happened.Returns the specific process instance on which this incident has happened.Scope: IN-MEMORY referencesScope: IN-MEMORY referencesint
int
Returns the id of the root incident on which this transitive incident has been triggered.Returns the id of the tenant this incident belongs to.int
hashCode()
protected static void
insert
(IncidentEntity incident) protected void
remove
(boolean resolved) void
resolve()
void
setActivityId
(String activityId) void
setAnnotation
(String annotation) void
setCauseIncidentId
(String causeIncidentId) void
setConfiguration
(String configuration) void
setExecution
(ExecutionEntity execution) void
setExecutionId
(String executionId) void
setFailedActivityId
(String failedActivityId) void
setHistoryConfiguration
(String historyConfiguration) void
void
setIncidentMessage
(String incidentMessage) void
setIncidentTimestamp
(Date incidentTimestamp) void
setIncidentType
(String incidentType) void
setJobDefinitionId
(String jobDefinitionId) void
setProcessDefinitionId
(String processDefinitionId) void
setProcessInstanceId
(String processInstanceId) void
setRevision
(int revision) void
setRootCauseIncidentId
(String rootCauseIncidentId) void
setTenantId
(String tenantId) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntities
-
Field Details
-
LOG
-
revision
protected int revision -
id
-
incidentTimestamp
-
incidentType
-
executionId
-
activityId
-
processInstanceId
-
processDefinitionId
-
causeIncidentId
-
rootCauseIncidentId
-
configuration
-
incidentMessage
-
tenantId
-
jobDefinitionId
-
historyConfiguration
-
failedActivityId
-
annotation
-
-
Constructor Details
-
IncidentEntity
public IncidentEntity()
-
-
Method Details
-
createRecursiveIncidents
-
createRecursiveIncidents
protected void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) Instantiate recursive a new incident a super execution (i.e. super process instance) which is affected from this incident. For example: a super process instance called via CallActivity a new process instance on which an incident happened, so that the super process instance has an incident too. -
createAndInsertIncident
public static IncidentEntity createAndInsertIncident(String incidentType, IncidentContext context, String message) -
create
-
insert
-
delete
public void delete() -
resolve
public void resolve() -
remove
protected void remove(boolean resolved) -
fireHistoricIncidentEvent
-
getReferencedEntityIds
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntityIds
in interfaceHasDbReferences
- Returns:
- the ids of the entities that this entity references. Should only return ids for entities of the same type
-
getReferencedEntitiesIdAndClass
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClass
in interfaceHasDbReferences
- Returns:
- a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.
-
getId
Description copied from interface:Incident
Returns the unique identifier for this incident. -
setId
-
getIncidentTimestamp
Description copied from interface:Incident
Time when the incident happened.- Specified by:
getIncidentTimestamp
in interfaceIncident
-
setIncidentTimestamp
-
getIncidentType
Description copied from interface:Incident
Returns the type of this incident to identify the kind of incident.For example:
failedJobs
will be returned in the case of an incident, which identify failed job during the execution of a process instance.- Specified by:
getIncidentType
in interfaceIncident
- See Also:
-
setIncidentType
-
getIncidentMessage
Description copied from interface:Incident
Returns the incident message.- Specified by:
getIncidentMessage
in interfaceIncident
-
setIncidentMessage
-
getExecutionId
Description copied from interface:Incident
Returns the specific execution on which this incident has happened.- Specified by:
getExecutionId
in interfaceIncident
-
setExecutionId
-
getActivityId
Description copied from interface:Incident
Returns the id of the activity of the process instance on which this incident has happened.- Specified by:
getActivityId
in interfaceIncident
-
setActivityId
-
getProcessInstanceId
Description copied from interface:Incident
Returns the specific process instance on which this incident has happened.- Specified by:
getProcessInstanceId
in interfaceIncident
-
setProcessInstanceId
-
getProcessDefinition
-
getProcessDefinitionId
Description copied from interface:Incident
Returns the id of the process definition of this process instance on which the incident has happened.- Specified by:
getProcessDefinitionId
in interfaceIncident
-
setProcessDefinitionId
-
getCauseIncidentId
Description copied from interface:Incident
Returns the id of the incident on which this incident has been triggered.- Specified by:
getCauseIncidentId
in interfaceIncident
-
setCauseIncidentId
-
getRootCauseIncidentId
Description copied from interface:Incident
Returns the id of the root incident on which this transitive incident has been triggered.- Specified by:
getRootCauseIncidentId
in interfaceIncident
-
setRootCauseIncidentId
-
getConfiguration
Description copied from interface:Incident
Returns the payload of this incident.- Specified by:
getConfiguration
in interfaceIncident
-
setConfiguration
-
getTenantId
Description copied from interface:Incident
Returns the id of the tenant this incident belongs to. Can benull
if the incident belongs to no single tenant.- Specified by:
getTenantId
in interfaceIncident
-
setTenantId
-
setJobDefinitionId
-
getJobDefinitionId
Description copied from interface:Incident
Returns the id of the job definition the incident belongs to. Can benull
if the incident belongs to no job definition.- Specified by:
getJobDefinitionId
in interfaceIncident
-
setExecution
-
getExecution
-
getPersistentState
Description copied from interface:DbEntity
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.- Specified by:
getPersistentState
in interfaceDbEntity
-
setRevision
public void setRevision(int revision) - Specified by:
setRevision
in interfaceHasDbRevision
-
getRevision
public int getRevision()- Specified by:
getRevision
in interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
getHistoryConfiguration
Description copied from interface:Incident
Returns the history payload of this incident.- Specified by:
getHistoryConfiguration
in interfaceIncident
-
setHistoryConfiguration
-
getFailedActivityId
Description copied from interface:Incident
Returns the id of the activity on which the last exception occurred.- Specified by:
getFailedActivityId
in interfaceIncident
-
setFailedActivityId
-
getAnnotation
Description copied from interface:Incident
Returns the annotation of this incident- Specified by:
getAnnotation
in interfaceIncident
-
setAnnotation
-
toString
-
hashCode
public int hashCode() -
equals
-