# manageiq/manageiq-automation_engine architecture

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

- Interactive diagram: https://gitdiagram.com/manageiq/manageiq-automation_engine
- Repository: https://github.com/manageiq/manageiq-automation_engine

## Overview

ManageIQ Automation Engine executes URI-addressed automation in isolated workspaces, using the persistent Automation Datastore or transient workspace objects. The graph also preserves repository capabilities for method execution, service-model access, syntax checking, and datastore import/export. The README documents the URI and storage model; source-index references support the shown service-layer dependencies. Several runtime links are dashed because the relevant implementation excerpts were not provided.

Main entry points: [`app/models/miq_ae_datastore.rb`](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore.rb) (Automation datastore), [`lib/miq_automation_engine/engine/miq_ae_engine.rb`](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine.rb) (Automation engine), [`lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb`](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb) (Method service), [`lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb`](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb) (Service model access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Automation execution"]
  node_engine["Automation engine<br/>[miq_ae_engine.rb]"]
  node_workspace["Isolated workspace"]
  node_method["Method execution<br/>[miq_ae_method.rb]"]
  node_syntax["Syntax checking<br/>[syntax_checker.rb]"]
end

subgraph group_resolution["Objects and state"]
  node_uri["URI handling<br/>[miq_ae_uri.rb]"]
  node_lookup["Object lookup"]
  node_path["AE path parsing<br/>[miq_ae_path.rb]"]
  node_state["State machine"]
end

subgraph group_services["Method services"]
  node_method_service["Method service<br/>[miq_ae_service.rb]"]
  node_service_base["Service model access"]
  node_service_common["Object helpers"]
  node_service_rbac["RBAC filtering"]
  node_service_legacy["Legacy model access"]
  node_service_vmdb["VMDB access"]
  node_provider_services["Provider service models"]
end

subgraph group_authoring["Datastore management"]
  node_datastore[("Automation datastore")]
  node_yaml_import["YAML import"]
  node_yaml_export["YAML export"]
  node_git_import["Git import"]
  node_xml_import["XML import<br/>[xml_import.rb]"]
  node_xml_export["XML export<br/>[xml_export.rb]"]
end

node_caller(("Invocation caller"))

node_caller -.->|"invokes"| node_engine
node_engine -.->|"runs in"| node_workspace
node_engine -->|"accepts URI"| node_uri
node_uri -->|"resolves miqaedb"| node_datastore
node_uri -->|"resolves miqaews"| node_workspace
node_workspace -.->|"looks up objects"| node_lookup
node_lookup -.->|"uses paths"| node_path
node_engine -.->|"runs state machine"| node_state
node_engine -.->|"dispatches methods"| node_method
node_method -.->|"uses services"| node_method_service
node_method_service -->|"includes"| node_service_legacy
node_method_service -->|"includes"| node_service_vmdb
node_method_service -->|"includes"| node_service_rbac
node_service_base -->|"includes"| node_service_common
node_service_base -->|"includes"| node_service_rbac
node_service_base -.->|"backs models"| node_provider_services
node_yaml_import -.->|"imports into"| node_datastore
node_yaml_export -.->|"exports from"| node_datastore
node_git_import -.->|"imports into"| node_datastore
node_xml_import -.->|"imports into"| node_datastore
node_xml_export -.->|"exports from"| node_datastore

click node_engine "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine.rb"
click node_workspace "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb"
click node_uri "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_uri.rb"
click node_lookup "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object_lookup.rb"
click node_path "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_path.rb"
click node_state "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_state_machine.rb"
click node_method "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_method.rb"
click node_method_service "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb"
click node_service_base "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb"
click node_service_common "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_object_common.rb"
click node_service_rbac "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_rbac.rb"
click node_service_legacy "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_legacy.rb"
click node_service_vmdb "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_vmdb.rb"
click node_provider_services "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-openstack-storage_manager-cinder_manager-cloud_volume.rb"
click node_syntax "https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/manageiq/automation_engine/syntax_checker.rb"
click node_datastore "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore.rb"
click node_yaml_import "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_yaml_import.rb"
click node_yaml_export "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_yaml_export.rb"
click node_git_import "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_git_import.rb"
click node_xml_import "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore/xml_import.rb"
click node_xml_export "https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore/xml_export.rb"

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_engine,node_workspace,node_method,node_syntax toneBlue
class node_uri,node_lookup,node_path,node_state toneAmber
class node_method_service,node_service_base,node_service_common,node_service_rbac,node_service_legacy,node_service_vmdb,node_provider_services toneMint
class node_datastore,node_yaml_import,node_yaml_export,node_git_import,node_xml_import,node_xml_export toneRose
class node_caller toneIndigo
```

## Components

### Automation execution

- [Automation engine](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine.rb): `lib/miq_automation_engine/engine/miq_ae_engine.rb`
- [Isolated workspace](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb`
- [Method execution](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_method.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_method.rb`
- [Syntax checking](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/manageiq/automation_engine/syntax_checker.rb): `lib/manageiq/automation_engine/syntax_checker.rb`

### Objects and state

- [URI handling](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_uri.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_uri.rb`
- [Object lookup](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object_lookup.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object_lookup.rb`
- [AE path parsing](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_path.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_path.rb`
- [State machine](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_state_machine.rb): `lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_state_machine.rb`

### Method services

- [Method service](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb`
- [Service model access](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb`
- [Object helpers](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_object_common.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_object_common.rb`
- [RBAC filtering](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_rbac.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_rbac.rb`
- [Legacy model access](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_legacy.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_legacy.rb`
- [VMDB access](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_vmdb.rb): `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_vmdb.rb`
- [Provider service models](https://github.com/manageiq/manageiq-automation_engine/blob/master/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-openstack-storage_manager-cinder_manager-cloud_volume.rb): `lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-openstack-storage_manager-cinder_manager-cloud_volume.rb`

### Datastore management

- [Automation datastore](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore.rb): `app/models/miq_ae_datastore.rb`
- [YAML import](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_yaml_import.rb): `app/models/miq_ae_yaml_import.rb`
- [YAML export](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_yaml_export.rb): `app/models/miq_ae_yaml_export.rb`
- [Git import](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_git_import.rb): `app/models/miq_ae_git_import.rb`
- [XML import](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore/xml_import.rb): `app/models/miq_ae_datastore/xml_import.rb`
- [XML export](https://github.com/manageiq/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore/xml_export.rb): `app/models/miq_ae_datastore/xml_export.rb`

### Other components

- **Invocation caller**

## Connections

- Invocation caller → Automation engine: invokes
- Automation engine → Isolated workspace: runs in
- Automation engine → URI handling: accepts URI (evidence: `README.md`)
- URI handling → Automation datastore: resolves miqaedb (evidence: `README.md`)
- URI handling → Isolated workspace: resolves miqaews (evidence: `README.md`)
- Isolated workspace → Object lookup: looks up objects
- Object lookup → AE path parsing: uses paths
- Automation engine → State machine: runs state machine
- Automation engine → Method execution: dispatches methods
- Method execution → Method service: uses services
- Method service → Legacy model access: includes (evidence: `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb`)
- Method service → VMDB access: includes (evidence: `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb`)
- Method service → RBAC filtering: includes (evidence: `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb`)
- Service model access → Object helpers: includes (evidence: `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb`)
- Service model access → RBAC filtering: includes (evidence: `lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb`)
- Service model access → Provider service models: backs models
- YAML import → Automation datastore: imports into
- YAML export → Automation datastore: exports from
- Git import → Automation datastore: imports into
- XML import → Automation datastore: imports into
- XML export → Automation datastore: exports from
