String caseInstanceId = caseService
.withCaseDefinitionByKey("case")
.create()
.getId();
CaseExecution milestone = caseService
.createCaseExecutionQuery()
.activityId("PI_Milestone_1")
.singleResult();
String humanTaskId = caseService
.createCaseExecutionQuery()
.activityId("PI_HumanTask_1")
.singleResult()
.getId();
assertTrue(milestone.isAvailable());
// when
caseService
.withCaseExecution(humanTaskId)
.manualStart();
// then
assertNull(caseService.getVariable(caseInstanceId, "occur"));
milestone = caseService
.createCaseExecutionQuery()
.available()
.singleResult();
assertTrue(milestone.isAvailable());
// when
caseService
.withCaseExecution(humanTaskId)
.complete();