code: @Override
    public void executeActivity(PvmActivity activity) {
      if (!activity.getIncomingTransitions().isEmpty()) {
        throw new ProcessEngineException("Activity is contained in normal flow and cannot be executed using executeActivity().");
      }
  
      ActivityStartBehavior activityStartBehavior = activity.getActivityStartBehavior();
      if (!isScope() && ActivityStartBehavior.DEFAULT != activityStartBehavior) {
        throw new ProcessEngineException("Activity '" + activity + "' with start behavior '" + activityStartBehavior + "'"
          + "cannot be executed by non-scope execution.");
      }
  
      PvmActivity activityImpl = activity;
      switch (activityStartBehavior) {
        case CONCURRENT_IN_FLOW_SCOPE:
          this.nextActivity = activityImpl;
          performOperation(PvmAtomicOperation.ACTIVITY_START_CONCURRENT);
          break;
  
        case CANCEL_EVENT_SCOPE:
          this.nextActivity = activityImpl;
          performOperation(PvmAtomicOperation.ACTIVITY_START_CANCEL_SCOPE);
          break;
  
        case INTERRUPT_EVENT_SCOPE:
          this.nextActivity = activityImpl;
          performOperation(PvmAtomicOperation.ACTIVITY_START_INTERRUPT_SCOPE);
          break;
  
        default:
          setActivity(activityImpl);
          setActivityInstanceId(null);
          performOperation(PvmAtomicOperation.ACTIVITY_START_CREATE_SCOPE);
          break;
      }
    }
docs: Execute an activity which is not contained in normal flow (having no incoming sequence flows).
  Cannot be called for activities contained in normal flow.
  <p>
  First, the ActivityStartBehavior is evaluated.
  In case the start behavior is not {@link ActivityStartBehavior#DEFAULT}, the corresponding start
  behavior is executed before executing the activity.
  <p>
  For a given activity, the execution on which this method must be called depends on the type of the start behavior:
  <ul>
  <li>CONCURRENT_IN_FLOW_SCOPE: scope execution for {@link PvmActivity#getFlowScope()}</li>
  <li>INTERRUPT_EVENT_SCOPE: scope execution for {@link PvmActivity#getEventScope()}</li>
  <li>CANCEL_EVENT_SCOPE: scope execution for {@link PvmActivity#getEventScope()}</li>
  </ul>
  
  @param activity the activity to start