03-12-2015 09:00 PM
// Create a basic query on the intermediate message.
ExecutionQuery query = runtimeService.createExecutionQuery()
.processInstanceId(processInstance.getProcessInstanceId())
.messageEventSubscriptionName(MESSAGE);
// Prove a query is returned.
Execution execution = query.singleResult();
assertNotNull(execution);
// Prove our global variable is in the execution and its value is what is expected.
assertEquals(runtimeService.getVariable(execution.getId(), KEY), VALUE);
// If more than one query were returned above, we should be able to refine further
// using variableValuesEqual. For some reason variableValueEquals and ignoreCase is failing.
Execution refinedExecution = query.variableValueEquals(KEY, VALUE).singleResult();
// !!! Fails. !!!
assertNotNull(refinedExecution);
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>5.17.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.181</version>
<scope>test</scope>
</dependency>
03-16-2015 06:49 PM
03-17-2015 05:51 AM
03-19-2015 08:15 PM
03-24-2015 09:14 AM
04-29-2015 03:56 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.