April 10, 2026guidesymfony

Getting Started with Symfony Workflows

What is a Symfony Workflow?

The Symfony Workflow component lets you define a set of places (states) and transitions (actions that move between states). It is used to model business processes like order fulfillment, content publishing, or approval flows.

Key Concepts

Places

Places represent the possible states your entity can be in:

places: [draft, submitted, approved, rejected, published]

Transitions

Transitions define how to move between places:

transitions:
    submit:
        from: draft
        to: submitted
    approve:
        from: submitted
        to: approved

Marking Store

The marking store determines how the current state is persisted on your entity:

marking_store:
    type: method
    property: currentState

This means your entity needs a getCurrentState() and setCurrentState() method.

Guards

Guards are expressions that control when a transition is allowed:

transitions:
    approve:
        from: submitted
        to: approved
        guard: 'is_granted("ROLE_ADMIN")'

Building Your First Workflow with SymFlowBuilder

  1. Open the editor at symflowbuilder.com/editor
  2. Drag a state node from the palette
  3. Draw an edge to create a transition
  4. Set one state as initial in the properties panel
  5. Configure the workflow type and Symfony version
  6. Click Export YAML — done!