Skip to content

How to Dump Workflows

Mostafa Barmshory edited this page Feb 22, 2017 · 2 revisions

To help you debug your workflows visually, 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
 $wf = new Workflow_Machine();
 ...
 echo $wf->dumb('graphviz');

and convert it to a *.png file.

 php dump-graph.php > out.dot
 dot -Tpng out.dot -o graph.png

The result will look like this:

graphviz state machine

Clone this wiki locally