Created
December 20, 2016 16:31
-
-
Save tijsrademakers/2c0b74935d53674ce16921e769406974 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public testIntroProcess() { | |
.... | |
HistoricVariableInstance historicVariable = historyService.createHistoricVariableInstanceQuery() | |
.processInstanceId(processInstance.getId()) | |
.singleResult(); | |
assertEquals("variablePresent", historicVariable.getVariableName()); | |
assertEquals(false, historicVariable.getValue()); | |
processInstance = runtimeService.startProcessInstanceByKey("intro", Collections.singletonMap("intro", (Object) "a test intro value")); | |
List<HistoricVariableInstance> historicVariables = historyService | |
.createHistoricVariableInstanceQuery() | |
.processInstanceId(processInstance.getId()) | |
.orderByVariableName() | |
.asc() | |
.list(); | |
assertEquals("intro", historicVariables.get(0).getVariableName()); | |
assertEquals("a test intro value", historicVariables.get(0).getValue()); | |
assertEquals("variablePresent", historicVariables.get(1).getVariableName()); | |
assertEquals(true, historicVariables.get(1).getValue()); | |
processEngine.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment