// this test does not start the process at the initial (the activity with id 'start'), but at
// 'waitInFirst'
public void testStartEndWithScopesAndNestedActivitiesNotAtInitial() {
EventCollector eventCollector = new EventCollector();
PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder("scopes and events")
.executionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START, eventCollector)
.executionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, eventCollector)
.createActivity("mostOuterNestedActivity")
.executionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START, eventCollector)
.executionListener(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END, eventCollector)