docs: public static boolean isCompensationThrowing(PvmExecutionImpl execution, Map<ScopeImpl, PvmExecutionImpl> activityExecutionMapping) {
      if (CompensationBehavior.isCompensationThrowing(execution)) {
        ScopeImpl compensationThrowingActivity = execution.getActivity();
  
        if (compensationThrowingActivity.isScope()) {
          return activityExecutionMapping.get(compensationThrowingActivity) ==
              activityExecutionMapping.get(compensationThrowingActivity.getFlowScope());
        }
        else {
          // for transaction sub processes with cancel end events, the compensation throwing execution waits in the boundary event, not in the end
          // event; cancel boundary events are currently not scope
          return compensationThrowingActivity.getActivityBehavior() instanceof CancelBoundaryEventActivityBehavior;
        }
      }
      else {
        return false;
      }
    }