# flytekit.models.core.workflow

## Directory

### Classes

| Class | Description |
|-|-|
| [`Alias`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowalias) |  |
| [`ApproveCondition`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowapprovecondition) |  |
| [`ArrayNode`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowarraynode) |  |
| [`BranchNode`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowbranchnode) |  |
| [`GateNode`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowgatenode) |  |
| [`IfBlock`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowifblock) |  |
| [`IfElseBlock`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowifelseblock) |  |
| [`Node`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflownode) |  |
| [`NodeMetadata`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflownodemetadata) |  |
| [`SignalCondition`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowsignalcondition) |  |
| [`SleepCondition`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowsleepcondition) |  |
| [`TaskNode`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowtasknode) |  |
| [`TaskNodeOverrides`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowtasknodeoverrides) |  |
| [`WorkflowMetadata`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowworkflowmetadata) |  |
| [`WorkflowMetadataDefaults`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowworkflowmetadatadefaults) |  |
| [`WorkflowNode`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowworkflownode) |  |
| [`WorkflowTemplate`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/page.md#flytekitmodelscoreworkflowworkflowtemplate) |  |

## flytekit.models.core.workflow.Alias

### Parameters

```python
class Alias(
    var,
    alias,
)
```
Links a variable to an alias.

| Parameter | Type | Description |
|-|-|-|
| `var` |  | |
| `alias` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `alias` | `None` | A workflow-level unique alias that downstream nodes can refer to in their input. |
| `is_empty` | `None` |  |
| `var` | `None` | Must match one of the output variable names on a node. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** Alias

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.Alias

## flytekit.models.core.workflow.ApproveCondition

### Parameters

```python
class ApproveCondition(
    signal_id: str,
)
```
Represents a dependency on an signal from a user.

| Parameter | Type | Description |
|-|-|-|
| `signal_id` | `str` | The node id of the signal, also the signal name. |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `signal_id` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object: flyteidl.core.workflow_pb2.ApproveCondition,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` | `flyteidl.core.workflow_pb2.ApproveCondition` | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.ArrayNode

### Parameters

```python
class ArrayNode(
    node: Node,
    parallelism,
    min_successes,
    min_success_ratio,
    execution_mode,
    is_original_sub_node_interface,
    data_mode,
    bound_inputs,
    run_all_sub_nodes: bool,
)
```
TODO: docstring

| Parameter | Type | Description |
|-|-|-|
| `node` | `Node` | |
| `parallelism` |  | |
| `min_successes` |  | |
| `min_success_ratio` |  | |
| `execution_mode` |  | |
| `is_original_sub_node_interface` |  | |
| `data_mode` |  | |
| `bound_inputs` |  | |
| `run_all_sub_nodes` | `bool` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `node` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
) -> ArrayNode
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.BranchNode

### Parameters

```python
class BranchNode(
    if_else: flytekit.models.core.workflow.IfElseBlock,
)
```
BranchNode is a special node that alter the flow of the workflow graph. It allows the control flow to branch at
runtime based on a series of conditions that get evaluated on various parameters (e.g. inputs, primitives).

| Parameter | Type | Description |
|-|-|-|
| `if_else` | `flytekit.models.core.workflow.IfElseBlock` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `if_else` | `None` |  |
| `is_empty` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_objct,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_objct` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.BranchNode

## flytekit.models.core.workflow.GateNode

### Parameters

```python
class GateNode(
    signal: typing.Optional[flytekit.models.core.workflow.SignalCondition],
    sleep: typing.Optional[flytekit.models.core.workflow.SleepCondition],
    approve: typing.Optional[flytekit.models.core.workflow.ApproveCondition],
)
```
| Parameter | Type | Description |
|-|-|-|
| `signal` | `typing.Optional[flytekit.models.core.workflow.SignalCondition]` | |
| `sleep` | `typing.Optional[flytekit.models.core.workflow.SleepCondition]` | |
| `approve` | `typing.Optional[flytekit.models.core.workflow.ApproveCondition]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `approve` | `None` |  |
| `condition` | `None` |  |
| `is_empty` | `None` |  |
| `signal` | `None` |  |
| `sleep` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object: flyteidl.core.workflow_pb2.GateNode,
) -> GateNode
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` | `flyteidl.core.workflow_pb2.GateNode` | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.IfBlock

### Parameters

```python
class IfBlock(
    condition,
    then_node,
)
```
Defines a condition and the execution unit that should be executed if the condition is satisfied.

| Parameter | Type | Description |
|-|-|-|
| `condition` |  | |
| `then_node` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `condition` | `None` |  |
| `is_empty` | `None` |  |
| `then_node` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.IfBlock

## flytekit.models.core.workflow.IfElseBlock

### Parameters

```python
class IfElseBlock(
    case,
    other,
    else_node,
    error,
)
```
Defines a series of if/else blocks. The first branch whose condition evaluates to true is the one to execute.
If no conditions were satisfied, the else_node or the error will execute.

| Parameter | Type | Description |
|-|-|-|
| `case` |  | |
| `other` |  | |
| `else_node` |  | |
| `error` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `case` | `None` | First condition to evaluate. |
| `else_node` | `None` | The node to execute in case none of the branches were taken. |
| `error` | `None` | An error to throw in case none of the branches were taken. |
| `is_empty` | `None` |  |
| `other` | `None` | Additional branches to evaluate. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.IfElseBlock

## flytekit.models.core.workflow.Node

### Parameters

```python
class Node(
    id,
    metadata,
    inputs,
    upstream_node_ids,
    output_aliases,
    task_node,
    workflow_node,
    branch_node,
    gate_node: typing.Optional[flytekit.models.core.workflow.GateNode],
    array_node: typing.Optional[flytekit.models.core.workflow.ArrayNode],
)
```
A Workflow graph Node. One unit of execution in the graph. Each node can be linked to a Task,
a Workflow or a branch node.  One of the nodes must be specified.

| Parameter | Type | Description |
|-|-|-|
| `id` |  | |
| `metadata` |  | |
| `inputs` |  | |
| `upstream_node_ids` |  | |
| `output_aliases` |  | |
| `task_node` |  | |
| `workflow_node` |  | |
| `branch_node` |  | |
| `gate_node` | `typing.Optional[flytekit.models.core.workflow.GateNode]` | |
| `array_node` | `typing.Optional[flytekit.models.core.workflow.ArrayNode]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `array_node` | `None` |  |
| `branch_node` | `None` | [Optional] Information about the branch node to evaluate in this node. |
| `gate_node` | `None` |  |
| `id` | `None` | A workflow-level unique identifier that identifies this node in the workflow. "inputs" and "outputs" are reserved node ids that cannot be used by other nodes. |
| `inputs` | `None` | Specifies how to bind the underlying interface's inputs.  All required inputs specified in the underlying interface must be fulfilled. |
| `is_empty` | `None` |  |
| `metadata` | `None` | Extra metadata about the node. |
| `output_aliases` | `None` | [Optional] A node can define aliases for a subset of its outputs. This is particularly useful if different nodes need to conform to the same interface (e.g. all branches in a branch node). Downstream nodes must refer to this node's outputs using the alias if one is specified. |
| `target` | `None` |  |
| `task_node` | `None` | [Optional] Information about the Task to execute in this node. |
| `upstream_node_ids` | `None` | [Optional] Specifies execution dependency for this node ensuring it will only get scheduled to run after all its upstream nodes have completed. This node will have an implicit dependency on any node that appears in inputs field. |
| `workflow_node` | `None` | [Optional] Information about the Workflow to execute in this mode. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** Node

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.Node

## flytekit.models.core.workflow.NodeMetadata

### Parameters

```python
class NodeMetadata(
    name,
    timeout,
    retries,
    interruptible: typing.Optional[bool],
    cacheable: typing.Optional[bool],
    cache_version: typing.Optional[str],
    cache_serializable: typing.Optional[bool],
)
```
Defines extra information about the Node.

| Parameter | Type | Description |
|-|-|-|
| `name` |  | |
| `timeout` |  | |
| `retries` |  | |
| `interruptible` | `typing.Optional[bool]` | |
| `cacheable` | `typing.Optional[bool]` | Indicates that cache operations on this node should be serialized. |
| `cache_version` | `typing.Optional[str]` | The version of the cached data. |
| `cache_serializable` | `typing.Optional[bool]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `cache_serializable` | `None` |  |
| `cache_version` | `None` |  |
| `cacheable` | `None` |  |
| `interruptible` | `None` |  |
| `is_empty` | `None` |  |
| `name` | `None` |  |
| `retries` | `None` |  |
| `timeout` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.NodeMetadata

## flytekit.models.core.workflow.SignalCondition

### Parameters

```python
class SignalCondition(
    signal_id: str,
    type: flytekit.models.types.LiteralType,
    output_variable_name: str,
)
```
Represents a dependency on an signal from a user.

| Parameter | Type | Description |
|-|-|-|
| `signal_id` | `str` | The node id of the signal, also the signal name. |
| `type` | `flytekit.models.types.LiteralType` | |
| `output_variable_name` | `str` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `output_variable_name` | `None` |  |
| `signal_id` | `None` |  |
| `type` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object: flyteidl.core.workflow_pb2.SignalCondition,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` | `flyteidl.core.workflow_pb2.SignalCondition` | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.SleepCondition

### Parameters

```python
class SleepCondition(
    duration: datetime.timedelta,
)
```
A sleep condition.

| Parameter | Type | Description |
|-|-|-|
| `duration` | `datetime.timedelta` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `duration` | `None` |  |
| `is_empty` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object: flyteidl.core.workflow_pb2.SignalCondition,
) -> SleepCondition
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` | `flyteidl.core.workflow_pb2.SignalCondition` | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.TaskNode

### Parameters

```python
class TaskNode(
    reference_id,
    overrides: typing.Optional[flytekit.models.core.workflow.TaskNodeOverrides],
)
```
Refers to the task that the Node is to execute.
This is currently a oneof in protobuf, but there's only one option currently.
This code should be updated when more options are available.

| Parameter | Type | Description |
|-|-|-|
| `reference_id` |  | |
| `overrides` | `typing.Optional[flytekit.models.core.workflow.TaskNodeOverrides]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `overrides` | `None` |  |
| `reference_id` | `None` | A globally unique identifier for the task. This should map to the identifier in Flyte Admin. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** TaskNode

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.TaskNode

## flytekit.models.core.workflow.TaskNodeOverrides

### Parameters

```python
class TaskNodeOverrides(
    resources: typing.Optional[flytekit.models.task.Resources],
    extended_resources: typing.Optional[flyteidl.core.tasks_pb2.ExtendedResources],
    container_image: typing.Optional[str],
    pod_template: typing.Optional[flytekit.core.pod_template.PodTemplate],
)
```
| Parameter | Type | Description |
|-|-|-|
| `resources` | `typing.Optional[flytekit.models.task.Resources]` | |
| `extended_resources` | `typing.Optional[flyteidl.core.tasks_pb2.ExtendedResources]` | |
| `container_image` | `typing.Optional[str]` | |
| `pod_template` | `typing.Optional[flytekit.core.pod_template.PodTemplate]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `container_image` | `None` |  |
| `extended_resources` | `None` |  |
| `is_empty` | `None` |  |
| `pod_template` | `None` |  |
| `resources` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
## flytekit.models.core.workflow.WorkflowMetadata

### Parameters

```python
class WorkflowMetadata(
    on_failure,
)
```
Metadata for the workflow.

| Parameter | Type | Description |
|-|-|-|
| `on_failure` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `on_failure` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** WorkflowMetadata

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.WorkflowMetadata

## flytekit.models.core.workflow.WorkflowMetadataDefaults

### Parameters

```python
class WorkflowMetadataDefaults(
    interruptible,
)
```
Metadata Defaults for the workflow.

| Parameter | Type | Description |
|-|-|-|
| `interruptible` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `interruptible` | `None` |  |
| `is_empty` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** WorkflowMetadata

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.WorkflowMetadataDefaults

## flytekit.models.core.workflow.WorkflowNode

### Parameters

```python
class WorkflowNode(
    launchplan_ref,
    sub_workflow_ref,
)
```
Refers to a the workflow the node is to execute. One of the references must be supplied.

| Parameter | Type | Description |
|-|-|-|
| `launchplan_ref` |  | |
| `sub_workflow_ref` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `is_empty` | `None` |  |
| `launchplan_ref` | `None` | [Optional] A globally unique identifier for the launch plan.  Should map to Admin. |
| `reference` | `None` |  |
| `sub_workflow_ref` | `None` | [Optional] Reference to a subworkflow, that should be defined with the compiler context. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** WorkflowNode

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.WorkflowNode

## flytekit.models.core.workflow.WorkflowTemplate

### Parameters

```python
class WorkflowTemplate(
    id,
    metadata,
    metadata_defaults,
    interface,
    nodes,
    outputs,
    failure_node,
)
```
A workflow template encapsulates all the task, branch, and subworkflow nodes to run a statically analyzable,
directed acyclic graph. It contains also metadata that tells the system how to execute the workflow (i.e.
the AWS IAM role to run with).

| Parameter | Type | Description |
|-|-|-|
| `id` |  | |
| `metadata` |  | |
| `metadata_defaults` |  | |
| `interface` |  | |
| `nodes` |  | |
| `outputs` |  | |
| `failure_node` |  | |

### Properties

| Property | Type | Description |
|-|-|-|
| `failure_node` | `None` | Node failure_node: A catch-all node. This node is executed whenever the execution engine determines the workflow has failed. The interface of this node must match the Workflow interface with an additional input named "error" of type pb.lyft.flyte.core.Error. |
| `id` | `None` | This is an autogenerated id by the system. The id is globally unique across Flyte. |
| `interface` | `None` | Defines a strongly typed interface for the Workflow (inputs, outputs). This can include some optional parameters. |
| `is_empty` | `None` |  |
| `metadata` | `None` | This contains information on how to run the workflow. |
| `metadata_defaults` | `None` | This contains information on how to run the workflow. |
| `nodes` | `None` | A list of nodes. In addition, "globals" is a special reserved node id that can be used to consume workflow inputs. |
| `outputs` | `None` | A list of output bindings that specify how to construct workflow outputs. Bindings can pull node outputs or specify literals. All workflow outputs specified in the interface field must be bound in order for the workflow to be validated. A workflow has an implicit dependency on all of its nodes to execute successfully in order to bind final outputs. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object,
)
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` |  | |

**Returns:** WorkflowTemplate

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.core.workflow_pb2.WorkflowTemplate

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow.md
**HTML**: https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.core.workflow/
