docs: protected static ActivityImpl getEventScopeCompensationHandler(ExecutionEntity execution) {
      ActivityImpl activity = execution.getActivity();
  
      ActivityImpl compensationHandler = activity.findCompensationHandler();
      if (compensationHandler != null && compensationHandler.isSubProcessScope()) {
        // subprocess with inner compensation event subprocess
        return compensationHandler;
      } else {
        // subprocess without compensation handler or
        // multi instance activity
        return activity;
      }
    }