Examples of HistoryEventHandler


Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    int historyLevel = processEngineConfiguration.getHistoryLevel();
    ExecutionEntity execution = task.getExecution();
    if (historyLevel >= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT && execution != null) {

      final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();
      final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();

      for (String propertyId : properties.keySet()) {
        Object propertyValue = properties.get(propertyId);

        HistoryEvent evt = eventProducer.createFormPropertyUpdateEvt(execution, propertyId, propertyValue, taskId);
        eventHandler.handleEvent(evt);

      }
    }

    TaskFormHandler taskFormHandler = task.getTaskDefinition().getTaskFormHandler();
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
    int historyLevel = configuration.getHistoryLevel();
    if (historyLevel>=ProcessEngineConfigurationImpl.HISTORYLEVEL_ACTIVITY) {

      final HistoryEventProducer eventFactory = configuration.getHistoryEventProducer();
      final HistoryEventHandler eventHandler = configuration.getHistoryEventHandler();

      // publish start event for sub process instance
      HistoryEvent hpise = eventFactory.createProcessInstanceStartEvt(subProcessInstance);
      eventHandler.handleEvent(hpise);

      // publish update event for current activity instance (containing the id of the sub process)
      HistoryEvent haie = eventFactory.createActivityInstanceUpdateEvt(this, null);
      eventHandler.handleEvent(haie);
    }

    return subProcessInstance;
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    if (historyLevel >= ProcessEngineConfigurationImpl.HISTORYLEVEL_ACTIVITY) {

      if (historyLevel >= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {

        final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();
        final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();

        for (String propertyId : formProperties.keySet()) {
          Object propertyValue = formProperties.get(propertyId);
          HistoryEvent evt = eventProducer.createFormPropertyUpdateEvt((ExecutionEntity) execution, propertyId, propertyValue, null);
          eventHandler.handleEvent(evt);
        }

      }
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    int historyLevel = processEngineConfiguration.getHistoryLevel();
    if (historyLevel >= ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL) {

      final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();
      final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();

      HistoryEvent event = null;
      if (HistoryEvent.INCIDENT_CREATE.equals(eventType)) {
        event = eventProducer.createHistoricIncidentCreateEvt(this);

      } else if (HistoryEvent.INCIDENT_RESOLVE.equals(eventType)) {
        event = eventProducer.createHistoricIncidentResolveEvt(this);

      } else if (HistoryEvent.INCIDENT_DELETE.equals(eventType)) {
        event = eventProducer.createHistoricIncidentDeleteEvt(this);

      } else {
        return;
      }

      eventHandler.handleEvent(event);
    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    int historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
    if (historyLevel >=ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {

      final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
      final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();
      final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();

      HistoryEvent evt = eventProducer.createHistoricVariableDeleteEvt(variableInstance, sourceActivityExecution);
      eventHandler.handleEvent(evt);

    }

  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

  public void fireHistoricVariableInstanceCreate(VariableInstanceEntity variableInstance, CoreVariableScope<PersistentVariableInstance> sourceActivityExecution) {
    int historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
    if (historyLevel >=ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {

      final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
      final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();
      final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();

      HistoryEvent evt = eventProducer.createHistoricVariableCreateEvt(variableInstance, sourceActivityExecution);
      eventHandler.handleEvent(evt);

    }

  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    int historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
    if (historyLevel >=ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {

      final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
      final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();
      final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();

      HistoryEvent evt = eventProducer.createHistoricVariableUpdateEvt(variableInstance, sourceActivityExecution);
      eventHandler.handleEvent(evt);

    }

  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

  }

  public void notify(DelegateTask task) {
   
    // get the event handler
    final HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration()
      .getHistoryEventHandler();
   
    ExecutionEntity execution = ((TaskEntity) task).getExecution();
   
    if (execution != null) {
     
      // delegate creation of the history event to the producer
      HistoryEvent historyEvent = createHistoryEvent(task, execution);
     
      // pass the event to the handler
      historyEventHandler.handleEvent(historyEvent);
     
    }
   
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

  }

  public void notify(DelegateExecution execution) throws Exception {
   
    // get the event handler
    final HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration()
      .getHistoryEventHandler();
   
    // delegate creation of the history event to the producer
    HistoryEvent historyEvent = createHistoryEvent(execution);
   
    // pass the event to the handler
    historyEventHandler.handleEvent(historyEvent);
   
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

    int historyLevel = configuration.getHistoryLevel();
    // TODO: This smells bad, as the rest of the history is done via the ParseListener
    if (historyLevel>=ProcessEngineConfigurationImpl.HISTORYLEVEL_ACTIVITY) {

      final HistoryEventProducer eventFactory = configuration.getHistoryEventProducer();
      final HistoryEventHandler eventHandler = configuration.getHistoryEventHandler();

      // publish event for historic process instance start
      HistoryEvent pise = eventFactory.createProcessInstanceStartEvt(processInstance);
      eventHandler.handleEvent(pise);

    }

    return processInstance;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.