org.camunda.bpm.engine.impl.history.event
Class HistoryEvent

java.lang.Object
  extended by org.camunda.bpm.engine.impl.history.event.HistoryEvent
All Implemented Interfaces:
Serializable, PersistentObject
Direct Known Subclasses:
HistoricDetailEventEntity, HistoricIncidentEventEntity, HistoricScopeInstanceEvent, UserOperationLogEntryEventEntity

public class HistoryEvent
extends Object
implements Serializable, PersistentObject

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 PersistentObject. This was chosen so that HistoryEvents can be easily persisted using the DbSqlSession. This may not be used by all HistoryEventHandler implementations but it does also not cause harm.

Author:
Daniel Meyer
See Also:
Serialized Form

Field Summary
static String ACTIVITY_EVENT_TYPE_END
          fired when an activity instance is ended.
static String ACTIVITY_EVENT_TYPE_START
          fired when an activity instance is started.
static String ACTIVITY_EVENT_TYPE_UPDATE
          fired when an activity instance is updated.
protected  String eventType
          The type of the activity audit event.
protected  String executionId
          the id of the execution in which the event has happened
static String FORM_PROPERTY_UPDATE
          fired when a form property is updated
protected  String id
          each HistoryEvent has a unique id
static String INCIDENT_CREATE
           
static String INCIDENT_DELETE
           
static String INCIDENT_RESOLVE
           
protected  String processDefinitionId
          the id of the process definition
protected  String processInstanceId
          the process instance in which the event has happened
static String TASK_EVENT_TYPE_COMPLETE
          fired when a task instance is completed.
static String TASK_EVENT_TYPE_CREATE
          fired when a task instance is created
static String TASK_EVENT_TYPE_DELETE
          fired when a task instance is deleted.
static String TASK_EVENT_TYPE_UPDATE
          fired when a task instance is updated.
static String VARIABLE_EVENT_TYPE_CREATE
          fired when a variable instance is created
static String VARIABLE_EVENT_TYPE_DELETE
          fired when a variable instance is deleted
static String VARIABLE_EVENT_TYPE_UPDATE
          fired when a variable instance is updated
 
Constructor Summary
HistoryEvent()
           
 
Method Summary
 String getEventType()
           
 String getExecutionId()
           
 String getId()
           
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 String getProcessDefinitionId()
           
 String getProcessInstanceId()
           
 void setEventType(String eventType)
           
 void setExecutionId(String executionId)
           
 void setId(String id)
           
 void setProcessDefinitionId(String processDefinitionId)
           
 void setProcessInstanceId(String processInstanceId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTIVITY_EVENT_TYPE_START

public static final String ACTIVITY_EVENT_TYPE_START
fired when an activity instance is started.

See Also:
Constant Field Values

ACTIVITY_EVENT_TYPE_UPDATE

public static final String ACTIVITY_EVENT_TYPE_UPDATE
fired when an activity instance is updated.

See Also:
Constant Field Values

ACTIVITY_EVENT_TYPE_END

public static final String ACTIVITY_EVENT_TYPE_END
fired when an activity instance is ended.

See Also:
Constant Field Values

TASK_EVENT_TYPE_CREATE

public static final String TASK_EVENT_TYPE_CREATE
fired when a task instance is created

See Also:
Constant Field Values

TASK_EVENT_TYPE_UPDATE

public static final String TASK_EVENT_TYPE_UPDATE
fired when a task instance is updated.

See Also:
Constant Field Values

TASK_EVENT_TYPE_COMPLETE

public static final String TASK_EVENT_TYPE_COMPLETE
fired when a task instance is completed.

See Also:
Constant Field Values

TASK_EVENT_TYPE_DELETE

public static final String TASK_EVENT_TYPE_DELETE
fired when a task instance is deleted.

See Also:
Constant Field Values

VARIABLE_EVENT_TYPE_CREATE

public static final String VARIABLE_EVENT_TYPE_CREATE
fired when a variable instance is created

See Also:
Constant Field Values

VARIABLE_EVENT_TYPE_UPDATE

public static final String VARIABLE_EVENT_TYPE_UPDATE
fired when a variable instance is updated

See Also:
Constant Field Values

VARIABLE_EVENT_TYPE_DELETE

public static final String VARIABLE_EVENT_TYPE_DELETE
fired when a variable instance is deleted

See Also:
Constant Field Values

FORM_PROPERTY_UPDATE

public static final String FORM_PROPERTY_UPDATE
fired when a form property is updated

See Also:
Constant Field Values

INCIDENT_CREATE

public static final String INCIDENT_CREATE
See Also:
Constant Field Values

INCIDENT_DELETE

public static final String INCIDENT_DELETE
See Also:
Constant Field Values

INCIDENT_RESOLVE

public static final String INCIDENT_RESOLVE
See Also:
Constant Field Values

id

protected String id
each HistoryEvent has a unique id


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


eventType

protected String eventType
The type of the activity audit event.

See Also:
ACTIVITY_EVENT_TYPE_START, ACTIVITY_EVENT_TYPE_END, ACTIVITY_EVENT_TYPE_UPDATE, TASK_EVENT_TYPE_CREATE, TASK_EVENT_TYPE_UPDATE, TASK_EVENT_TYPE_COMPLETE, TASK_EVENT_TYPE_DELETE, VARIABLE_EVENT_TYPE_CREATE, VARIABLE_EVENT_TYPE_UPDATE, VARIABLE_EVENT_TYPE_DELETE
Constructor Detail

HistoryEvent

public HistoryEvent()
Method Detail

getProcessInstanceId

public String getProcessInstanceId()

setProcessInstanceId

public void setProcessInstanceId(String processInstanceId)

getExecutionId

public String getExecutionId()

setExecutionId

public void setExecutionId(String executionId)

getProcessDefinitionId

public String getProcessDefinitionId()

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

setId

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

getId

public String getId()
Specified by:
getId in interface PersistentObject

getEventType

public String getEventType()

setEventType

public void setEventType(String eventType)

getPersistentState

public Object getPersistentState()
Description copied from interface: PersistentObject
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 PersistentObject

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 camunda services GmbH. All Rights Reserved.