public static Props getPropsFromYamlFile(final String path, final File flowFile) {
    final List<Props> propsList = new ArrayList<>();
    final NodeBeanLoader loader = new NodeBeanLoader();

    try {
      final NodeBean nodeBean = loader.load(flowFile);
      final String[] pathList = path.split(Constants.PATH_DELIMITER);
      if (findPropsFromNodeBean(nodeBean, pathList, 0, propsList)) {
        if (!propsList.isEmpty()) {
          return propsList.get(0);
        } else {
          logger.error("Error getting props for " + path);
        }
      }
    } catch (final Exception e) {
      logger.error("Failed to get props, error loading flow YAML file. ", e);
    }
    return null;
  }
public static Props getPropsFromYamlFile ( final String path , final File flowFile ) { final List < Props > propsList = new ArrayList < > ( ) ; final NodeBeanLoader loader = new NodeBeanLoader ( ) ; try { final NodeBean nodeBean = loader . load ( flowFile ) ; final String [ ] pathList = path . split ( Constants . PATH_DELIMITER ) ; if ( findPropsFromNodeBean ( nodeBean , pathList , 0 , propsList ) ) { if ( ! propsList . isEmpty ( ) ) { return propsList . get ( 0 ) ; } else { logger . error ( "Error getting props for " + path ) ; } } } catch ( final Exception e ) { logger . error ( "Failed to get props, error loading flow YAML file. " , e ) ; } return null ; }
Gets flow or job props from flow yaml file.

@param path the flow or job path delimited by ":", e.g. "flow:subflow1:subflow2:job3"
@param flowFile the flow yaml file
@return the props from yaml file