Package org.activiti.engine.impl.interceptor

Examples of org.activiti.engine.impl.interceptor.CommandContext


//    if (owner!=null && owner.equals(this.owner)) {
//      return;
//    }
    this.owner = owner;

    CommandContext commandContext = Context.getCommandContext();
    if (commandContext!=null) {
      commandContext
        .getHistoryManager()
        .recordTaskOwnerChange(id, owner);
     
      if (owner != null && processInstanceId != null) {
        getProcessInstance().involveUser(owner, IdentityLinkType.PARTICIPANT);
      }
     
      if(dispatchUpdateEvent && commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
        if(dispatchUpdateEvent) {
          commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(
              ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_UPDATED, this));
        }
      }
    }
  }
View Full Code Here


  }
 
  public void setDueDate(Date dueDate, boolean dispatchUpdateEvent) {
     this.dueDate = dueDate;
    
     CommandContext commandContext = Context.getCommandContext();
     if (commandContext!=null) {
       commandContext
         .getHistoryManager()
         .recordTaskDueDateChange(id, dueDate);
      
       if(dispatchUpdateEvent && commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
         if(dispatchUpdateEvent) {
           commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(
               ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_UPDATED, this));
         }
       }
     }
  }
View Full Code Here

  }
 
  public void setPriority(int priority, boolean dispatchUpdateEvent) {
    this.priority = priority;
   
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext!=null) {
      commandContext
        .getHistoryManager()
        .recordTaskPriorityChange(id, priority);
     
      if(dispatchUpdateEvent && commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
        if(dispatchUpdateEvent) {
          commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(
              ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_UPDATED, this));
        }
      }
    }
  }
View Full Code Here

  }
 
  public void setCategory(String category) {
    this.category = category;
    
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext!=null) {
      commandContext
        .getHistoryManager()
        .recordTaskCategoryChange(id, category);
    }
  }
View Full Code Here

  }
 
  public void setParentTaskId(String parentTaskId) {
    this.parentTaskId = parentTaskId;
   
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext!=null) {
      commandContext
        .getHistoryManager()
        .recordTaskParentTaskIdChange(id, parentTaskId);
    }
  }
View Full Code Here

  }

  public void setFormKey(String formKey) {
    this.formKey = formKey;
   
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext!=null) {
      commandContext
        .getHistoryManager()
        .recordTaskFormKeyChange(id, formKey);
    }
  }
View Full Code Here

 
  public void setTaskDefinition(TaskDefinition taskDefinition) {
    this.taskDefinition = taskDefinition;
    this.taskDefinitionKey = taskDefinition.getKey();
   
    CommandContext commandContext = Context.getCommandContext();
    if(commandContext != null) {
      commandContext.getHistoryManager().recordTaskDefinitionKeyChange(this, taskDefinitionKey);
    }
  }
View Full Code Here

  }
 
  public void setTaskDefinitionKey(String taskDefinitionKey) {
    this.taskDefinitionKey = taskDefinitionKey;
   
    CommandContext commandContext = Context.getCommandContext();
    if(commandContext != null) {
      commandContext.getHistoryManager().recordTaskDefinitionKeyChange(this, taskDefinitionKey);
    }
  }
View Full Code Here

  }
 
  @SuppressWarnings("unchecked")
  public void deleteHistoricProcessInstanceById(String historicProcessInstanceId) {
    if (getHistoryManager().isHistoryEnabled()) {
      CommandContext commandContext = Context.getCommandContext();
      HistoricProcessInstanceEntity historicProcessInstance = findHistoricProcessInstance(historicProcessInstanceId);
     
      commandContext
        .getHistoricDetailEntityManager()
        .deleteHistoricDetailsByProcessInstanceId(historicProcessInstanceId);

      commandContext
        .getHistoricVariableInstanceEntityManager()
        .deleteHistoricVariableInstanceByProcessInstanceId(historicProcessInstanceId);
     
      commandContext
        .getHistoricActivityInstanceEntityManager()
        .deleteHistoricActivityInstancesByProcessInstanceId(historicProcessInstanceId);
     
      commandContext
        .getHistoricTaskInstanceEntityManager()
        .deleteHistoricTaskInstancesByProcessInstanceId(historicProcessInstanceId);
     
      commandContext
        .getHistoricIdentityLinkEntityManager()
        .deleteHistoricIdentityLinksByProcInstance(historicProcessInstanceId);
     
      commandContext
        .getCommentEntityManager()
        .deleteCommentsByProcessInstanceId(historicProcessInstanceId);
     
      getDbSqlSession().delete(historicProcessInstance);
     
View Full Code Here

  public void insertUser(User user) {
    getDbSqlSession().insert((PersistentObject) user);
  }
 
  public void updateUser(UserEntity updatedUser) {
    CommandContext commandContext = Context.getCommandContext();
    DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
    dbSqlSession.update(updatedUser);
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.interceptor.CommandContext

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.