Package org.activiti.engine.delegate.event

Examples of org.activiti.engine.delegate.event.ActivitiEventDispatcher


      job.setExceptionMessage(exception.getMessage());
      job.setExceptionStacktrace(getExceptionStacktrace());
    }
   
    // Dispatch both an update and a retry-decrement event
    ActivitiEventDispatcher eventDispatcher = commandContext.getEventDispatcher();
    if (eventDispatcher.isEnabled()) {
      eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
          ActivitiEventType.ENTITY_UPDATED, job));
      eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
          ActivitiEventType.JOB_RETRIES_DECREMENTED, job));
    }
   
    if (processEngineConfig.isAsyncExecutorEnabled() == false) {
      JobExecutor jobExecutor = processEngineConfig.getJobExecutor();
View Full Code Here


    // Remove any process definition from the cache
    List<ProcessDefinition> processDefinitions = new ProcessDefinitionQueryImpl(Context.getCommandContext())
            .deploymentId(deploymentId)
            .list();
    ActivitiEventDispatcher eventDispatcher = Context.getProcessEngineConfiguration().getEventDispatcher();
   
    for (ProcessDefinition processDefinition : processDefinitions) {
     
      // Since all process definitions are deleted by a single query, we should dispatch the
      // events in this loop
      if(eventDispatcher.isEnabled()) {
        eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
            ActivitiEventType.ENTITY_DELETED, processDefinition));
      }
    }
   
    // Delete data
    deploymentEntityManager.deleteDeployment(deploymentId, cascade);
   
    // Since we use a delete by query, delete-events are not automatically dispatched
    if(eventDispatcher.isEnabled()) {
      eventDispatcher.dispatchEvent(
          ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_DELETED, deployment));
    }
   
    for (ProcessDefinition processDefinition : processDefinitions) {
      processDefinitionCache.remove(processDefinition.getId());
View Full Code Here

TOP

Related Classes of org.activiti.engine.delegate.event.ActivitiEventDispatcher

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.