Class HistoryEvent

java.lang.Object
org.camunda.bpm.engine.impl.history.event.HistoryEvent
All Implemented Interfaces:
Serializable, DbEntity, HistoricEntity
Direct Known Subclasses:
HistoricBatchEntity, HistoricDecisionEvaluationEvent, HistoricDecisionInputInstanceEntity, HistoricDecisionInstanceEntity, HistoricDecisionOutputInstanceEntity, HistoricDetailEventEntity, HistoricExternalTaskLogEntity, HistoricIdentityLinkLogEventEntity, HistoricIncidentEventEntity, HistoricJobLogEvent, HistoricScopeInstanceEvent, UserOperationLogEntryEventEntity

public class HistoryEvent extends Object implements Serializable, DbEntity, HistoricEntity

The base class for all history events.

A history event contains data about an event that has happened in a process instance. Such an event may be the start of an activity, the end of an activity, a task instance that is created or other similar events...

History events contain data in a serializable form. Some implementations may persist events directly or may serialize them as an intermediate representation for later processing (ie. in an asynchronous implementation).

This class implements DbEntity. This was chosen so that HistoryEvents can be easily persisted using the DbEntityManager. This may not be used by all HistoryEventHandler implementations but it does also not cause harm.

Author:
Daniel Meyer
See Also:
  • Field Details

    • ACTIVITY_EVENT_TYPE_START

      @Deprecated public static final String ACTIVITY_EVENT_TYPE_START
      Deprecated.
    • ACTIVITY_EVENT_TYPE_UPDATE

      @Deprecated public static final String ACTIVITY_EVENT_TYPE_UPDATE
      Deprecated.
    • ACTIVITY_EVENT_TYPE_END

      @Deprecated public static final String ACTIVITY_EVENT_TYPE_END
      Deprecated.
    • TASK_EVENT_TYPE_CREATE

      @Deprecated public static final String TASK_EVENT_TYPE_CREATE
      Deprecated.
    • TASK_EVENT_TYPE_UPDATE

      @Deprecated public static final String TASK_EVENT_TYPE_UPDATE
      Deprecated.
    • TASK_EVENT_TYPE_COMPLETE

      @Deprecated public static final String TASK_EVENT_TYPE_COMPLETE
      Deprecated.
    • TASK_EVENT_TYPE_DELETE

      @Deprecated public static final String TASK_EVENT_TYPE_DELETE
      Deprecated.
    • VARIABLE_EVENT_TYPE_CREATE

      @Deprecated public static final String VARIABLE_EVENT_TYPE_CREATE
      Deprecated.
    • VARIABLE_EVENT_TYPE_UPDATE

      @Deprecated public static final String VARIABLE_EVENT_TYPE_UPDATE
      Deprecated.
    • VARIABLE_EVENT_TYPE_DELETE

      @Deprecated public static final String VARIABLE_EVENT_TYPE_DELETE
      Deprecated.
    • FORM_PROPERTY_UPDATE

      @Deprecated public static final String FORM_PROPERTY_UPDATE
      Deprecated.
    • INCIDENT_CREATE

      @Deprecated public static final String INCIDENT_CREATE
      Deprecated.
    • INCIDENT_DELETE

      @Deprecated public static final String INCIDENT_DELETE
      Deprecated.
    • INCIDENT_RESOLVE

      @Deprecated public static final String INCIDENT_RESOLVE
      Deprecated.
    • id

      protected String id
      each HistoryEvent has a unique id
    • rootProcessInstanceId

      protected String rootProcessInstanceId
      the root process instance in which the event has happened
    • processInstanceId

      protected String processInstanceId
      the process instance in which the event has happened
    • executionId

      protected String executionId
      the id of the execution in which the event has happened
    • processDefinitionId

      protected String processDefinitionId
      the id of the process definition
    • processDefinitionKey

      protected String processDefinitionKey
      the key of the process definition
    • processDefinitionName

      protected String processDefinitionName
      the name of the process definition
    • processDefinitionVersion

      protected Integer processDefinitionVersion
      the version of the process definition
    • caseInstanceId

      protected String caseInstanceId
      the case instance in which the event has happened
    • caseExecutionId

      protected String caseExecutionId
      the id of the case execution in which the event has happened
    • caseDefinitionId

      protected String caseDefinitionId
      the id of the case definition
    • caseDefinitionKey

      protected String caseDefinitionKey
      the key of the case definition
    • caseDefinitionName

      protected String caseDefinitionName
      the name of the case definition
    • eventType

      protected String eventType
      The type of the activity audit event.
      See Also:
    • sequenceCounter

      protected long sequenceCounter
    • removalTime

      protected Date removalTime
  • Constructor Details

    • HistoryEvent

      public HistoryEvent()
  • Method Details

    • getProcessInstanceId

      public String getProcessInstanceId()
    • setProcessInstanceId

      public void setProcessInstanceId(String processInstanceId)
    • getRootProcessInstanceId

      public String getRootProcessInstanceId()
    • setRootProcessInstanceId

      public void setRootProcessInstanceId(String rootProcessInstanceId)
    • getExecutionId

      public String getExecutionId()
    • setExecutionId

      public void setExecutionId(String executionId)
    • getProcessDefinitionId

      public String getProcessDefinitionId()
    • setProcessDefinitionId

      public void setProcessDefinitionId(String processDefinitionId)
    • getProcessDefinitionKey

      public String getProcessDefinitionKey()
    • setProcessDefinitionKey

      public void setProcessDefinitionKey(String processDefinitionKey)
    • getProcessDefinitionName

      public String getProcessDefinitionName()
    • setProcessDefinitionName

      public void setProcessDefinitionName(String processDefinitionName)
    • getProcessDefinitionVersion

      public Integer getProcessDefinitionVersion()
    • setProcessDefinitionVersion

      public void setProcessDefinitionVersion(Integer processDefinitionVersion)
    • getCaseDefinitionName

      public String getCaseDefinitionName()
    • setCaseDefinitionName

      public void setCaseDefinitionName(String caseDefinitionName)
    • getCaseDefinitionKey

      public String getCaseDefinitionKey()
    • setCaseDefinitionKey

      public void setCaseDefinitionKey(String caseDefinitionKey)
    • getCaseDefinitionId

      public String getCaseDefinitionId()
    • setCaseDefinitionId

      public void setCaseDefinitionId(String caseDefinitionId)
    • getCaseInstanceId

      public String getCaseInstanceId()
    • setCaseInstanceId

      public void setCaseInstanceId(String caseInstanceId)
    • getCaseExecutionId

      public String getCaseExecutionId()
    • setCaseExecutionId

      public void setCaseExecutionId(String caseExecutionId)
    • setId

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

      public String getId()
      Specified by:
      getId in interface DbEntity
    • getEventType

      public String getEventType()
    • setEventType

      public void setEventType(String eventType)
    • getSequenceCounter

      public long getSequenceCounter()
    • setSequenceCounter

      public void setSequenceCounter(long sequenceCounter)
    • getRemovalTime

      public Date getRemovalTime()
    • setRemovalTime

      public void setRemovalTime(Date removalTime)
    • 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
    • isEventOfType

      public boolean isEventOfType(HistoryEventType type)
    • toString

      public String toString()
      Overrides:
      toString in class Object