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

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


    assertProcessEnded(processInstance.getId());
   
    List<HistoricVariableInstance> variables = historyService.createHistoricVariableInstanceQuery().list();
    assertEquals(1, variables.size());
   
    HistoricVariableInstanceEntity historicVariable = (HistoricVariableInstanceEntity) variables.get(0);
    assertEquals("test456", historicVariable.getTextValue());
   
    assertEquals(7, historyService.createHistoricActivityInstanceQuery().count());
    assertEquals(2, historyService.createHistoricDetailQuery().count());
  }
View Full Code Here


    assertProcessEnded(processInstance.getId());
   
    List<HistoricVariableInstance> variables = historyService.createHistoricVariableInstanceQuery().orderByVariableName().asc().list();
    assertEquals(2, variables.size());
   
    HistoricVariableInstanceEntity historicVariable = (HistoricVariableInstanceEntity) variables.get(0);
    assertEquals("myVar", historicVariable.getName());
    assertEquals("test101112", historicVariable.getTextValue());
   
    HistoricVariableInstanceEntity historicVariable1 = (HistoricVariableInstanceEntity) variables.get(1);
    assertEquals("myVar1", historicVariable1.getName());
    assertEquals("test789", historicVariable1.getTextValue());
   
    assertEquals(15, historyService.createHistoricActivityInstanceQuery().count());
    assertEquals(7, historyService.createHistoricDetailQuery().count());
  }
View Full Code Here

   * Record a variable has been created, if audit history is enabled.
   */
  public void recordVariableCreate(VariableInstanceEntity variable) {
    // Historic variables
    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      HistoricVariableInstanceEntity historicVariableInstance = new HistoricVariableInstanceEntity(variable);
      getDbSqlSession().insert(historicVariableInstance);
    }
  }
View Full Code Here

  /**
   * Record a variable has been updated, if audit history is enabled.
   */
  public void recordVariableUpdate(VariableInstanceEntity variable) {
    if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      HistoricVariableInstanceEntity historicProcessVariable =
      getDbSqlSession().findInCache(HistoricVariableInstanceEntity.class, variable.getId());
      if (historicProcessVariable==null) {
        historicProcessVariable = Context
                .getCommandContext()
                .getHistoricVariableInstanceManager()
                .findHistoricVariableInstanceByVariableInstanceId(variable.getId());
      }
      if (historicProcessVariable!=null) {
        historicProcessVariable.copyValue(variable);
      } else {
        historicProcessVariable = new HistoricVariableInstanceEntity(variable);
        getDbSqlSession().insert(historicProcessVariable);
      }
    }
  }
View Full Code Here

TOP

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

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.