# Flow Control

This folder contains examples of how to use dynamic flow control with different patterns.

1. [Sequential](./sequential)
  - [sequential_execution.cpp](./sequential/cpp/sequential_execution.cpp)
  - [sequential_execution.py](./sequential/python/sequential_execution.py)
2. [Conditional](./conditional)
  - [conditional_execution.cpp](./conditional/cpp/conditional_execution.cpp)
  - [conditional_execution.py](./conditional/python/conditional_execution.py)
3. [Conditional Routing](./conditional_routing)
  - [conditional_routing_execution.cpp](./conditional_routing/cpp/conditional_routing_execution.cpp)
  - [conditional_routing_execution.py](./conditional_routing/python/conditional_routing_execution.py)
4. [Fork-Join](./fork_join)
  - [fork_join_execution.cpp](./fork_join/cpp/fork_join_execution.cpp)
  - [fork_join_execution.py](./fork_join/python/fork_join_execution.py)
5. [For Loop](./for_loop)
  - [for_loop_execution.cpp](./for_loop/cpp/for_loop_execution.cpp)
  - [for_loop_execution.py](./for_loop/python/for_loop_execution.py)
6. [Mixed Flows](./mixed_flows)
  - [mixed_flows_execution.cpp](./mixed_flows/cpp/mixed_flows_execution.cpp)
  - [mixed_flows_execution.py](./mixed_flows/python/mixed_flows_execution.py)
7. [Streaming](./streaming)
  - [streaming_execution.cpp](./streaming/cpp/streaming_execution.cpp)
  - [streaming_execution.py](./streaming/python/streaming_execution.py)
8. [Streaming with Monitor](./streaming_with_monitor)
  - [streaming_with_monitor.cpp](./streaming_with_monitor/cpp/streaming_with_monitor.cpp)
  - [streaming_with_monitor.py](./streaming_with_monitor/python/streaming_with_monitor.py)
9. [State-based Monitoring](./state_based_monitoring)
  - [state_based_monitoring.cpp](./state_based_monitoring/cpp/state_based_monitoring.cpp)
  - [state_based_monitoring.py](./state_based_monitoring/python/state_based_monitoring.py)

There is also a variant of the sequential example demonstrating that flow control can also be used
with subgraph interface ports in applications making use of subgraphs.

10. [Sequential With Subgraph](./sequential_with_subgraph)
  - [sequential_with_subgraph.cpp](./sequential_with_subgraph/cpp/sequential_with_subgraph.cpp)
  - [sequential_with_subgraph.py](./sequential_with_subgraph/python/sequential_with_subgraph.py)
