code: public static boolean executesDefaultCompensationHandler(PvmExecutionImpl scopeExecution) {
      ActivityImpl currentActivity = scopeExecution.getActivity();
  
      if (currentActivity != null) {
        return scopeExecution.isScope()
            && currentActivity.isScope()
            && !scopeExecution.getNonEventScopeExecutions().isEmpty()
            && !isCompensationThrowing(scopeExecution);
      }
      else {
        return false;
      }
    }
docs: Determines whether an execution is responsible for default compensation handling.
  
  This is the case if
  <ul>
  <li>the execution has an activity
  <li>the execution is a scope
  <li>the activity is a scope
  <li>the execution has children
  <li>the execution does not throw compensation
  </ul>