composition.save ​
Validate, compile and persist a reusable virtual workflow composition
Persist a new version of a virtual workflow composition.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-composition |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
name | string | Yes | — | Human lineage name; (org, name, version) is unique |
definition | dict | Yes | — | Serializer-dialect VirtualWorkflow {name, layers:[{steps:[...]}]} |
description | string | No | — | — |
created_by_uuid | uuid | No | — | — |
tags | list | No | — | — |
source_session_uuid | uuid | No | — | REPLICATE provenance — the DGI session this reproduces |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
composition_uuid | uuid | Yes | — | — |
lineage_uuid | uuid | No | — | Stable lineage handle, carried across every version (ticket 142b6295) |
superseded_versions | list | No | — | Prior active lineage versions archived by this write |
workflow_type | string | Yes | — | — |
version | integer | Yes | — | — |
status | string | Yes | — | — |
validation_passed | boolean | Yes | — | — |
validation_errors | list | No | — | — |
validation_warnings | list | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Validate + compile + persist composition |
completed | No | Yes | Yes | — | Saved |
failed | No | Yes | No | — | Save failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "composition.save",
"initial_data": {
"organization_uuid": "value",
"name": "value",
"definition": "value"
}
}