public ConductorWorkflow<T> build() throws ValidationError {

        validate();

        ConductorWorkflow<T> workflow = new ConductorWorkflow<T>(workflowExecutor);
        if (description != null) {
            workflow.setDescription(description);
        }

        workflow.setName(name);
        workflow.setVersion(version);
        workflow.setDescription(description);
        workflow.setFailureWorkflow(failureWorkflow);
        workflow.setOwnerEmail(ownerEmail);
        workflow.setTimeoutPolicy(timeoutPolicy);
        workflow.setTimeoutSeconds(timeoutSeconds);
        workflow.setRestartable(restartable);
        workflow.setDefaultInput(defaultInput);
        workflow.setWorkflowOutput(output);
        workflow.setVariables(state);

        for (Task task : tasks) {
            workflow.add(task);
        }

        return workflow;
    }
@param <T> Input type for the workflow
java-sdk/src/main/java/com/netflix/conductor/sdk/workflow/def/WorkflowBuilder.java