Search in sources :

Example 16 with HistoryEventProducer

use of org.camunda.bpm.engine.impl.history.producer.HistoryEventProducer in project camunda-bpm-platform by camunda.

the class IdentityLinkEntity method fireHistoricIdentityLinkEvent.

public void fireHistoricIdentityLinkEvent(final HistoryEventType eventType) {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    HistoryLevel historyLevel = processEngineConfiguration.getHistoryLevel();
    if (historyLevel.isHistoryEventProduced(eventType, this)) {
        HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {

            @Override
            public HistoryEvent createHistoryEvent(HistoryEventProducer producer) {
                HistoryEvent event = null;
                if (HistoryEvent.IDENTITY_LINK_ADD.equals(eventType.getEventName())) {
                    event = producer.createHistoricIdentityLinkAddEvent(IdentityLinkEntity.this);
                } else if (HistoryEvent.IDENTITY_LINK_DELETE.equals(eventType.getEventName())) {
                    event = producer.createHistoricIdentityLinkDeleteEvent(IdentityLinkEntity.this);
                }
                return event;
            }
        });
    }
}
Also used : HistoryLevel(org.camunda.bpm.engine.impl.history.HistoryLevel) HistoryEventProcessor(org.camunda.bpm.engine.impl.history.event.HistoryEventProcessor) HistoryEventProducer(org.camunda.bpm.engine.impl.history.producer.HistoryEventProducer) HistoryEvent(org.camunda.bpm.engine.impl.history.event.HistoryEvent) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Aggregations

HistoryEventProducer (org.camunda.bpm.engine.impl.history.producer.HistoryEventProducer)16 HistoryLevel (org.camunda.bpm.engine.impl.history.HistoryLevel)15 HistoryEvent (org.camunda.bpm.engine.impl.history.event.HistoryEvent)15 HistoryEventProcessor (org.camunda.bpm.engine.impl.history.event.HistoryEventProcessor)15 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)12 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)2 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)2 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)1 DelegateExecution (org.camunda.bpm.engine.delegate.DelegateExecution)1 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)1 HistoricProcessInstanceEventEntity (org.camunda.bpm.engine.impl.history.event.HistoricProcessInstanceEventEntity)1 HistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler)1 DeploymentCache (org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache)1 ExecutionManager (org.camunda.bpm.engine.impl.persistence.entity.ExecutionManager)1 IncidentEntity (org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity)1 JobDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity)1 JobEntity (org.camunda.bpm.engine.impl.persistence.entity.JobEntity)1 ProcessDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity)1 PropertyChange (org.camunda.bpm.engine.impl.persistence.entity.PropertyChange)1 TaskEntity (org.camunda.bpm.engine.impl.persistence.entity.TaskEntity)1