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 .