Sylius Stack
  • Sylius Stack Documentation
  • Getting started
  • Cookbook
    • How to customize your admin panel
      • Basic operations
      • Customizing your grids
      • Customizing the logo
      • Customizing the menu
      • Configuring the security access
      • Customizing the page titles
    • How to use in a DDD architecture
      • Architecture overview
      • Resource configuration
      • Basic operations
      • Operation using a grid
  • Admin UI
    • Getting started
  • Bootstrap Admin UI
    • Getting started
  • Resource
    • Resource Bundle documentation
      • Installation
      • Create new resource
      • Configure your resource
      • Configure your operations
      • Validation
      • Redirect
      • Resource factories
      • Providers
      • Processors
      • Responders
      • Legacy Resource Documentation
        • Configuration
        • Services
        • Routing
        • Forms
        • Getting a Single Resource
        • Getting a Collection of Resources
        • Creating Resources
        • Updating Resources
        • Deleting Resources
        • Configuring a state machine
        • Configuration Reference
  • Grid
    • Grid Bundle documentation
      • Installation
      • Creating your first grid
      • Configuring Fields
      • Field types
      • Creating a custom Field Type
      • Creating a custom Action
      • Creating a custom Bulk Action
      • Filters
      • Creating a custom Filter
      • Advanced configuration
      • Configuration Reference
  • 🍀Twig Extra
    • Getting started
  • 🌱Twig Hooks
    • Getting started
    • Passing data to your hookables
    • Making your hookables configurable
    • Autoprefixing feature
    • Composable Layouts with a predictable structure
    • Advanced
      • Ergonomic work with hooks
      • Metadata objects
      • Multiple hooks inside a single template
      • Overriding hookables
Powered by GitBook
On this page
  • Configuring Symfony workflow as state machine`
  • Configuring Winzou as state machine`
  • Applying a transition`
  1. Resource
  2. Resource Bundle documentation
  3. Legacy Resource Documentation

Configuring a state machine

PreviousDeleting ResourcesNextConfiguration Reference

Last updated 4 months ago

This section is deprecated. However, as of now, the Sylius E-Commerce project is still resorting to this configuration so you might want to check it out.

You can either use or . The recommended way is to use the Symfony workflow component.

If only Symfony workflow is on your requirements you have nothing to do.

But you can configure it explicitly:

Configuring Symfony workflow as state machine`

sylius_resource:
    settings:
        state_machine_component: symfony

Configuring Winzou as state machine`

If Winzou state machine is on your requirements you have nothing to do even if Symfony workflow is on your requirements too.

But you can configure it explicitly:

sylius_resource:
    settings:
        state_machine_component: winzou

Applying a transition`

You can create a route to apply any transition

app_pull_request_apply_transition:
    path: /pull-requests/{id}/{transition}
    methods: [PUT]
    defaults:
        _controller: app.controller.pull_request:applyStateMachineTransitionAction
        _sylius:
            state_machine:
                #graph: pull_request # name of the graph for Winzou or workflow name for Symfony (optional)
                transition: $transition
Symfony workflow
Winzou state machine