@solidxai/core 0.1.13-beta.2 → 0.1.13-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/seed.command.d.ts +2 -0
- package/dist/commands/seed.command.d.ts.map +1 -1
- package/dist/commands/seed.command.js +21 -0
- package/dist/commands/seed.command.js.map +1 -1
- package/dist/entities/saved-filters.entity.js +3 -3
- package/dist/entities/saved-filters.entity.js.map +1 -1
- package/dist/entities/workflow-trigger-execution.entity.js +1 -1
- package/dist/entities/workflow-trigger-execution.entity.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +1 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +44 -27
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +80 -67
- package/dist/services/workflow/nodes/execution-fail.node.d.ts +6 -0
- package/dist/services/workflow/nodes/execution-fail.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/execution-fail.node.js +81 -0
- package/dist/services/workflow/nodes/execution-fail.node.js.map +1 -0
- package/dist/services/workflow/nodes/for-each.node.d.ts +2 -0
- package/dist/services/workflow/nodes/for-each.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/for-each.node.js +114 -5
- package/dist/services/workflow/nodes/for-each.node.js.map +1 -1
- package/dist/services/workflow/nodes/if.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/if.node.js +7 -0
- package/dist/services/workflow/nodes/if.node.js.map +1 -1
- package/dist/services/workflow/nodes/log-write.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/log-write.node.js +2 -0
- package/dist/services/workflow/nodes/log-write.node.js.map +1 -1
- package/dist/services/workflow/nodes/loop-until.node.d.ts +12 -0
- package/dist/services/workflow/nodes/loop-until.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/loop-until.node.js +281 -0
- package/dist/services/workflow/nodes/loop-until.node.js.map +1 -0
- package/dist/services/workflow/nodes/parallel.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/parallel.node.js +7 -0
- package/dist/services/workflow/nodes/parallel.node.js.map +1 -1
- package/dist/services/workflow/nodes/sequential.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/sequential.node.js +7 -0
- package/dist/services/workflow/nodes/sequential.node.js.map +1 -1
- package/dist/services/workflow/nodes/switch.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/switch.node.js +7 -0
- package/dist/services/workflow/nodes/switch.node.js.map +1 -1
- package/dist/services/workflow/workflow-definition-validator.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-definition-validator.service.js +5 -2
- package/dist/services/workflow/workflow-definition-validator.service.js.map +1 -1
- package/dist/services/workflow/workflow-expression.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-expression.service.js +5 -0
- package/dist/services/workflow/workflow-expression.service.js.map +1 -1
- package/dist/services/workflow/workflow-node-registry.service.d.ts +2 -1
- package/dist/services/workflow/workflow-node-registry.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-node-registry.service.js +7 -0
- package/dist/services/workflow/workflow-node-registry.service.js.map +1 -1
- package/dist/services/workflow/workflow-runtime.service.d.ts +8 -0
- package/dist/services/workflow/workflow-runtime.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-runtime.service.js +197 -32
- package/dist/services/workflow/workflow-runtime.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +4 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/types/workflow-dsl.types.d.ts +14 -0
- package/dist/types/workflow-dsl.types.d.ts.map +1 -1
- package/dist/types/workflow-dsl.types.js.map +1 -1
- package/dist-tests/api/authenticate.spec.js +119 -0
- package/dist-tests/api/authenticate.spec.js.map +1 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
- package/dist-tests/api/ping.spec.js +21 -0
- package/dist-tests/api/ping.spec.js.map +1 -0
- package/dist-tests/helpers/auth.js +41 -0
- package/dist-tests/helpers/auth.js.map +1 -0
- package/dist-tests/helpers/env.js +11 -0
- package/dist-tests/helpers/env.js.map +1 -0
- package/docs/agent-builder/notebook-lm-prompt-for-agent-builder.md +136 -0
- package/docs/agent-builder/team-ready-note-agent-builder.md +305 -0
- package/docs/agent-hub-grooming.md +301 -0
- package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +438 -0
- package/docs/dashboards/dashboard-curl-smoke-tests.txt +146 -0
- package/docs/dashboards/delete-legacy-dashboard-metadata.sql +172 -0
- package/docs/datasource-introspection-ddl-analysis.md +326 -0
- package/docs/datasource-introspection-implementation-plan.md +306 -0
- package/docs/grouping-enhancements.md +89 -0
- package/docs/java-spring/README.md +3 -0
- package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
- package/docs/module-package-import-handoff.md +691 -0
- package/docs/seed-changes.md +65 -0
- package/docs/test-data-workflow.md +200 -0
- package/docs/type-declaration-import-issue.md +24 -0
- package/docs/workflow/business-automation-example-notes.md +309 -0
- package/docs/workflow/control-flow-node-addition-sop.md +324 -0
- package/docs/workflow/data-engineering-pipeline-example-notes.md +330 -0
- package/docs/workflow/foreach-example-notes.md +187 -0
- package/docs/workflow/hello-world-example-notes.md +271 -0
- package/docs/workflow/kestra-concepts-plugins-blueprints.md +315 -0
- package/docs/workflow/loop-until-example-notes.md +198 -0
- package/docs/workflow/microservices-and-apis-example-notes.md +264 -0
- package/docs/workflow/samples.md +25 -0
- package/docs/workflow/what-is-kestra.md +79 -0
- package/docs/workflow/workflow-core-module-handoff-summary.md +191 -0
- package/docs/workflow/workflow-module-brd.md +185 -0
- package/docs/workflow/workflow-module-domain-model.md +252 -0
- package/docs/workflow/workflow-module-metadata-dsl.md +302 -0
- package/docs/workflow/workflow-module-technical-spec.md +293 -0
- package/docs/workflow/workflow-node-type-contracts.md +635 -0
- package/docs/workflow/workflow-node-ui-metadata-contract.md +1262 -0
- package/docs/workflow/workflow-solidx-model-field-spec.md +284 -0
- package/package.json +1 -1
- package/src/commands/seed.command.ts +19 -0
- package/src/entities/saved-filters.entity.ts +3 -3
- package/src/entities/workflow-trigger-execution.entity.ts +1 -1
- package/src/index.ts +2 -0
- package/src/interfaces.ts +1 -0
- package/src/seeders/module-metadata-seeder.service.ts +50 -36
- package/src/seeders/seed-data/solid-core-metadata.json +80 -67
- package/src/services/workflow/nodes/execution-fail.node.ts +82 -0
- package/src/services/workflow/nodes/for-each.node.ts +140 -6
- package/src/services/workflow/nodes/if.node.ts +7 -0
- package/src/services/workflow/nodes/log-write.node.ts +2 -0
- package/src/services/workflow/nodes/loop-until.node.ts +343 -0
- package/src/services/workflow/nodes/parallel.node.ts +7 -0
- package/src/services/workflow/nodes/sequential.node.ts +7 -0
- package/src/services/workflow/nodes/switch.node.ts +7 -0
- package/src/services/workflow/workflow-definition-validator.service.ts +5 -2
- package/src/services/workflow/workflow-expression.service.ts +5 -0
- package/src/services/workflow/workflow-node-registry.service.ts +11 -0
- package/src/services/workflow/workflow-runtime.service.ts +274 -39
- package/src/solid-core.module.ts +4 -0
- package/src/types/workflow-dsl.types.ts +43 -0
- package/.claude/settings.local.json +0 -16
- package/CLAUDE.md +0 -26
- package/src/services/1.js +0 -6
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Workflow Builder Module BRD
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Build a reusable SolidX module named `workflow-builder` that allows teams to define, execute, monitor, seed, import, and share workflows inside SolidX applications.
|
|
6
|
+
|
|
7
|
+
The module should be self-contained enough to be developed in this consuming project first and later exported or distributed to other SolidX projects.
|
|
8
|
+
|
|
9
|
+
## Problem Statement
|
|
10
|
+
|
|
11
|
+
Teams need a reusable way to orchestrate multi-step business and technical processes across systems. Today, these processes are often spread across scripts, cron jobs, ad hoc integrations, or manual operational steps. That creates low visibility, weak reuse, and brittle execution.
|
|
12
|
+
|
|
13
|
+
We want a module that provides:
|
|
14
|
+
|
|
15
|
+
- a workflow definition model
|
|
16
|
+
- a builder experience
|
|
17
|
+
- an execution engine
|
|
18
|
+
- reusable step/action types
|
|
19
|
+
- observability into runs
|
|
20
|
+
- a shareable YAML-based workflow definition format
|
|
21
|
+
|
|
22
|
+
## Goals
|
|
23
|
+
|
|
24
|
+
- Provide a reusable workflow engine and builder as a SolidX module
|
|
25
|
+
- Support both visual and code-friendly workflow definition
|
|
26
|
+
- Represent workflows as JSON so they can be seeded, exported, imported, and shared
|
|
27
|
+
- Support workflow inputs, outputs, triggers, expressions, and control-flow constructs
|
|
28
|
+
- Separate workflow definition from workflow execution
|
|
29
|
+
- Support extensible task and trigger types
|
|
30
|
+
- Support runtime observability including status, logs, and outputs
|
|
31
|
+
- Support blueprint/template style workflow starters
|
|
32
|
+
|
|
33
|
+
## Non-Goals For V1
|
|
34
|
+
|
|
35
|
+
- Full Kestra-level feature parity
|
|
36
|
+
- A full revision browser and rollback UX
|
|
37
|
+
- Distributed execution across many worker nodes
|
|
38
|
+
- A large marketplace of task plugins on day one
|
|
39
|
+
- Complex tenancy / cross-project federation
|
|
40
|
+
|
|
41
|
+
## Primary Users
|
|
42
|
+
|
|
43
|
+
- Application developers who define and maintain workflows
|
|
44
|
+
- Operations or admin users who execute and monitor workflows
|
|
45
|
+
- Solution builders who seed and distribute reusable workflow packs
|
|
46
|
+
- Future less-technical users who may use a visual builder
|
|
47
|
+
|
|
48
|
+
## Core Capabilities
|
|
49
|
+
|
|
50
|
+
### 1. Workflow Definition
|
|
51
|
+
|
|
52
|
+
Users can create a workflow with:
|
|
53
|
+
|
|
54
|
+
- stable identity
|
|
55
|
+
- display metadata
|
|
56
|
+
- typed inputs
|
|
57
|
+
- tasks / control-flow nodes
|
|
58
|
+
- triggers
|
|
59
|
+
- flow-level outputs
|
|
60
|
+
|
|
61
|
+
### 2. Workflow Builder
|
|
62
|
+
|
|
63
|
+
Users can define workflows through:
|
|
64
|
+
|
|
65
|
+
- structured UI forms
|
|
66
|
+
- topology / builder style interfaces over time
|
|
67
|
+
- direct JSON or code-oriented editing over time
|
|
68
|
+
|
|
69
|
+
### 3. Execution Engine
|
|
70
|
+
|
|
71
|
+
Users can run workflows:
|
|
72
|
+
|
|
73
|
+
- manually
|
|
74
|
+
- via triggers
|
|
75
|
+
- with runtime inputs
|
|
76
|
+
|
|
77
|
+
The engine should execute tasks, resolve expressions, track state, and store outputs and logs.
|
|
78
|
+
|
|
79
|
+
### 4. Monitoring
|
|
80
|
+
|
|
81
|
+
Users can inspect:
|
|
82
|
+
|
|
83
|
+
- workflow execution status
|
|
84
|
+
- step execution status
|
|
85
|
+
- logs
|
|
86
|
+
- outputs
|
|
87
|
+
- timestamps and runtime metadata
|
|
88
|
+
|
|
89
|
+
### 5. Reuse and Distribution
|
|
90
|
+
|
|
91
|
+
Users can:
|
|
92
|
+
|
|
93
|
+
- seed workflows from module metadata or JSON assets
|
|
94
|
+
- export workflow definitions
|
|
95
|
+
- import workflow definitions
|
|
96
|
+
- create blueprint/template workflows
|
|
97
|
+
|
|
98
|
+
## Functional Requirements
|
|
99
|
+
|
|
100
|
+
### Workflow Definitions
|
|
101
|
+
|
|
102
|
+
- The system must store workflows as structured YAML definitions.
|
|
103
|
+
- The system must support workflow identity independent of display name.
|
|
104
|
+
- The system must support workflow grouping, likely via namespace or folder concepts.
|
|
105
|
+
- The system must support a published current definition.
|
|
106
|
+
- The system should support immutable execution-time snapshots of the definition used for a run.
|
|
107
|
+
|
|
108
|
+
### Inputs and Outputs
|
|
109
|
+
|
|
110
|
+
- The system must support typed workflow inputs.
|
|
111
|
+
- The system must support default values and required flags.
|
|
112
|
+
- The system must support task outputs and flow outputs.
|
|
113
|
+
- The system must support output references across downstream tasks.
|
|
114
|
+
|
|
115
|
+
### Task Model
|
|
116
|
+
|
|
117
|
+
- The system must treat `node` as the universal workflow building block.
|
|
118
|
+
- The system must distinguish node `kind` from node `type`.
|
|
119
|
+
- The system must support runnable steps.
|
|
120
|
+
- The system must support control-flow steps such as conditional branches and loops.
|
|
121
|
+
- The system must support nested step structures where needed.
|
|
122
|
+
- The system must use ordered node arrays with nested child arrays for control-flow structures in v1.
|
|
123
|
+
- The system must support extensible step types with type-specific config.
|
|
124
|
+
- The v1 task node catalog must include `log.write` and `http.request`.
|
|
125
|
+
- The v1 control node catalog must include `if`, `forEach`, and `parallel`.
|
|
126
|
+
|
|
127
|
+
### Triggers
|
|
128
|
+
|
|
129
|
+
- The system must support multiple triggers per workflow.
|
|
130
|
+
- The system must support trigger-specific configuration.
|
|
131
|
+
- The system must support trigger-provided input values.
|
|
132
|
+
- The system must support manual execution independent of triggers.
|
|
133
|
+
|
|
134
|
+
### Expressions
|
|
135
|
+
|
|
136
|
+
- The system must support expressions in workflow config.
|
|
137
|
+
- The system must support references to inputs, outputs, execution context, and trigger context.
|
|
138
|
+
- The system should support design-time validation where feasible.
|
|
139
|
+
|
|
140
|
+
### Executions
|
|
141
|
+
|
|
142
|
+
- The system must create a workflow execution record per run.
|
|
143
|
+
- The system must create step execution records per executed step.
|
|
144
|
+
- The system must persist execution state transitions.
|
|
145
|
+
- The system must persist logs and outputs.
|
|
146
|
+
- The system must preserve the exact workflow definition snapshot used for the run.
|
|
147
|
+
|
|
148
|
+
### Secrets
|
|
149
|
+
|
|
150
|
+
- The system must support secure secret references in workflow configuration.
|
|
151
|
+
- The system must not expose resolved secret values in stored definitions or logs.
|
|
152
|
+
|
|
153
|
+
### Blueprints and Seeding
|
|
154
|
+
|
|
155
|
+
- The system must support seeded workflow definitions.
|
|
156
|
+
- The system must support blueprint/template workflows for faster adoption.
|
|
157
|
+
- The system should track seed source metadata and seed version.
|
|
158
|
+
|
|
159
|
+
## Success Criteria
|
|
160
|
+
|
|
161
|
+
- A developer can define a workflow in JSON and seed it into a project.
|
|
162
|
+
- An admin can execute a workflow manually with inputs.
|
|
163
|
+
- A workflow can run multiple tasks and pass outputs between them.
|
|
164
|
+
- A workflow can include at least one control-flow pattern in v1 or early v1.x.
|
|
165
|
+
- A workflow execution records exact runtime state, outputs, and logs.
|
|
166
|
+
- Workflow definitions are portable between SolidX projects.
|
|
167
|
+
|
|
168
|
+
## Proposed V1 Scope
|
|
169
|
+
|
|
170
|
+
- Workflow definition CRUD
|
|
171
|
+
- Typed inputs and flow outputs
|
|
172
|
+
- Runnable task node support: `log.write`, `http.request`
|
|
173
|
+
- Initial control-flow node support: `if`, `forEach`, `parallel`
|
|
174
|
+
- Manual execution
|
|
175
|
+
- Basic trigger support
|
|
176
|
+
- Execution tracking and logs
|
|
177
|
+
- Seed/import/export support
|
|
178
|
+
- YAML definition model
|
|
179
|
+
|
|
180
|
+
## Open Product Questions
|
|
181
|
+
|
|
182
|
+
- How much of the v1 authoring experience should be form-based versus canvas-based?
|
|
183
|
+
- Should subflows be in v1 or phase 2?
|
|
184
|
+
- Should workflow grouping use namespace, folders, or both?
|
|
185
|
+
- How much blueprint functionality belongs in v1 versus later?
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Workflow Builder Domain Model
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This is the initial domain model proposal for the reusable `workflow-builder` SolidX module.
|
|
6
|
+
|
|
7
|
+
The main design rule is:
|
|
8
|
+
|
|
9
|
+
- workflow definitions are not the same thing as workflow executions
|
|
10
|
+
|
|
11
|
+
## Core Aggregates
|
|
12
|
+
|
|
13
|
+
### WorkflowDefinition
|
|
14
|
+
|
|
15
|
+
Represents the current reusable workflow definition.
|
|
16
|
+
|
|
17
|
+
Suggested attributes:
|
|
18
|
+
|
|
19
|
+
- `id`
|
|
20
|
+
- `key`
|
|
21
|
+
- `displayName`
|
|
22
|
+
- `namespace`
|
|
23
|
+
- `description`
|
|
24
|
+
- `status`
|
|
25
|
+
- `definitionVersion`
|
|
26
|
+
- `definitionChecksum`
|
|
27
|
+
- `definitionYaml`
|
|
28
|
+
- `seedSource`
|
|
29
|
+
- `seedVersion`
|
|
30
|
+
- `isSeeded`
|
|
31
|
+
- `createdAt`
|
|
32
|
+
- `updatedAt`
|
|
33
|
+
|
|
34
|
+
### WorkflowExecution
|
|
35
|
+
|
|
36
|
+
Represents a single run of a workflow.
|
|
37
|
+
|
|
38
|
+
Suggested attributes:
|
|
39
|
+
|
|
40
|
+
- `id`
|
|
41
|
+
- `workflowDefinitionId`
|
|
42
|
+
- `workflowKey`
|
|
43
|
+
- `status`
|
|
44
|
+
- `triggerType`
|
|
45
|
+
- `startedAt`
|
|
46
|
+
- `finishedAt`
|
|
47
|
+
- `inputPayload`
|
|
48
|
+
- `resolvedContext`
|
|
49
|
+
- `definitionVersion`
|
|
50
|
+
- `definitionChecksum`
|
|
51
|
+
- `definitionSnapshot`
|
|
52
|
+
- `errorSummary`
|
|
53
|
+
|
|
54
|
+
### StepExecution
|
|
55
|
+
|
|
56
|
+
Represents the runtime record for an executed step.
|
|
57
|
+
|
|
58
|
+
Suggested attributes:
|
|
59
|
+
|
|
60
|
+
- `id`
|
|
61
|
+
- `workflowExecutionId`
|
|
62
|
+
- `stepId`
|
|
63
|
+
- `stepType`
|
|
64
|
+
- `parentStepExecutionId`
|
|
65
|
+
- `status`
|
|
66
|
+
- `startedAt`
|
|
67
|
+
- `finishedAt`
|
|
68
|
+
- `attemptNumber`
|
|
69
|
+
- `inputContext`
|
|
70
|
+
- `outputPayload`
|
|
71
|
+
- `logSummary`
|
|
72
|
+
- `errorSummary`
|
|
73
|
+
|
|
74
|
+
## Definition Submodels
|
|
75
|
+
|
|
76
|
+
### WorkflowInput
|
|
77
|
+
|
|
78
|
+
- `id`
|
|
79
|
+
- `type`
|
|
80
|
+
- `displayName`
|
|
81
|
+
- `description`
|
|
82
|
+
- `required`
|
|
83
|
+
- `defaultValue`
|
|
84
|
+
- `schema`
|
|
85
|
+
|
|
86
|
+
### WorkflowOutput
|
|
87
|
+
|
|
88
|
+
- `id`
|
|
89
|
+
- `type`
|
|
90
|
+
- `valueExpression`
|
|
91
|
+
- `description`
|
|
92
|
+
|
|
93
|
+
### WorkflowTrigger
|
|
94
|
+
|
|
95
|
+
- `id`
|
|
96
|
+
- `type`
|
|
97
|
+
- `name`
|
|
98
|
+
- `enabled`
|
|
99
|
+
- `configuration`
|
|
100
|
+
- `inputOverrides`
|
|
101
|
+
|
|
102
|
+
### WorkflowNode
|
|
103
|
+
|
|
104
|
+
Base concept for a node in a workflow definition.
|
|
105
|
+
|
|
106
|
+
Suggested common fields:
|
|
107
|
+
|
|
108
|
+
- `id`
|
|
109
|
+
- `name`
|
|
110
|
+
- `type`
|
|
111
|
+
- `kind`
|
|
112
|
+
- `configuration`
|
|
113
|
+
- `description`
|
|
114
|
+
- `disabled`
|
|
115
|
+
- `timeout`
|
|
116
|
+
- `retryPolicy`
|
|
117
|
+
- `onError`
|
|
118
|
+
- `metadata`
|
|
119
|
+
|
|
120
|
+
Where `kind` can initially distinguish:
|
|
121
|
+
|
|
122
|
+
- `task`
|
|
123
|
+
- `control`
|
|
124
|
+
- `subflow`
|
|
125
|
+
|
|
126
|
+
## Runtime Supporting Concepts
|
|
127
|
+
|
|
128
|
+
### ExecutionContext
|
|
129
|
+
|
|
130
|
+
Holds runtime-accessible values:
|
|
131
|
+
|
|
132
|
+
- inputs
|
|
133
|
+
- step outputs
|
|
134
|
+
- flow outputs
|
|
135
|
+
- workflow metadata
|
|
136
|
+
- execution metadata
|
|
137
|
+
- trigger metadata
|
|
138
|
+
|
|
139
|
+
### SecretReference
|
|
140
|
+
|
|
141
|
+
Represents a secure pointer rather than a literal secret.
|
|
142
|
+
|
|
143
|
+
Suggested fields:
|
|
144
|
+
|
|
145
|
+
- `provider`
|
|
146
|
+
- `key`
|
|
147
|
+
- `path`
|
|
148
|
+
|
|
149
|
+
### BlueprintDefinition
|
|
150
|
+
|
|
151
|
+
Represents a starter workflow template.
|
|
152
|
+
|
|
153
|
+
Suggested attributes:
|
|
154
|
+
|
|
155
|
+
- `id`
|
|
156
|
+
- `key`
|
|
157
|
+
- `displayName`
|
|
158
|
+
- `description`
|
|
159
|
+
- `tags`
|
|
160
|
+
- `definitionYaml`
|
|
161
|
+
- `source`
|
|
162
|
+
|
|
163
|
+
## Relationship View
|
|
164
|
+
|
|
165
|
+
- A `WorkflowDefinition` has many `WorkflowInput`
|
|
166
|
+
- A `WorkflowDefinition` has many `WorkflowOutput`
|
|
167
|
+
- A `WorkflowDefinition` has many `WorkflowTrigger`
|
|
168
|
+
- A `WorkflowDefinition` has many `WorkflowNode`
|
|
169
|
+
- A `WorkflowDefinition` has many `WorkflowExecution`
|
|
170
|
+
- A `WorkflowExecution` has many `StepExecution`
|
|
171
|
+
|
|
172
|
+
## Modeling Decision: Revisions
|
|
173
|
+
|
|
174
|
+
Current recommendation:
|
|
175
|
+
|
|
176
|
+
- do not require a full `WorkflowRevision` aggregate in v1
|
|
177
|
+
- do preserve `definitionVersion`, `definitionChecksum`, and `definitionSnapshot` on execution
|
|
178
|
+
|
|
179
|
+
Possible later addition:
|
|
180
|
+
|
|
181
|
+
- `WorkflowRevision`
|
|
182
|
+
- `WorkflowRevisionDiff`
|
|
183
|
+
- `WorkflowReplayRequest`
|
|
184
|
+
|
|
185
|
+
## Modeling Decision: Nodes vs Flat Steps
|
|
186
|
+
|
|
187
|
+
We should model workflow steps as nodes, not as a flat ordered list only, because we need to support:
|
|
188
|
+
|
|
189
|
+
- conditional branches
|
|
190
|
+
- loops
|
|
191
|
+
- nested structures
|
|
192
|
+
- parallel blocks
|
|
193
|
+
- subflows
|
|
194
|
+
|
|
195
|
+
This does not force us into a fully general graph database style model, but it does mean the persisted workflow DSL must support nesting and references.
|
|
196
|
+
|
|
197
|
+
Agreed v1 traversal shape:
|
|
198
|
+
|
|
199
|
+
- ordered arrays for sequential execution
|
|
200
|
+
- nested child arrays owned by control nodes
|
|
201
|
+
- no freeform graph model in v1
|
|
202
|
+
|
|
203
|
+
## Modeling Decision: Registries
|
|
204
|
+
|
|
205
|
+
Task and trigger types should be externally registrable concepts, not enum values frozen into the core forever.
|
|
206
|
+
|
|
207
|
+
Likely supporting registry models:
|
|
208
|
+
|
|
209
|
+
- `TaskTypeDefinition`
|
|
210
|
+
- `TriggerTypeDefinition`
|
|
211
|
+
|
|
212
|
+
Suggested attributes:
|
|
213
|
+
|
|
214
|
+
- `type`
|
|
215
|
+
- `kind`
|
|
216
|
+
- `displayName`
|
|
217
|
+
- `category`
|
|
218
|
+
- `configurationSchema`
|
|
219
|
+
- `uiSchema`
|
|
220
|
+
- `runtimeHandler`
|
|
221
|
+
- `outputSchema`
|
|
222
|
+
- `documentation`
|
|
223
|
+
|
|
224
|
+
Agreed v1 node type catalog:
|
|
225
|
+
|
|
226
|
+
- `log.write`
|
|
227
|
+
- `http.request`
|
|
228
|
+
- `if`
|
|
229
|
+
- `forEach`
|
|
230
|
+
- `parallel`
|
|
231
|
+
|
|
232
|
+
## Candidate V1 Entities
|
|
233
|
+
|
|
234
|
+
- `WorkflowDefinition`
|
|
235
|
+
- `WorkflowExecution`
|
|
236
|
+
- `StepExecution`
|
|
237
|
+
- `BlueprintDefinition`
|
|
238
|
+
|
|
239
|
+
With embedded or child structures for:
|
|
240
|
+
|
|
241
|
+
- inputs
|
|
242
|
+
- outputs
|
|
243
|
+
- triggers
|
|
244
|
+
- nodes
|
|
245
|
+
- secret references
|
|
246
|
+
|
|
247
|
+
## Open Domain Questions
|
|
248
|
+
|
|
249
|
+
- Should namespace be its own entity or just a string path?
|
|
250
|
+
- Should subflows be modeled as ordinary workflow references or a distinct node type?
|
|
251
|
+
- Should artifacts/files be part of `StepExecution` directly or a separate `ExecutionArtifact` entity?
|
|
252
|
+
- Should seeded workflows be editable in place or partially protected?
|