docs: private Reader portToCurrentVersion(final Reader reader) throws Exception {
          //Migrate v4 ruleflows to v5
          String xml = RuleFlowMigrator.convertReaderToString( reader );
  
          if ( RuleFlowMigrator.needToMigrateRFM(xml) ) {
              // Not a current version RFM convert it.
              xml = RuleFlowMigrator.portRFMToCurrentVersion(xml);
          }
          else if ( RuleFlowMigrator.needToMigrateRF(xml) ) {
              // Not a current version RF convert it.
              xml = RuleFlowMigrator.portRFMToCurrentVersion(xml);}
          //
          // Note that we have also return any input v5 ruleflow as
          // a StringReader since the act of checking it using
          // convertReaderToString will have read the reader making it
          // appear empty if read later. As reset is not guaranteed on
          // all Reader implementation, it is safest to convert the v5
          // ruleflow string representation to a StringReader as well.
          //
          return new StringReader( xml );
      }