org.camunda.bpm.engine.impl.persistence.entity
Class IncidentEntity

java.lang.Object
  extended by 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
protected  String activityId
           
protected  String causeIncidentId
           
protected  String configuration
           
protected  String executionId
           
protected  String id
           
protected  String incidentMessage
           
protected  Date incidentTimestamp
           
protected  String incidentType
           
protected  String jobDefinitionId
           
protected static IncidentLogger LOG
           
protected  String processDefinitionId
           
protected  String processInstanceId
           
protected  int revision
           
protected  String rootCauseIncidentId
           
protected  String tenantId
           
 
Fields inherited from interface org.camunda.bpm.engine.runtime.Incident
EXTERNAL_TASK_HANDLER_TYPE, FAILED_JOB_HANDLER_TYPE
 
Constructor Summary
IncidentEntity()
           
 
Method Summary
protected static IncidentEntity create(String incidentType)
           
static IncidentEntity createAndInsertIncident(String incidentType, IncidentContext context, String message)
           
 List<IncidentEntity> createRecursiveIncidents()
           
protected  void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents)
          Instantiate recursive a new incident a super execution (i.e.
 void delete()
           
 boolean equals(Object obj)
           
protected  void fireHistoricIncidentEvent(HistoryEventType eventType)
           
 String getActivityId()
          Returns the id of the activity of the process instance on which this incident has happened.
 String getCauseIncidentId()
          Returns the id of the incident on which this incident has been triggered.
 String getConfiguration()
          Returns the payload of this incident.
 ExecutionEntity getExecution()
           
 String getExecutionId()
          Returns the specific execution on which this incident has happened.
 String getId()
          Returns the unique identifier for this incident.
 String getIncidentMessage()
          Returns the incident message.
 Date getIncidentTimestamp()
          Time when the incident happened.
 String getIncidentType()
          Returns the type of this incident to identify the kind of incident.
 String getJobDefinitionId()
          Returns the id of the job definition the incident belongs to.
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 ProcessDefinitionEntity getProcessDefinition()
           
 String getProcessDefinitionId()
          Returns the id of the process definition of this process instance on which the incident has happened.
 String getProcessInstanceId()
          Returns the specific process instance on which this incident has happened.
 Set<String> getReferencedEntityIds()
           
 int getRevision()
           
 int getRevisionNext()
           
 String getRootCauseIncidentId()
          Returns the id of the root incident on which this transitive incident has been triggered.
 String getTenantId()
          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 setCauseIncidentId(String causeIncidentId)
           
 void setConfiguration(String configuration)
           
 void setExecution(ExecutionEntity execution)
           
 void setExecutionId(String executionId)
           
 void setId(String id)
           
 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)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static final IncidentLogger LOG

revision

protected int revision

id

protected String id

incidentTimestamp

protected Date incidentTimestamp

incidentType

protected String incidentType

executionId

protected String executionId

activityId

protected String activityId

processInstanceId

protected String processInstanceId

processDefinitionId

protected String processDefinitionId

causeIncidentId

protected String causeIncidentId

rootCauseIncidentId

protected String rootCauseIncidentId

configuration

protected String configuration

incidentMessage

protected String incidentMessage

tenantId

protected String tenantId

jobDefinitionId

protected String jobDefinitionId
Constructor Detail

IncidentEntity

public IncidentEntity()
Method Detail

createRecursiveIncidents

public List<IncidentEntity> 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

protected static IncidentEntity create(String incidentType)

insert

protected static void insert(IncidentEntity incident)

delete

public void delete()

resolve

public void resolve()

remove

protected void remove(boolean resolved)

fireHistoricIncidentEvent

protected void fireHistoricIncidentEvent(HistoryEventType eventType)

getReferencedEntityIds

public Set<String> getReferencedEntityIds()
Specified by:
getReferencedEntityIds in interface HasDbReferences
Returns:
the ids of the entities that this entity references. Should only return ids for entities of the same type

getId

public String getId()
Description copied from interface: Incident
Returns the unique identifier for this incident.

Specified by:
getId in interface DbEntity
Specified by:
getId in interface Incident

setId

public void setId(String id)
Specified by:
setId in interface DbEntity

getIncidentTimestamp

public Date getIncidentTimestamp()
Description copied from interface: Incident
Time when the incident happened.

Specified by:
getIncidentTimestamp in interface Incident

setIncidentTimestamp

public void setIncidentTimestamp(Date incidentTimestamp)

getIncidentType

public String 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 interface Incident
See Also:
Incident.FAILED_JOB_HANDLER_TYPE, Incident.EXTERNAL_TASK_HANDLER_TYPE

setIncidentType

public void setIncidentType(String incidentType)

getIncidentMessage

public String getIncidentMessage()
Description copied from interface: Incident
Returns the incident message.

Specified by:
getIncidentMessage in interface Incident

setIncidentMessage

public void setIncidentMessage(String incidentMessage)

getExecutionId

public String getExecutionId()
Description copied from interface: Incident
Returns the specific execution on which this incident has happened.

Specified by:
getExecutionId in interface Incident

setExecutionId

public void setExecutionId(String executionId)

getActivityId

public String 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 interface Incident

setActivityId

public void setActivityId(String activityId)

getProcessInstanceId

public String getProcessInstanceId()
Description copied from interface: Incident
Returns the specific process instance on which this incident has happened.

Specified by:
getProcessInstanceId in interface Incident

setProcessInstanceId

public void setProcessInstanceId(String processInstanceId)

getProcessDefinition

public ProcessDefinitionEntity getProcessDefinition()

getProcessDefinitionId

public String 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 interface Incident

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

getCauseIncidentId

public String getCauseIncidentId()
Description copied from interface: Incident
Returns the id of the incident on which this incident has been triggered.

Specified by:
getCauseIncidentId in interface Incident

setCauseIncidentId

public void setCauseIncidentId(String causeIncidentId)

getRootCauseIncidentId

public String 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 interface Incident

setRootCauseIncidentId

public void setRootCauseIncidentId(String rootCauseIncidentId)

getConfiguration

public String getConfiguration()
Description copied from interface: Incident
Returns the payload of this incident.

Specified by:
getConfiguration in interface Incident

setConfiguration

public void setConfiguration(String configuration)

getTenantId

public String getTenantId()
Description copied from interface: Incident
Returns the id of the tenant this incident belongs to. Can be null if the incident belongs to no single tenant.

Specified by:
getTenantId in interface Incident

setTenantId

public void setTenantId(String tenantId)

setJobDefinitionId

public void setJobDefinitionId(String jobDefinitionId)

getJobDefinitionId

public String getJobDefinitionId()
Description copied from interface: Incident
Returns the id of the job definition the incident belongs to. Can be null if the incident belongs to no job definition.

Specified by:
getJobDefinitionId in interface Incident

setExecution

public void setExecution(ExecutionEntity execution)

getExecution

public ExecutionEntity getExecution()

getPersistentState

public Object 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 interface DbEntity

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasDbRevision

getRevision

public int getRevision()
Specified by:
getRevision in interface HasDbRevision

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasDbRevision

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2017 camunda services GmbH. All rights reserved.