public DeploymentContext build(WorkflowContext workflowContext) {

        if (workflowContext == null) {
            return null;
        }
        DeploymentContext deploymentContext = new DeploymentContext();
        deploymentContext.setAuthConfig(workflowContext.getAuthConfig());
        deploymentContext.setNamespace(workflowContext.getNamespace());
        deploymentContext.setAppName(workflowContext.getAppName());
        deploymentContext.setServiceName(workflowContext.getServiceName());
        
        Object manifestList = workflowContext.getAttribute(WorkflowConstants.GENERATED_MANIFESTS);
        if (manifestList != null) {
            deploymentContext.setManifests((List<Manifest>) manifestList);
        }

        return deploymentContext;
    }
Builder to create {@link DeploymentContext} from {@link WorkflowContext}
workflow-controller/controller-service/src/main/java/io/hyscale/controller/builder/DeploymentContextBuilder.java