---
title: "Flow Logic"
icon: "diagram-project"
---

Nodes execute in different ways depending on how you connect them.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/3984e13db72e2bd19870f5764ec000cf.jpeg)

## Serial execution

When you connect nodes one after another, they execute in sequence. Each node waits for the previous one to finish before starting.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/e8e884e146994b5f95cb16ec31cdd81b.png)

Each node can use variables from any node that ran before it in the chain.

## Parallel execution

When you connect multiple nodes to the same starting node, they all run at the same time.

![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/5ba85864454880561ec95a37db382f20.png)

<Note>
You can have a maximum of 10 parallel branches from one node, and up to 3 levels of nested parallel structures.
</Note>

## Variable access

In serial flows, nodes can access variables from any previous node in the chain. 

In parallel flows, nodes can access variables from nodes that ran before the parallel split, but they cannot access variables from other parallel nodes since they're running simultaneously. 

After parallel branches finish, downstream nodes can access variables from all the parallel outputs.