|
1 | 1 | # ADR-0018: Unified Node/Action Registry across Flow, Workflow-Rule & Approval |
2 | 2 |
|
3 | | -**Status**: Accepted (2026-05-31) — M1 + M2 implemented (built-in nodes folded into the core plugin; descriptor API + `GET /automation/actions` shipped). M3 (outbox-backed `http`/`notify`) next. |
| 3 | +**Status**: Accepted (2026-05-31) — M1–M3 implemented; M4 framework-side complete (designer config-forms tracked in `../objectui`); M5 **dropped** (Workflow-Rule→Flow compiler removed per [ADR-0019](./0019-approval-as-flow-node.md); approval execution converged via the approval Flow node, not a compiler). The `workflow_rule` authoring paradigm is retired. |
4 | 4 | **Deciders**: ObjectStack Protocol Architects |
5 | 5 | **Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source of truth per metadata type), [ADR-0012](./0012-notification-platform.md) (generalized outbox in `service-messaging`) |
6 | 6 | **Consumers**: `@objectstack/spec` (`automation/`), `@objectstack/services/service-automation`, `@objectstack/plugins/plugin-approvals`, `@objectstack/plugins/plugin-webhooks` → `service-messaging`, every plugin that registers a node executor, `../objectui` (`plugin-workflow` designer) |
@@ -168,9 +168,9 @@ No fourth engine. Workflow Rules stays a **simplified authoring view** for busin |
168 | 168 | |:---|:---|:---| |
169 | 169 | | M1 ✅ | Add canonical `ActionDescriptorSchema` (+ `defineActionDescriptor`) alongside the legacy `NodeExecutorDescriptor`; `FlowNodeSchema.type` → validated `string` (with `FlowNodeAction`/`FLOW_BUILTIN_NODE_TYPES` retained as the seed set); `registerFlow()` soft-validates node types against the live registry (warn, don't hard-fail). | **Shipped.** Existing flows keep validating (built-in types seed-registered); plugin-registered node types are now legal flow nodes. | |
170 | 170 | | M2 (partial ✅) | Built-in nodes (logic/crud/http/screen) publish descriptors and are **folded into the core `AutomationServicePlugin`** (seeded via `installBuiltinNodes()`), so `automation` is a self-contained capability — no companion node-pack plugins, no `extras` in the capability loader. `connector_action` dropped from the baseline (an integration concern needing a connector registry the platform doesn't ship; left to the integration layer / marketplace plugins via the still-open `registerNodeExecutor()`). Descriptors tagged `source: 'builtin'` vs `'plugin'`. `AutomationEngine.getActionDescriptors()`/`getActionDescriptor()` + optional `IAutomationService.getActionDescriptors()`. `GET /api/v1/automation/actions` shipped via `HttpDispatcher.handleAutomation` (`?paradigm`/`?source`/`?category` filters; `AutomationActionsResponseSchema` in spec; declarative entry in `DEFAULT_AUTOMATION_ROUTES`). | Additive; built-in flows keep working from the core plugin alone. Hosts that hand-assembled the four `*NodesPlugin` classes drop them (the classes are gone). | |
171 | | -| M3 | Introduce `http` + `notify` executors backed by `service-messaging`; register `http_request`/`http_call`/`webhook` as deprecated aliases | Old node types keep running via alias. | |
172 | | -| M4 | Designer palette + config forms driven by the registry; remove hardcoded `FlowNodeType` | Designer-only; old saved graphs still load. | |
173 | | -| M5 | Workflow-Rule → Flow compiler; `plugin-approvals` action executor delegates to the shared `http`/`notify` executors | Approval/Workflow-Rule definitions unchanged; execution path converges. | |
| 171 | +| M3 ✅ | Canonical `http` + `notify` executors backed by `service-messaging` (HTTP outbox `sys_http_delivery` / notification outbox); `http_request`/`http_call`/`webhook` registered as **deprecated aliases** (`registerNodeAlias`, `needsOutbox`). | **Shipped.** Old node types keep running via alias; degrade to inline when no outbox is wired. | |
| 172 | +| M4 (framework ✅) | Hardcoded `FlowNodeType` removed (M1 turned `FlowNodeSchema.type` into a validated string seeded from `FLOW_BUILTIN_NODE_TYPES`); `GET /automation/actions` drives the palette. Remaining: designer config-forms rendered from `descriptor.configSchema` — tracked in `../objectui`. | Framework carries no closed node enum; old saved graphs still load. | |
| 173 | +| ~~M5~~ **Dropped** | Workflow-Rule → Flow compiler **removed** — there is no declarative Workflow-Rule authoring type to compile (Workflow Rules removed in #1398; `workflow` reclaimed for state machines, ADR-0020). The `workflow_rule` paradigm tag is retired from `ActionParadigmSchema` and all descriptors. Approval execution convergence is delivered by [ADR-0019](./0019-approval-as-flow-node.md) (approval is a durable-pause Flow node; side-effects run on the shared `http`/`notify` executors), not a compiler. | No legacy to migrate (greenfield). | |
174 | 174 |
|
175 | 175 | --- |
176 | 176 |
|
@@ -231,6 +231,6 @@ Managed credentials/secret vault, OAuth2 token refresh, multi-tenant connection |
231 | 231 | ### Implementation checklist |
232 | 232 |
|
233 | 233 | - [x] `AutomationEngine`: connector registry (`registerConnector` / `unregisterConnector` / `resolveConnectorAction` / `getRegisteredConnectors`) + `ConnectorActionHandler` / `ConnectorActionContext` types. |
234 | | -- [x] `builtin/connector-nodes.ts`: `connector_action` executor + descriptor (`category: 'io'`, `source: 'builtin'`, `paradigms: ['flow','workflow_rule','approval']`), wired into `installBuiltinNodes()`. The core plugin now seeds 11 baseline node types (was 10). |
| 234 | +- [x] `builtin/connector-nodes.ts`: `connector_action` executor + descriptor (`category: 'io'`, `source: 'builtin'`, `paradigms: ['flow','approval']`), wired into `installBuiltinNodes()`. The core plugin now seeds 11 baseline node types (was 10). |
235 | 235 | - [x] First concrete plugin `@objectstack/connector-rest` (the reference connector) validating the registry — `request` action, static auth (`none`/`api-key`/`basic`/`bearer`), no OAuth2 refresh. |
236 | 236 | - [x] Tests: baseline dispatch (fake connector) + REST plugin auth-header injection + end-to-end kernel boot (both plugins → `connector_action` flow → REST handler). |
0 commit comments