Package org.camunda.bpm.engine.impl.history.handler

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


        taskId = task.getId();
      }

      if (executionEntity != null) {
        final HistoryEventProducer eventProducer = processEngineConfiguration.getHistoryEventProducer();
        final HistoryEventHandler eventHandler = processEngineConfiguration.getHistoryEventHandler();

        for (String variableName : properties.keySet()) {

          TypedValue value = properties.getValueTyped(variableName);

          // NOTE: SerializableValues are never stored as form properties
          if (!(value instanceof SerializableValue)
              && value.getValue() != null && value.getValue() instanceof String) {
            String stringValue = (String) value.getValue();
            HistoryEvent evt = eventProducer.createFormPropertyUpdateEvt(executionEntity, variableName, stringValue, taskId);
            eventHandler.handleEvent(evt);
          }
        }
      }
    }
  }
View Full Code Here


    ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
    HistoryLevel historyLevel = configuration.getHistoryLevel();
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.ACTIVITY_INSTANCE_UPDATE, this)) {

      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

    HistoryLevel historyLevel = configuration.getHistoryLevel();
    if(historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_COMPLETE, taskEntity)) {

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

      HistoryEvent evt = eventProducer.createTaskInstanceCompleteEvt(taskEntity, deleteReason);

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

    HistoryLevel historyLevel = configuration.getHistoryLevel();
    if(historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_CREATE, task)) {

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

      HistoryEvent evt = eventProducer.createTaskInstanceCreateEvt(task);
      eventHandler.handleEvent(evt);

    }
  }
View Full Code Here

    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

    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

    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

    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

    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

  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

TOP

Related Classes of org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler

Copyright © 2018 www.massapicom. 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.