fail("It should not be possible to complete a case instance containing an active task.");
} catch (ProcessEngineException e) {}
// then
CaseExecution caseExecution = caseService
.createCaseExecutionQuery()
.activityId("PI_HumanTask_1")
.singleResult();
assertNotNull(caseExecution);
assertTrue(caseExecution.isActive());
// the case instance is still active
CaseInstance caseInstance = caseService
.createCaseInstanceQuery()
.singleResult();