I've patched workflow-4.7.x-1.0 to add a "graph" action to the workflow settings page. This action generates a Graphviz DOT file representing the states as nodes and transitions as edges, with edge labels describing the roles performing the transitions. The function then invokes the Graphviz `dot` command to generate a PNG image of the graph. The function uses a PHP class that encapsulates the Graphviz generation, taken from the Mantis bug tracker (which is also GPL'd).
Some installation notes:
* On Linux, Graphviz must be installed and its commands must be on the PATH for the Apache user.
* On Windows, the WinGraphviz.DOT COM object must be installed and registered.
Hope somebody fins this useful. Your feedback is appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | workflow-graph.png | 33.68 KB | infojunkie |
| #2 | php_api.php_.txt | 1.51 KB | infojunkie |
| #1 | workflow.patch_.txt | 4.65 KB | infojunkie |
| graphviz_api.php_.txt | 14.07 KB | infojunkie |
Comments
Comment #1
infojunkieComment #2
infojunkieComment #3
infojunkieComment #4
m3avrck commented"This thread is worthless without pics" :-)
Any screenshots of this in action? Would make it even more compelling to help test this patch ;-)
Comment #5
infojunkieHere is a screenshot.
NOTE: To see the additional "graph" verb in the workflow settings page, it is necessary to disable the workflow module then re-enable it. That's because 2 new menu items are added to workflow_menu.
Comment #6
m3avrck commentedOooh wow, that's awesome! Much easier than reading a bunch of radio buttons in a grid :-)
Comment #7
infojunkieI've created a workflow_graph module for 5.1 that performs this functionality (http://drupal.org/project/workflow_graph), making this patch obsolete. However, for the graph module to be truly integrated into workflow, it still needs this new patch (http://drupal.org/node/161190) ;-)