docs: public void parseSequenceFlow(Element processElement, ScopeImpl scope, Map<String, Element> compensationHandlers) {
      for (Element sequenceFlowElement : processElement.elements("sequenceFlow")) {
  
        String id = sequenceFlowElement.attribute("id");
        String sourceRef = sequenceFlowElement.attribute("sourceRef");
        String destinationRef = sequenceFlowElement.attribute("targetRef");
  
        // check if destination is a throwing link event (event source) which mean
        // we have
        // to target the catching link event (event target) here:
        if (eventLinkSources.containsKey(destinationRef)) {
          String linkName = eventLinkSources.get(destinationRef);
          destinationRef = eventLinkTargets.get(linkName);
          if (destinationRef == null) {
            addError("sequence flow points to link event source with name '" + linkName
                + "' but no event target with that name exists. Most probably your link events are not configured correctly.", sequenceFlowElement);
            // we cannot do anything useful now
            return;
          }
          // Reminder: Maybe we should log a warning if we use intermediate link
          // events which are not used?
          // e.g. we have a catching event without the corresponding throwing one.
          // not done for the moment as it does not break executability
        }
  
        // Implicit check: sequence flow cannot cross (sub) process boundaries: we
        // don't do a processDefinition.findActivity here
        ActivityImpl sourceActivity = scope.findActivityAtLevelOfSubprocess(sourceRef);
        ActivityImpl destinationActivity = scope.findActivityAtLevelOfSubprocess(destinationRef);
  
        if ((sourceActivity == null && compensationHandlers.containsKey(sourceRef))
            || (sourceActivity != null && sourceActivity.isCompensationHandler())) {
          addError("Invalid outgoing sequence flow of compensation activity '" + sourceRef
              + "'. A compensation activity should not have an incoming or outgoing sequence flow.", sequenceFlowElement);
        } else if ((destinationActivity == null && compensationHandlers.containsKey(destinationRef))
            || (destinationActivity != null && destinationActivity.isCompensationHandler())) {
          addError("Invalid incoming sequence flow of compensation activity '" + destinationRef
              + "'. A compensation activity should not have an incoming or outgoing sequence flow.", sequenceFlowElement);
        } else if (sourceActivity == null) {
          addError("Invalid source '" + sourceRef + "' of sequence flow '" + id + "'", sequenceFlowElement);
        } else if (destinationActivity == null) {
          addError("Invalid destination '" + destinationRef + "' of sequence flow '" + id + "'", sequenceFlowElement);
        } else if (sourceActivity.getActivityBehavior() instanceof EventBasedGatewayActivityBehavior) {
          // ignore
        } else if (destinationActivity.getActivityBehavior() instanceof IntermediateCatchEventActivityBehavior && (destinationActivity.getEventScope() != null)
            && (destinationActivity.getEventScope().getActivityBehavior() instanceof EventBasedGatewayActivityBehavior)) {
          addError("Invalid incoming sequenceflow for intermediateCatchEvent with id '" + destinationActivity.getId() + "' connected to an event-based gateway.",
              sequenceFlowElement);
        } else if (sourceActivity.getActivityBehavior() instanceof SubProcessActivityBehavior
            && sourceActivity.isTriggeredByEvent()) {
          addError("Invalid outgoing sequence flow of event subprocess", sequenceFlowElement);
        } else if (destinationActivity.getActivityBehavior() instanceof SubProcessActivityBehavior
            && destinationActivity.isTriggeredByEvent()) {
          addError("Invalid incoming sequence flow of event subprocess", sequenceFlowElement);
        }
        else {
  
          if(getMultiInstanceScope(sourceActivity) != null) {
            sourceActivity = getMultiInstanceScope(sourceActivity);
          }
          if(getMultiInstanceScope(destinationActivity) != null) {
            destinationActivity = getMultiInstanceScope(destinationActivity);
          }
  
          TransitionImpl transition = sourceActivity.createOutgoingTransition(id);
          sequenceFlows.put(id, transition);
          transition.setProperty("name", sequenceFlowElement.attribute("name"));
          transition.setProperty("documentation", parseDocumentation(sequenceFlowElement));
          transition.setDestination(destinationActivity);
          parseSequenceFlowConditionExpression(sequenceFlowElement, transition);
          parseExecutionListenersOnTransition(sequenceFlowElement, transition);
  
          for (BpmnParseListener parseListener : parseListeners) {
            parseListener.parseSequenceFlow(sequenceFlowElement, scope, transition);
          }
        }
      }
    }