Search in sources :

Example 21 with WorkflowTemplate

use of org.flyte.api.v1.WorkflowTemplate in project flytekit-java by flyteorg.

the class WorkflowTemplateIdl method ofBuilder.

public static WorkflowTemplate ofBuilder(SdkWorkflowBuilder builder) {
    WorkflowMetadata metadata = WorkflowMetadata.builder().build();
    List<Node> nodes = builder.getNodes().values().stream().map(SdkNode::toIdl).collect(toUnmodifiableList());
    List<Binding> outputs = getOutputBindings(builder);
    return WorkflowTemplate.builder().metadata(metadata).interface_(TypedInterface.builder().inputs(getInputVariableMap(builder)).outputs(getOutputVariableMap(builder)).build()).outputs(outputs).nodes(nodes).build();
}
Also used : Binding(org.flyte.api.v1.Binding) WorkflowMetadata(org.flyte.api.v1.WorkflowMetadata) Node(org.flyte.api.v1.Node)

Aggregations

WorkflowTemplate (org.flyte.api.v1.WorkflowTemplate)18 Test (org.junit.jupiter.api.Test)12 Node (org.flyte.api.v1.Node)9 Literal (org.flyte.api.v1.Literal)7 RunnableTask (org.flyte.api.v1.RunnableTask)7 WorkflowIdentifier (org.flyte.api.v1.WorkflowIdentifier)6 PartialWorkflowIdentifier (org.flyte.api.v1.PartialWorkflowIdentifier)5 TaskNode (org.flyte.api.v1.TaskNode)5 WorkflowNode (org.flyte.api.v1.WorkflowNode)5 BranchNode (org.flyte.api.v1.BranchNode)4 TypedInterface (org.flyte.api.v1.TypedInterface)4 WorkflowMetadata (org.flyte.api.v1.WorkflowMetadata)4 List (java.util.List)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 WorkflowTemplate (com.google.cloud.dataproc.v1.WorkflowTemplate)2 HashMap (java.util.HashMap)2 DynamicWorkflowTask (org.flyte.api.v1.DynamicWorkflowTask)2 RetryableTask (org.flyte.localengine.examples.RetryableTask)2 RetryableWorkflow (org.flyte.localengine.examples.RetryableWorkflow)2 Test (org.junit.Test)2