protected PvmExecutionImpl eventNotificationsStarted(PvmExecutionImpl execution) {
   // Note: the following method call initializes the property
   // "processInstanceStartContext" on the given execution.
   // Do not remove it!
   execution.getProcessInstanceStartContext();
   return execution;
 }
 protected void eventNotificationsCompleted(PvmExecutionImpl execution) {
   ProcessDefinitionImpl processDefinition = execution.getProcessDefinition();
   ProcessInstanceStartContext processInstanceStartContext =
       execution.getProcessInstanceStartContext();
   List<ActivityImpl> initialActivityStack =
       processDefinition.getInitialActivityStack(processInstanceStartContext.getInitial());
   execution.setActivity(initialActivityStack.get(0));
   execution.performOperation(PROCESS_START_INITIAL);
 }
 @Override
 public boolean isAsync(PvmExecutionImpl execution) {
   ProcessInstanceStartContext startContext = execution.getProcessInstanceStartContext();
   return startContext != null && startContext.isAsync();
 }