Skip to content

Architecture

Nuido flows are made of nodes, where each node represents a process. Nodes can have:

  • Inputs
  • Outputs
  • Parameters

There are special node types which are needed to run a flow:

  • StartNode: Required. Entry point of the flow.
  • TriggerNode: Optional. Automatically initiates the flow.
  • StarterNode: Optional. Starter nodes is ran when the flow is processed, not when the flow is ran. This is useful for performing preparation for the flow or initializing resources.

Shared Architecture with Nuido AI

Nuido Flow shares its foundational architecture with Nuido AI, another experimental project built on the Nuido library. Both systems utilize:

  • The same registration mechanism.
  • Common UI components, including layout systems, sidebar menus, dialog components, and more.

These shared elements are implemented within the nuido_base addon, providing modularity and consistency across projects.

Flow Execution

Each flow must begin with a single StartNode. Execution proceeds sequentially from one node to the next via their defined connections. Data is passed between nodes in dictionary (dict) format and processed using the process() method of each node. This method encapsulates the logic specific to that node's task.

BaseNode Class

Every node instance is derived from BaseNode class. BaseNode class implements two methods:

  • process(data: dict): Core logic to process incoming data
  • get_next_node_info(): Determines the next node in the sequence

In typical scenarios, only process() needs to be overridden, as the default get_next_node_info() selects the first connected node. However, for custom routing logic, you can override get_next_node_info().

Extensibility

Nuido Flow enforces only the essential architecture and inherits behavior from the underlying Nuido and Odoo platforms. This flexible foundation allows extensive customization.

For example, the nuido_flow_data addon introduces custom node and port types, demonstrating how easily the system can be extended to support new behaviors and data flows.