Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 988 Bytes

dumping-workflows.rst

File metadata and controls

37 lines (24 loc) · 988 Bytes
.. index::
    single: Workflow; Dumping Workflows

How to Dump Workflows

To help you debug your workflows, you can dump a representation of your workflow with the use of a DumperInterface. Use the GraphvizDumper to create a PNG image of the workflow defined above:

// dump-graph.php
$dumper = new GraphvizDumper();
echo $dumper->dump($definition);
$ php dump-graph.php > out.dot
$ dot -Tpng out.dot -o graph.png

The result will look like this:

/_images/components/workflow/blogpost.png

If you have configured your workflow with the Symfony framework, you may dump the dot file with the WorkflowDumpCommand:

$ php bin/console workflow:dump name > out.dot
$ dot -Tpng out.dot -o graph.png

Note

The dot command is part of Graphviz. You can download it and read more about it on Graphviz.org.