.createActivity("end")
.behavior(new Automatic())
.endActivity()
.buildProcessDefinition();
PvmProcessInstance processInstance = processDefinition.createProcessInstance();
processInstance.start();
boolean eventScopeFound = false;
List<ExecutionImpl> executions = ((ExecutionImpl)processInstance).getExecutions();
for (ExecutionImpl executionImpl : executions) {
if(executionImpl.isEventScope()) {
eventScopeFound = true;
break;
}
}
assertTrue(eventScopeFound);
processInstance.signal(null, null);
assertTrue(processInstance.isEnded());
}