Skip to content

Documentation

Visual Workflow Engine

Complete guide to building and managing content lifecycles using the visual FSM engine in SveltyCMS.

9/22/2026
3 min read Edit on GitHub

The SveltyCMS Workflow Engine allows you to define complex, non-linear content lifecycles using a visual Finite State Machine (FSM) editor. This ensures strict governance and compliance across multi-stage editorial processes.


πŸ—οΈ Core Concepts

States

A State represents a stage in the content lifecycle (e.g., Draft, Legal Review, Live).

  • Start State: The initial state for all new entries.
  • Terminal States: States from which no further transitions are possible (e.g., Archived).

Transitions

Transitions define the valid paths between states.

  • Triggers: Actions that initiate a move (e.g., β€œSubmit for Review”).
  • Guards: Conditional logic that must pass for a transition to occur (e.g., β€œRequires valid SEO title”).
  • Actions: Automated side effects (e.g., β€œSend notification to Legal team”).

🎨 The Workflow Builder

Located at Config > Workflows, the builder provides a node-based interface for architecting your lifecycles.

Creating a Workflow

  1. Click New Workflow and assign it to a collection.
  2. Add States: Use the canvas to place nodes for each stage.
  3. Connect Nodes: Drag from one state to another to create a transition.
  4. Configure Details: Click a transition to define its label, color, and requirements.

Integration with Content Editor

Once active, the workflow replaces the standard β€œPublish” dropdown in the entry editor with a dynamic Action Hub matching the current state’s valid transitions.


πŸ”’ Governance & Security

Multi-Stage Review Pipeline

SveltyCMS supports non-binary editorial review pipelines beyond standard draft/published toggles:

[Draft] ──> [In Review] ──> [Approved] ──> [Scheduled] ──> [Published]
   β”‚             β”‚               β”‚                              β”‚
   └──<──────────┴───────<───────┴──────────────<───────────────┴──> [Archived]

Standard editorial stages include:

  • draft: Initial authoring and scratch editing.
  • in_review: Submitted for editorial or peer review.
  • approved: Formally approved by editors/legal.
  • scheduled: Queued for automated time-delayed release.
  • published: Live in production and exposed to public readers.
  • archived: Deprecated or unlisted historical content.

Role-Based Transition Gates

Stage changes are gated through the workflow:transition RBAC permission and stage-specific role constraints:

  • Authors can submit content from draft $\to$ in_review.
  • Only Senior Editors or Legal reviewers can transition from in_review $\to$ approved.
  • Publishers can transition from approved $\to$ published.

Immutable Audit Trail & Editorial Comments

Every transition automatically creates an audit history record:

interface WorkflowHistoryEntry {
  transitionId: string;
  fromState: string;
  toState: string;
  performedBy: string; // User ID
  performedAt: ISODateString;
  comment?: string; // Editorial review feedback
}

History can be inspected in the UI or retrieved programmatically:

const history = await cms.workflow.getHistory("articles", "entry_123");

Programmatic SDK Transition

Workflows can be advanced programmatically via the LocalCMS SDK:

const result = await cms.workflow.transition({
  collectionId: "articles",
  entryId: "entry_123",
  targetState: "approved",
  comment: "Legal review completed, approved for release.",
  user: currentUser,
});

Signed Approval Links

For external stakeholders without CMS access, the engine can generate HMAC-signed one-click approval links via the Automation System.


πŸ€– AI & Automation

The Workflow Engine integrates deeply with:

  • Automation System: Automatically trigger workflows based on events.
  • AI Agent: Use the agent to β€œAnalyze and advance” content based on quality checks.

πŸ“š Related Documentation


Related

workflowsfsmautomationgovernance
Was this page helpful?