← Zurück zu CRM-Systembauer
Entdecke, wie der Skill hilft
Workflowzustände modellieren
Trennt Ablaufbedeutung, Canvaslayout und Ausführungshistorie in ausdrücklich versionierte Modelle und Zustandsübergänge.
workflow-semantics-state-modeling
Teammitglieder mit diesem Skill
Wann ist der Skill hilfreich?
Nutze dies bei versehentlichen Laufänderungen durch Diagrammbearbeitung.
Wobei hilft er dir?
- Unterscheidet Definitionen und Versionen von visuellen Positionen.
- Definiert Schritteingaben, Ausgaben und Registerkompatibilität.
- Modelliert Läufe, Versuche und erlaubte Übergänge getrennt.
Das könntest du fragen
Plane umsortierbares Workflowlayout bei weiterlaufender Ausführung auf ihrer ursprünglichen veröffentlichten Version. Verschiebe Knoten und veröffentliche einen geänderten Schritt bei wartendem Altlauf. Dieser setzt mit ursprünglichem Vertrag und versionierten Eingaben fort.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Workflow Semantics & State Modeling
Use this skill when designing or implementing workflow data models, step contracts, execution state machines, and the boundary between visual graph editors and execution engines.
The Three-Layer Separation Principle
Never conflate a workflow's executable logic, its visual diagram layout, and its live runs:
- Workflow Definition (
WorkflowDefinition&WorkflowVersion):- The immutable, versioned directed graph of nodes (
nodeId,stepType,typeVersion,config,credentialRefIds), typed ports, control-flow edges, and data-mapping expressions.
- The immutable, versioned directed graph of nodes (
- Visual Canvas Layout (
WorkflowLayout/ Viewport Metadata):- Node coordinates
(x, y), dimensions, collapsed groups, zoom/pan camera state, and visual annotations. Moving a node by 50 pixels on the canvas must never alter execution semantics or force a breaking runtime change.
- Node coordinates
- Execution Instance (
WorkflowRun,StepExecution,StepAttempt):- A specific runtime invocation pinned to an immutable
workflowVersionIdwith its ownrunId, tenant/actor context, input payload, current node token states, step outputs, wait timers, and attempt history. - Editing or saving a draft on the canvas must never mutate the definition or behavior of an already started
WorkflowRun.
- A specific runtime invocation pinned to an immutable
Versioned Step Registry & Explicit Contracts
- Maintain a versioned Step Type Catalog where every step type declares:
- Input Schema: Required/optional typed parameters and allowed upstream expression bindings.
- Config Schema: Static configuration fields and secret reference slots (never raw plaintext secrets in the definition JSON).
- Output Schema: Deterministic output structure per outcome port (
success,branch_true,branch_false,timeout,error). - Execution Semantics: Sync vs. async/waiting, idempotency behavior, timeout defaults, retry eligibility, and side-effect classification (pure transform vs. external mutation).
- Separate Control-Flow Edges (determining when a downstream node is activated) from Data-Flow Bindings (determining where a step reads its inputs from upstream outputs or run context).
Explicit Run and Step State Machines (Lamport)
Model distinct lifecycle states for both runs and steps:
- Run States:
pending$\to$running$\leftrightarrow$waiting(timer / external event / human approval) $\to$completed|failed|cancelling$\to$cancelled. - Step Execution States:
pending,ready,running,waiting,succeeded,failed,skipped(dead-path eliminated on unchosen branch),cancelled,compensated.
Checklist
- Are the executable workflow definition, visual canvas coordinates, and runtime execution state stored as distinct structures?
- Is every
WorkflowRunpinned to an immutableworkflowVersionIdso live edits never corrupt in-flight runs? - Does every step type declare explicit input, configuration, and output schemas plus secret reference IDs?
- Do step states clearly distinguish
skipped(unchosen branch),waiting,running,succeeded,failed, andcancelled?
Enthaltene Dateien 1
SKILL.md
