docs: public ActivityImpl parseSubProcess(Element subProcessElement, ScopeImpl scope) {
      ActivityImpl subProcessActivity = createActivityOnScope(subProcessElement, scope);
      subProcessActivity.setSubProcessScope(true);
  
      parseAsynchronousContinuationForActivity(subProcessElement, subProcessActivity);
  
      Boolean isTriggeredByEvent = parseBooleanAttribute(subProcessElement.attribute("triggeredByEvent"), false);
      subProcessActivity.getProperties().set(BpmnProperties.TRIGGERED_BY_EVENT, isTriggeredByEvent);
      subProcessActivity.setProperty(PROPERTYNAME_CONSUMES_COMPENSATION, !isTriggeredByEvent);
  
      subProcessActivity.setScope(true);
      if (isTriggeredByEvent) {
        subProcessActivity.setActivityBehavior(new EventSubProcessActivityBehavior());
        subProcessActivity.setEventScope(scope);
      } else {
        subProcessActivity.setActivityBehavior(new SubProcessActivityBehavior());
      }
      parseScope(subProcessElement, subProcessActivity);
  
      for (BpmnParseListener parseListener : parseListeners) {
        parseListener.parseSubProcess(subProcessElement, scope, subProcessActivity);
      }
      return subProcessActivity;
    }