# Control flow

::references
  :::ref-guide{link="/docs/guides/processing/control-flow" title="Guide"}
  :::

  :::ref-example{link="/examples/processing/hybrid-engine" title="Hybrid"}
  :::

  :::ref-github{link="https://github.com/retejs/engine" title="Plugin"}
  :::
::

This example showcases an executing of schema via control flow using `rete-engine`, where each node dynamically decides which of its outgoing nodes will receive control.

Each node features an `execute` method that takes an input port key as a control source, and a function for conveying control to outgoing nodes through a defined output port. To initiate the execution of the flow, you can use `engine.execute` method, specifying the identifier of the starting node. Consequently, the outgoing nodes will be executed sequentially, starting from the designated node.

::kit
::

::example{#rete-js-v2-control-flow-engine-yqi8z7 module="/src/editor.ts"}
::