dgi.workflow.promote ​
Promote a DGI-compiled plan to a durable, versioned composition via the existing composition.save primitive (member build-time; no end-user path).
Promote a DGI-compiled plan to a durable composition via composition.save.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-dgi |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization UUID the composition is scoped to. |
actor | string | No | — | Authoring member/service actor. |
plan | json | No | — | The DGI-compiled plan to promote (generator or serializer dialect). |
virtual_workflow | json | No | — | Alias for the compiled plan (the reasoning DAG state key). |
name | string | No | — | Human lineage name; defaults to the plan name. |
description | string | No | — | Optional human description for the saved composition. |
created_by_uuid | uuid | No | — | Authoring member UUID (provenance). |
confirm | boolean | No | — | Required True to promote a plan that contains state-modifying steps. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
status | string | No | — | Terminal status. |
composition_uuid | string | No | — | Saved composition UUID (absent when confirmation is required). |
workflow_type | string | No | — | Runnable virtual.<uuid>@<version> type for the start boundary. |
version | json | No | — | Saved version. |
validation_passed | boolean | No | — | Whether composition.save validated the definition. |
validation_errors | list | No | — | Validation errors. |
validation_warnings | list | No | — | Validation warnings. |
state_modifying | list | No | — | Distinct state-modifying workflow_types detected in the plan. |
requires_confirmation | boolean | No | — | True when the plan was gated pending an explicit confirm flag. |
summary | json | No | — | Plan summary. |
failure_reason | string | No | — | Failure reason. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
failed_at | string | No | — | Failure timestamp. |
failed_at_state | string | No | — | State the workflow was in when it failed. |
failed_layer | string | No | — | Engine-stamped layer index (DAG path). |
failed_step | string | No | — | Engine-stamped step name (DAG path). |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
PENDING | Yes | No | — | execute | — |
COMPLETED | No | Yes | Yes | — | — |
FAILED | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
PENDING | execute | COMPLETED | — |
* (any state) | fail | FAILED | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "dgi.workflow.promote",
"initial_data": {
"organization_uuid": "value"
}
}