@Override
  public boolean isResolvable(Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor)
      throws SpecNotFoundException, JobTemplate.TemplateException {
    Config inputDescriptorConfig = inputDescriptor.getRawConfig().atPath(DatasetDescriptorConfigKeys.FLOW_EDGE_INPUT_DATASET_DESCRIPTOR_PREFIX);
    Config outputDescriptorConfig = outputDescriptor.getRawConfig().atPath(DatasetDescriptorConfigKeys.FLOW_EDGE_OUTPUT_DATASET_DESCRIPTOR_PREFIX);
    userConfig = userConfig.withFallback(inputDescriptorConfig).withFallback(outputDescriptorConfig);

    ConfigResolveOptions resolveOptions = ConfigResolveOptions.defaults().setAllowUnresolved(true);

    for (JobTemplate template: this.jobTemplates) {
      Config templateConfig = template.getResolvedConfig(userConfig).resolve(resolveOptions);
      if (!template.getResolvedConfig(userConfig).resolve(resolveOptions).isResolved()) {
        return false;
      }
    }
    return true;
  }
@ Override public boolean isResolvable ( Config userConfig , DatasetDescriptor inputDescriptor , DatasetDescriptor outputDescriptor ) throws SpecNotFoundException , JobTemplate . TemplateException { Config inputDescriptorConfig = inputDescriptor . getRawConfig ( ) . atPath ( DatasetDescriptorConfigKeys . FLOW_EDGE_INPUT_DATASET_DESCRIPTOR_PREFIX ) ; Config outputDescriptorConfig = outputDescriptor . getRawConfig ( ) . atPath ( DatasetDescriptorConfigKeys . FLOW_EDGE_OUTPUT_DATASET_DESCRIPTOR_PREFIX ) ; userConfig = userConfig . withFallback ( inputDescriptorConfig ) . withFallback ( outputDescriptorConfig ) ; ConfigResolveOptions resolveOptions = ConfigResolveOptions . defaults ( ) . setAllowUnresolved ( true ) ; for ( JobTemplate template : this . jobTemplates ) { Config templateConfig = template . getResolvedConfig ( userConfig ) . resolve ( resolveOptions ) ; if ( ! template . getResolvedConfig ( userConfig ) . resolve ( resolveOptions ) . isResolved ( ) ) { return false ; } } return true ; }
Checks if the {@link FlowTemplate} is resolvable using the provided {@link Config} object. A {@link FlowTemplate}
is resolvable only if each of the {@link JobTemplate}s in the flow is resolvable
@param userConfig User supplied Config
@return true if the {@link FlowTemplate} is resolvable