.singleResult();
assertNull(caseExecution);
// the case instance is still active
CaseInstance caseInstance = caseService
.createCaseInstanceQuery()
.active()
.singleResult();
assertNotNull(caseInstance);
assertTrue(caseInstance.isActive());
// the variables has been set and due to the completion
// also removed in one command
List<VariableInstance> result = runtimeService
.createVariableInstanceQuery()