code: public static void setPropsInYamlFile(final String path, final File flowFile, final Props prop) {
      final DumperOptions options = new DumperOptions();
      options.setDefaultFlowStyle(FlowStyle.BLOCK);
      final NodeBean nodeBean = FlowLoaderUtils.setPropsInNodeBean(path, flowFile, prop);
      try (final BufferedWriter writer = Files
          .newBufferedWriter(flowFile.toPath(), StandardCharsets.UTF_8)) {
        new Yaml(options).dump(nodeBean, writer);
      } catch (final IOException e) {
        throw new ProjectManagerException(
            "Failed to set properties in flow file " + flowFile.getName());
      }
    }
docs: Sets props in flow yaml file.
  
  @param path the flow or job path delimited by ":", e.g. "flow:subflow1:subflow2:job3"
  @param flowFile the flow yaml file
  @param prop the props to set