.setVariable("myVar", 0)
.create()
.getId();
// then
CaseSentryPartQueryImpl query = createCaseSentryPartQuery();
assertEquals(0, query.count());
// when
String stageId = caseService
.createCaseExecutionQuery()
.activityId("PI_Stage_1")
.singleResult()
.getId();
caseService
.withCaseExecution(stageId)
.manualStart();
// then
String humanTaskId = caseService
.createCaseExecutionQuery()
.activityId("PI_HumanTask_1")
.singleResult()
.getId();
assertEquals(2, query.count());
CaseSentryPartEntity part = query
.sentryId("Sentry_1")
.singleResult();
assertEquals(caseInstanceId, part.getCaseInstanceId());
assertEquals(stageId, part.getCaseExecutionId());
assertEquals("Sentry_1", part.getSentryId());
assertEquals(CmmnSentryDeclaration.IF_PART, part.getType());
assertNull(part.getSourceCaseExecutionId());
assertNull(part.getStandardEvent());
assertFalse(part.isSatisfied());
part = query
.sentryId("Sentry_2")
.singleResult();
assertEquals(caseInstanceId, part.getCaseInstanceId());
assertEquals(stageId, part.getCaseExecutionId());