CaseExecution thirdHumanTask = queryCaseExecutionByActivityId("PI_HumanTask_3");
String thirdHumanTaskId = thirdHumanTask.getId();
assertTrue(thirdHumanTask.isAvailable());
CaseSentryPartQueryImpl query = createCaseSentryPartQuery();
CmmnSentryPart part = query.singleResult();
assertFalse(part.isSatisfied());
// when
manualStart(firstHumanTaskId);
complete(firstHumanTaskId);
// then
secondHumanTask = queryCaseExecutionById(secondHumanTaskId);
assertTrue(secondHumanTask.isEnabled());
thirdHumanTask = queryCaseExecutionById(thirdHumanTaskId);
assertTrue(thirdHumanTask.isEnabled());
part = query
.satisfied()
.singleResult();
assertNotNull(part);
assertTrue(part.isSatisfied());
}