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
4 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.
  • Corporate Governance & Alignment Guard: Automated policy auditing before allowing transitions into approved, scheduled, or published states.

Multi-Platform Corporate Alignment Guard

In multi-tenant or multi-platform environments, content must comply with corporate guidelines, brand tone, and regional legal standards before going live:

import { workflowAlignmentGuard } from "@src/services/intelligence/multiplatform-syndication";

// Automated pre-transition check
const { allow, reason, report } = await workflowAlignmentGuard({
  collectionId: "articles",
  entryId: "entry_123",
  targetState: "approved",
  minScore: 80, // Minimum acceptable score out of 100
});

if (!allow) {
  // Rejects transition and records violations in the editorial review history
  throw new AppError(reason, 400, "ALIGNMENT_VIOLATION");
}

What the Guard Evaluates (<2ms execution):

  1. Regulatory Compliance: Flags unsupported superlative claims under EU UWG §6 (“the best”, “unbeatable”) and missing regional legal disclosures.
  2. Fair Competition: Prevents discrediting competitor remarks (“broken”, “inferior”).
  3. Terminology Consistency: Enforces corporate product names, trademark symbols, and casing.
  4. Platform Formats: Validates title and body length limits for specific channels (e.g. Mobile $\le 60$ char titles, Kiosk $\le 350$ char plain-text).

📚 Related Documentation


Related

workflowsfsmautomationgovernance
Was this page helpful?