# project-flogo/flow architecture

> Architecture diagram of the GitHub repository project-flogo/flow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/project-flogo/flow
- Repository: https://github.com/project-flogo/flow

## Overview

Flogo Flow is a process-flow engine: a flow definition describes linked tasks and activities, and a runtime action loads the definition, executes an instance, and returns its result. The graph also includes the documented subflow capability and REST flow tester. Source excerpts establish the main action, definition-loading, task-evaluation, and transactional-subflow links; some runtime and tester details are unsampled, so their connections are omitted where not evidenced.

Main entry points: [`instance/ind_instance.go`](https://github.com/project-flogo/flow/blob/master/instance/ind_instance.go) (Flow instance), [`action.go`](https://github.com/project-flogo/flow/blob/master/action.go) (Flow action), [`support/manager.go`](https://github.com/project-flogo/flow/blob/master/support/manager.go) (Flow manager), [`model/simple/taskbehavior.go`](https://github.com/project-flogo/flow/blob/master/model/simple/taskbehavior.go) (Task behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_action["Flow action<br/>[action.go]"]
  node_tester["REST tester<br/>[service.go]"]
  node_request["Tester requests<br/>[request.go]"]
end

subgraph group_definition["Flow definition"]
  node_flow_manager["Flow manager<br/>[manager.go]"]
  node_flow_provider["Flow provider<br/>[provider.go]"]
  node_flow_definition["Definition model<br/>[definition.go]"]
  node_definition_parser["Definition parser<br/>[definition_ser.go]"]
end

subgraph group_runtime["Execution runtime"]
  node_flow_model["Behavior model<br/>[model.go]"]
  node_flow_instance["Flow instance<br/>[ind_instance.go]"]
  node_task_behavior["Task behavior<br/>[taskbehavior.go]"]
  node_task_instance["Task instances<br/>[taskinst.go]"]
  node_state_recording["State recording<br/>[recorder.go]"]
end

subgraph group_extensions["Activities and tools"]
  node_subflow_activity["Subflow activity<br/>[activity.go]"]
  node_subflow_tx["Transactional subflow<br/>[tx.go]"]
end

node_caller(("Flow caller"))
node_external_flow(("Remote flow source"))
node_activities{{"Flogo activities"}}

node_caller -->|"invokes"| node_action
node_action -->|"loads flow"| node_flow_manager
node_flow_manager -->|"requests definition"| node_flow_provider
node_flow_provider -->|"fetches flow"| node_external_flow
node_flow_manager -->|"materializes"| node_definition_parser
node_definition_parser -->|"constructs"| node_flow_definition
node_action -->|"starts instance"| node_flow_instance
node_flow_instance -->|"selects behavior"| node_flow_model
node_flow_instance -->|"evaluates tasks"| node_task_behavior
node_task_behavior -->|"evaluates task"| node_task_instance
node_tester -->|"decodes requests"| node_request
node_tester -->|"starts or resumes"| node_flow_instance
node_task_behavior -.->|"evaluates activity"| node_activities
node_subflow_tx -->|"starts subflow"| node_flow_instance
node_subflow_activity -.->|"delegates transaction"| node_subflow_tx

click node_action "https://github.com/project-flogo/flow/blob/master/action.go"
click node_tester "https://github.com/project-flogo/flow/blob/master/tester/service.go"
click node_request "https://github.com/project-flogo/flow/blob/master/tester/request.go"
click node_flow_manager "https://github.com/project-flogo/flow/blob/master/support/manager.go"
click node_flow_provider "https://github.com/project-flogo/flow/blob/master/definition/provider.go"
click node_flow_definition "https://github.com/project-flogo/flow/blob/master/definition/definition.go"
click node_definition_parser "https://github.com/project-flogo/flow/blob/master/definition/definition_ser.go"
click node_flow_model "https://github.com/project-flogo/flow/blob/master/model/model.go"
click node_flow_instance "https://github.com/project-flogo/flow/blob/master/instance/ind_instance.go"
click node_task_behavior "https://github.com/project-flogo/flow/blob/master/model/simple/taskbehavior.go"
click node_task_instance "https://github.com/project-flogo/flow/blob/master/instance/taskinst.go"
click node_state_recording "https://github.com/project-flogo/flow/blob/master/state/recorder.go"
click node_subflow_activity "https://github.com/project-flogo/flow/blob/master/activity/subflow/activity.go"
click node_subflow_tx "https://github.com/project-flogo/flow/blob/master/activity/subflow/tx.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_action,node_tester,node_request toneBlue
class node_flow_manager,node_flow_provider,node_flow_definition,node_definition_parser toneAmber
class node_flow_model,node_flow_instance,node_task_behavior,node_task_instance,node_state_recording toneMint
class node_subflow_activity,node_subflow_tx toneRose
class node_caller,node_external_flow,node_activities toneIndigo
```

## Components

### Entry points

- [Flow action](https://github.com/project-flogo/flow/blob/master/action.go): `action.go`
- [REST tester](https://github.com/project-flogo/flow/blob/master/tester/service.go): `tester/service.go`
- [Tester requests](https://github.com/project-flogo/flow/blob/master/tester/request.go): `tester/request.go`

### Flow definition

- [Flow manager](https://github.com/project-flogo/flow/blob/master/support/manager.go): `support/manager.go`
- [Flow provider](https://github.com/project-flogo/flow/blob/master/definition/provider.go): `definition/provider.go`
- [Definition model](https://github.com/project-flogo/flow/blob/master/definition/definition.go): `definition/definition.go`
- [Definition parser](https://github.com/project-flogo/flow/blob/master/definition/definition_ser.go): `definition/definition_ser.go`

### Execution runtime

- [Behavior model](https://github.com/project-flogo/flow/blob/master/model/model.go): `model/model.go`
- [Flow instance](https://github.com/project-flogo/flow/blob/master/instance/ind_instance.go): `instance/ind_instance.go`
- [Task behavior](https://github.com/project-flogo/flow/blob/master/model/simple/taskbehavior.go): `model/simple/taskbehavior.go`
- [Task instances](https://github.com/project-flogo/flow/blob/master/instance/taskinst.go): `instance/taskinst.go`
- [State recording](https://github.com/project-flogo/flow/blob/master/state/recorder.go): `state/recorder.go`

### Activities and tools

- [Subflow activity](https://github.com/project-flogo/flow/blob/master/activity/subflow/activity.go): `activity/subflow/activity.go`
- [Transactional subflow](https://github.com/project-flogo/flow/blob/master/activity/subflow/tx.go): `activity/subflow/tx.go`

### Other components

- **Flow caller**
- **Remote flow source**
- **Flogo activities**

## Connections

- Flow caller → Flow action: invokes
- Flow action → Flow manager: loads flow (evidence: `action.go`)
- Flow manager → Flow provider: requests definition (evidence: `support/manager.go`)
- Flow provider → Remote flow source: fetches flow
- Flow manager → Definition parser: materializes (evidence: `support/manager.go`)
- Definition parser → Definition model: constructs (evidence: `definition/definition_ser.go`)
- Flow action → Flow instance: starts instance (evidence: `action.go`)
- Flow instance → Behavior model: selects behavior (evidence: `instance/ind_instance.go`)
- Flow instance → Task behavior: evaluates tasks (evidence: `instance/ind_instance.go`)
- Task behavior → Task instances: evaluates task (evidence: `model/simple/taskbehavior.go`)
- REST tester → Tester requests: decodes requests (evidence: `tester/service.go`)
- REST tester → Flow instance: starts or resumes (evidence: `tester/service.go`)
- Task behavior → Flogo activities: evaluates activity
- Transactional subflow → Flow instance: starts subflow (evidence: `activity/subflow/tx.go`)
- Subflow activity → Transactional subflow: delegates transaction
