public WorkflowDef lookupForWorkflowDefinition(String name, Integer version) {
        Optional<WorkflowDef> potentialDef =
                version == null
                        ? lookupLatestWorkflowDefinition(name)
                        : lookupWorkflowDefinition(name, version);

        // Check if the workflow definition is valid
        return potentialDef.orElseThrow(
                () -> {
                    LOGGER.error(
                            "There is no workflow defined with name {} and version {}",
                            name,
                            version);
                    return new NotFoundException(
                            "No such workflow defined. name=%s, version=%s", name, version);
                });
    }
Populates metadata definitions within workflow objects. Benefits of loading and populating
metadata definitions upfront could be:

<ul>
  <li>Immutable definitions within a workflow execution with the added benefit of guaranteeing
      consistency at runtime.
  <li>Stress is reduced on the storage layer
</ul>
core/src/main/java/com/netflix/conductor/core/metadata/MetadataMapperService.java