@solidxai/core 0.1.12-beta.2 → 0.1.12-beta.3
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/.claude/settings.local.json +16 -0
- package/CLAUDE.md +26 -0
- package/dist/constants/media-file-types.d.ts +5 -0
- package/dist/constants/media-file-types.d.ts.map +1 -0
- package/dist/constants/media-file-types.js +27 -0
- package/dist/constants/media-file-types.js.map +1 -0
- package/dist/controllers/media.controller.d.ts +14 -11
- package/dist/controllers/media.controller.d.ts.map +1 -1
- package/dist/controllers/media.controller.js +72 -33
- package/dist/controllers/media.controller.js.map +1 -1
- package/dist/dtos/create-media.dto.d.ts +1 -0
- package/dist/dtos/create-media.dto.d.ts.map +1 -1
- package/dist/dtos/create-media.dto.js +7 -1
- package/dist/dtos/create-media.dto.js.map +1 -1
- package/dist/dtos/update-media.dto.d.ts +1 -0
- package/dist/dtos/update-media.dto.d.ts.map +1 -1
- package/dist/dtos/update-media.dto.js +7 -1
- package/dist/dtos/update-media.dto.js.map +1 -1
- package/dist/entities/media.entity.d.ts +1 -0
- package/dist/entities/media.entity.d.ts.map +1 -1
- package/dist/entities/media.entity.js +9 -1
- package/dist/entities/media.entity.js.map +1 -1
- package/dist/enums/auth-type.enum.d.ts +2 -1
- package/dist/enums/auth-type.enum.d.ts.map +1 -1
- package/dist/enums/auth-type.enum.js +1 -0
- package/dist/enums/auth-type.enum.js.map +1 -1
- package/dist/guards/authentication.guard.d.ts +3 -1
- package/dist/guards/authentication.guard.d.ts.map +1 -1
- package/dist/guards/authentication.guard.js +5 -1
- package/dist/guards/authentication.guard.js.map +1 -1
- package/dist/guards/media-signed-url.guard.d.ts +9 -0
- package/dist/guards/media-signed-url.guard.d.ts.map +1 -0
- package/dist/guards/media-signed-url.guard.js +49 -0
- package/dist/guards/media-signed-url.guard.js.map +1 -0
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js +10 -13
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js.map +1 -1
- package/dist/repository/media.repository.d.ts.map +1 -1
- package/dist/repository/media.repository.js +2 -0
- package/dist/repository/media.repository.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +88 -3
- package/dist/services/media-download-url.service.d.ts +21 -0
- package/dist/services/media-download-url.service.d.ts.map +1 -0
- package/dist/services/media-download-url.service.js +67 -0
- package/dist/services/media-download-url.service.js.map +1 -0
- package/dist/services/media-storage.utils.d.ts +27 -0
- package/dist/services/media-storage.utils.d.ts.map +1 -0
- package/dist/services/media-storage.utils.js +82 -0
- package/dist/services/media-storage.utils.js.map +1 -0
- package/dist/services/media.service.d.ts +20 -4
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +157 -55
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.d.ts +4 -4
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.d.ts.map +1 -1
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.js +37 -63
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.d.ts +5 -5
- package/dist/services/mediaStorageProviders/file-storage-provider.d.ts.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.js +37 -38
- package/dist/services/mediaStorageProviders/file-storage-provider.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +11 -1
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/audit.subscriber.js +1 -1
- package/dist/subscribers/audit.subscriber.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/media-file-types.ts +44 -0
- package/src/controllers/media.controller.ts +44 -24
- package/src/dtos/create-media.dto.ts +8 -3
- package/src/dtos/update-media.dto.ts +8 -3
- package/src/entities/media.entity.ts +4 -1
- package/src/enums/auth-type.enum.ts +1 -0
- package/src/guards/authentication.guard.ts +3 -0
- package/src/guards/media-signed-url.guard.ts +41 -0
- package/src/helpers/field-crud-managers/MediaFieldCrudManager.ts +12 -24
- package/src/repository/media.repository.ts +2 -0
- package/src/seeders/seed-data/solid-core-metadata.json +88 -3
- package/src/services/1.js +6 -0
- package/src/services/media-download-url.service.ts +67 -0
- package/src/services/media-storage.utils.ts +79 -0
- package/src/services/media.service.ts +189 -59
- package/src/services/mediaStorageProviders/file-s3-storage-provider.ts +52 -76
- package/src/services/mediaStorageProviders/file-storage-provider.ts +44 -48
- package/src/solid-core.module.ts +21 -2
- package/src/subscribers/audit.subscriber.ts +1 -1
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/agent-builder/notebook-lm-prompt-for-agent-builder.md +0 -136
- package/docs/agent-builder/team-ready-note-agent-builder.md +0 -305
- package/docs/agent-hub-grooming.md +0 -301
- package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +0 -438
- package/docs/dashboards/dashboard-curl-smoke-tests.txt +0 -146
- package/docs/dashboards/delete-legacy-dashboard-metadata.sql +0 -172
- package/docs/datasource-introspection-ddl-analysis.md +0 -326
- package/docs/datasource-introspection-implementation-plan.md +0 -306
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/module-package-import-handoff.md +0 -691
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
- package/docs/workflow/business-automation-example-notes.md +0 -309
- package/docs/workflow/data-engineering-pipeline-example-notes.md +0 -330
- package/docs/workflow/foreach-example-notes.md +0 -187
- package/docs/workflow/hello-world-example-notes.md +0 -271
- package/docs/workflow/kestra-concepts-plugins-blueprints.md +0 -315
- package/docs/workflow/loop-until-example-notes.md +0 -198
- package/docs/workflow/microservices-and-apis-example-notes.md +0 -264
- package/docs/workflow/samples.md +0 -25
- package/docs/workflow/what-is-kestra.md +0 -79
- package/docs/workflow/workflow-core-module-handoff-summary.md +0 -191
- package/docs/workflow/workflow-module-brd.md +0 -185
- package/docs/workflow/workflow-module-domain-model.md +0 -252
- package/docs/workflow/workflow-module-metadata-dsl.md +0 -302
- package/docs/workflow/workflow-module-technical-spec.md +0 -293
- package/docs/workflow/workflow-node-type-contracts.md +0 -635
- package/docs/workflow/workflow-node-ui-metadata-contract.md +0 -1262
- package/docs/workflow/workflow-solidx-model-field-spec.md +0 -284
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Workflow Core Module Handoff Summary
|
|
2
|
-
|
|
3
|
-
## Current Branches
|
|
4
|
-
|
|
5
|
-
- `solid-core-module` work is on branch `ft-workflow`.
|
|
6
|
-
- `solid-core-ui` also has a matching `ft-workflow` branch created from `dev`.
|
|
7
|
-
- The original consuming project docs have been moved into `solid-core-module/docs/workflow`.
|
|
8
|
-
|
|
9
|
-
## What We Built So Far
|
|
10
|
-
|
|
11
|
-
Workflow functionality has been moved out of the consuming project and into `solid-core-module` so workflows become a first-class Solid Core feature.
|
|
12
|
-
|
|
13
|
-
The backend now includes generated/core workflow models, controllers, services, repositories, DTOs, metadata, and a first-pass runtime engine. The current runtime supports seeded workflow definitions and execution through the workflow definition controller.
|
|
14
|
-
|
|
15
|
-
## Workflow Models
|
|
16
|
-
|
|
17
|
-
The agreed model set currently implemented is:
|
|
18
|
-
|
|
19
|
-
- `WorkflowDefinition`
|
|
20
|
-
- `WorkflowExecution`
|
|
21
|
-
- `WorkflowStepExecution`
|
|
22
|
-
- `WorkflowExecutionLog`
|
|
23
|
-
- `WorkflowExecutionArtifact`
|
|
24
|
-
- `WorkflowTriggerExecution`
|
|
25
|
-
|
|
26
|
-
`WorkflowBlueprint` remains intentionally ignored for now.
|
|
27
|
-
|
|
28
|
-
Definition versioning is represented as fields on definition and execution records rather than a separate version table.
|
|
29
|
-
|
|
30
|
-
## Metadata And Tables
|
|
31
|
-
|
|
32
|
-
Workflow metadata now lives in `src/seeders/seed-data/solid-core-metadata.json`.
|
|
33
|
-
|
|
34
|
-
Workflow tables use the `ss_` prefix, for example:
|
|
35
|
-
|
|
36
|
-
- `ss_workflow_definition`
|
|
37
|
-
- `ss_workflow_execution`
|
|
38
|
-
- `ss_workflow_step_execution`
|
|
39
|
-
- `ss_workflow_execution_log`
|
|
40
|
-
- `ss_workflow_execution_artifact`
|
|
41
|
-
- `ss_workflow_trigger_execution`
|
|
42
|
-
|
|
43
|
-
`workflowExecution.executionIdentifier` is now a normal `shortText` field because the runtime generates it directly. It is no longer modeled as a computed field.
|
|
44
|
-
|
|
45
|
-
## Runtime And Node System
|
|
46
|
-
|
|
47
|
-
The runtime uses a registry-based node provider model:
|
|
48
|
-
|
|
49
|
-
- Node providers are registered through a decorator and interface pattern.
|
|
50
|
-
- Discovery happens at module startup using Nest discovery/reflection.
|
|
51
|
-
- The registry skips discovered wrappers that do not have a valid provider class `metatype`.
|
|
52
|
-
|
|
53
|
-
The current v1 node/provider set includes:
|
|
54
|
-
|
|
55
|
-
- `log.write`
|
|
56
|
-
- `http.request`
|
|
57
|
-
- `if`
|
|
58
|
-
- `forEach`
|
|
59
|
-
- `parallel`
|
|
60
|
-
|
|
61
|
-
The workflow YAML shape uses ordered arrays with nested child arrays for control nodes, following the Kestra-style structure we agreed on.
|
|
62
|
-
|
|
63
|
-
## Execution Flow
|
|
64
|
-
|
|
65
|
-
Workflow execution is exposed through `WorkflowDefinitionController`:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
POST /workflow-definition/by-key/:key/execute
|
|
69
|
-
POST /workflow-definition/:id/execute
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
The sample seeded workflow key is:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
sample-workflow-builder-smoke-test
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Example curl:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
curl -X POST "http://localhost:3000/workflow-definition/by-key/sample-workflow-builder-smoke-test/execute" \
|
|
82
|
-
-H "Content-Type: application/json" \
|
|
83
|
-
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
|
|
84
|
-
-d '{
|
|
85
|
-
"triggerType": "manual",
|
|
86
|
-
"input": {
|
|
87
|
-
"name": "Harish",
|
|
88
|
-
"runHttp": false,
|
|
89
|
-
"url": "https://example.com",
|
|
90
|
-
"items": ["alpha", "beta", "gamma"]
|
|
91
|
-
}
|
|
92
|
-
}'
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Workflow Execution Relations
|
|
96
|
-
|
|
97
|
-
`WorkflowExecution` now has contextual one-to-many relations for:
|
|
98
|
-
|
|
99
|
-
- `workflowStepExecutions`
|
|
100
|
-
- `workflowExecutionLogs`
|
|
101
|
-
- `workflowExecutionArtifacts`
|
|
102
|
-
|
|
103
|
-
These are exposed as tabs in the Workflow Execution form. The child models are not marked with `isChild: true`; that flag is reserved for another SolidX use case.
|
|
104
|
-
|
|
105
|
-
Standalone menu items for step executions, logs, and artifacts were removed because these records are intended to be viewed in the context of a workflow execution.
|
|
106
|
-
|
|
107
|
-
`WorkflowTriggerExecution` remains as a standalone menu item because trigger executions can conceptually exist independently from a completed workflow execution.
|
|
108
|
-
|
|
109
|
-
## Admin Metadata UI Changes
|
|
110
|
-
|
|
111
|
-
Workflow menus are grouped under a top-level `Workflow` menu, similar to the existing Layout Builder pattern.
|
|
112
|
-
|
|
113
|
-
Workflow Definition form:
|
|
114
|
-
|
|
115
|
-
- `Basic Info`
|
|
116
|
-
- `Definition YAML`
|
|
117
|
-
|
|
118
|
-
Workflow Execution form:
|
|
119
|
-
|
|
120
|
-
- `Basic Info`
|
|
121
|
-
- `Input`
|
|
122
|
-
- `Output`
|
|
123
|
-
- `Definition Snapshot`
|
|
124
|
-
- `Steps`
|
|
125
|
-
- `Logs`
|
|
126
|
-
- `Artifacts`
|
|
127
|
-
- `Errors`
|
|
128
|
-
|
|
129
|
-
JSON fields in the dedicated JSON tabs use metadata-only layout attributes:
|
|
130
|
-
|
|
131
|
-
- `className` on the field wrapper
|
|
132
|
-
- `height` passed to `SolidCodeEditor`
|
|
133
|
-
|
|
134
|
-
The JSON editor height is currently set with viewport-based values such as:
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
"height": "calc(100vh - 260px)"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Seeding
|
|
141
|
-
|
|
142
|
-
`ModuleMetadataSeederService` was updated to seed workflow definitions from module metadata JSON.
|
|
143
|
-
|
|
144
|
-
The consuming project currently still owns a sample workflow metadata file under:
|
|
145
|
-
|
|
146
|
-
```text
|
|
147
|
-
solid-api/src/workflow-builder/metadata/workflow-builder-metadata.json
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
That sample is useful for smoke testing the runtime.
|
|
151
|
-
|
|
152
|
-
## Important Decisions
|
|
153
|
-
|
|
154
|
-
- Workflow definitions are not treated as a single opaque blob internally, but they do have a canonical YAML DSL for sharing, seeding, validation, and developer workflows.
|
|
155
|
-
- Runtime data belongs in execution records/context, not in the definition YAML.
|
|
156
|
-
- New workflow node types should be registry-driven from day one.
|
|
157
|
-
- JSON fields are processed in memory to keep the workflow engine DB agnostic.
|
|
158
|
-
- Revisions/version tables are deferred; version/checksum fields are sufficient for now.
|
|
159
|
-
|
|
160
|
-
## Recent Verification
|
|
161
|
-
|
|
162
|
-
The following has passed after the latest workflow-related changes:
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
npm run build
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Run it from:
|
|
169
|
-
|
|
170
|
-
```text
|
|
171
|
-
/Users/harishpatel/Code/javascript/solid-core-module
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Moved Design Docs
|
|
175
|
-
|
|
176
|
-
The original design docs are now under this folder:
|
|
177
|
-
|
|
178
|
-
```text
|
|
179
|
-
docs/workflow
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Key docs include:
|
|
183
|
-
|
|
184
|
-
- `what-is-kestra.md`
|
|
185
|
-
- `kestra-concepts-plugins-blueprints.md`
|
|
186
|
-
- `workflow-module-brd.md`
|
|
187
|
-
- `workflow-module-technical-spec.md`
|
|
188
|
-
- `workflow-module-domain-model.md`
|
|
189
|
-
- `workflow-module-metadata-dsl.md`
|
|
190
|
-
- `workflow-node-type-contracts.md`
|
|
191
|
-
- `workflow-solidx-model-field-spec.md`
|
|
@@ -1,185 +0,0 @@
|
|
|
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?
|
|
@@ -1,252 +0,0 @@
|
|
|
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?
|