Package org.activiti.engine.impl.persistence.entity

Examples of org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity


     
      HistoricDetailVariableInstanceUpdateEntity historicVariableUpdate =
          HistoricDetailVariableInstanceUpdateEntity.copyAndInsert(variable);
     
      if (useActivityId && sourceActivityExecution != null) {
        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(sourceActivityExecution);
        if (historicActivityInstance!=null) {
          historicVariableUpdate.setActivityInstanceId(historicActivityInstance.getId());
        }
      }
    }
  }
View Full Code Here


     
      String processDefinitionId = processInstance.getProcessDefinitionId();
      String processInstanceId = processInstance.getProcessInstanceId();
      String executionId = processInstance.getId();
 
      HistoricActivityInstanceEntity historicActivityInstance = new HistoricActivityInstanceEntity();
      historicActivityInstance.setId(idGenerator.getNextId());
      historicActivityInstance.setProcessDefinitionId(processDefinitionId);
      historicActivityInstance.setProcessInstanceId(processInstanceId);
      historicActivityInstance.setExecutionId(executionId);
      historicActivityInstance.setActivityId(processInstance.getActivityId());
      historicActivityInstance.setActivityName((String) processInstance.getActivity().getProperty("name"));
      historicActivityInstance.setActivityType((String) processInstance.getActivity().getProperty("type"));
      Date now = ClockUtil.getCurrentTime();
      historicActivityInstance.setStartTime(now);
     
      getDbSqlSession()
        .insert(historicActivityInstance);
    }
  }
View Full Code Here

    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
     
      HistoricProcessInstanceEntity historicProcessInstance = new HistoricProcessInstanceEntity((ExecutionEntity) subProcessInstance);
      getDbSqlSession().insert(historicProcessInstance);
     
      HistoricActivityInstanceEntity activitiyInstance = findActivityInstance(parentExecution);
      if (activitiyInstance != null) {
        activitiyInstance.setCalledProcessInstanceId(subProcessInstance.getProcessInstanceId());
      }
     
    }
  }
View Full Code Here

     
      String processDefinitionId = executionEntity.getProcessDefinitionId();
      String processInstanceId = executionEntity.getProcessInstanceId();
      String executionId = executionEntity.getId();

      HistoricActivityInstanceEntity historicActivityInstance = new HistoricActivityInstanceEntity();
      historicActivityInstance.setId(idGenerator.getNextId());
      historicActivityInstance.setProcessDefinitionId(processDefinitionId);
      historicActivityInstance.setProcessInstanceId(processInstanceId);
      historicActivityInstance.setExecutionId(executionId);
      historicActivityInstance.setActivityId(executionEntity.getActivityId());
      historicActivityInstance.setActivityName((String) executionEntity.getActivity().getProperty("name"));
      historicActivityInstance.setActivityType((String) executionEntity.getActivity().getProperty("type"));
      historicActivityInstance.setStartTime(ClockUtil.getCurrentTime());
     
      getDbSqlSession().insert(historicActivityInstance);
    }
  }
View Full Code Here

  /**
   * Record the end of an activitiy, if activity history is enabled.
   */
  public void recordActivityEnd(ExecutionEntity executionEntity) {
    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(executionEntity);
      if (historicActivityInstance!=null) {
        historicActivityInstance.markEnded(null);
      }
    }
  }
View Full Code Here

   */
  public void recordTaskAssignment(TaskEntity task) {
    ExecutionEntity executionEntity = task.getExecution();
    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      if (executionEntity != null) {
        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(executionEntity);
        if(historicActivityInstance != null) {
          historicActivityInstance.setAssignee(task.getAssignee());
        }
      }
    }
  }
View Full Code Here

   */
  public void recordTaskId(TaskEntity task) {
    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      ExecutionEntity execution = task.getExecution();
      if (execution != null) {
        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(execution);
        if(historicActivityInstance != null) {
          historicActivityInstance.setTaskId(task.getId());
        }
      }
    }
  }
View Full Code Here

    if(isHistoryLevelAtLeast(HistoryLevel.FULL)) {
     
      HistoricDetailVariableInstanceUpdateEntity historicVariableUpdate = new HistoricDetailVariableInstanceUpdateEntity(variable);
     
      if(useActivityId && sourceActivityExecution != null) {
        HistoricActivityInstanceEntity historicActivityInstance = findActivityInstance(sourceActivityExecution);
        if (historicActivityInstance!=null) {
          historicVariableUpdate.setActivityInstanceId(historicActivityInstance.getId());
        }
      }
     
     getDbSqlSession().insert(historicVariableUpdate);
    }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity

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.