Skip to content

Commit 30fdd17

Browse files
committed
minor #9220 [Workflow] PlantUML Dump documentation (Plopix)
This PR was submitted for the 4.0 branch but it was merged into the master branch instead (closes #9220). Discussion ---------- [Workflow] PlantUML Dump documentation Documentation related to symfony/symfony#24705 This PR aims to explain that the PlantUML dump format is available. Platform.sh URL: http://pr-9220-x7nzdnq-6qmocelev2lwe.eu.platform.sh/workflow/dumping-workflows.html Commits ------- b62d961 [Workflow] PlantUML Dump documentation
2 parents 951cb87 + b62d961 commit 30fdd17

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed
15.6 KB
Loading

workflow/dumping-workflows.rst

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,56 @@ How to Dump Workflows
55
=====================
66

77
To help you debug your workflows, you can dump a representation of your workflow
8-
with the use of a ``DumperInterface``. Use the ``GraphvizDumper`` to create a
9-
PNG image of the workflow defined above::
8+
or state machine with the use of a ``DumperInterface``. Symfony provides 2
9+
different dumpers both based on Dot.
1010

11-
// dump-graph.php
11+
Use the ``GraphvizDumper`` or ``StateMachineGraphvizDumper`` to create DOT
12+
files, or use ``PlantUmlDumper`` for PlantUML files. Both types can be converted
13+
to PNG images.
14+
15+
Images of the workflow defined above:
16+
17+
.. code-block:: php
18+
19+
// dump-graph-dot.php
1220
$dumper = new GraphvizDumper();
1321
echo $dumper->dump($definition);
1422
23+
.. code-block:: php
24+
25+
// dump-graph-puml.php
26+
$dumper = new PlantUmlDumper();
27+
echo $dumper->dump($definition);
28+
1529
.. code-block:: terminal
1630
17-
$ php dump-graph.php | dot -Tpng -o graph.png
31+
$ php dump-graph-dot.php | dot -Tpng -o dot_graph.png
32+
$ php dump-graph-puml.php | java -jar plantuml.jar -p > puml_graph.png
1833
19-
The result will look like this:
34+
The DOT result will look like this:
2035

2136
.. image:: /_images/components/workflow/blogpost.png
2237

23-
Inside a Symfony application, you can dump the dot file with the
38+
The PUML result:
39+
40+
.. image:: /_images/components/workflow/blogpost_puml.png
41+
42+
Inside a Symfony application, you can dump the files with those commands using
2443
``workflow:dump`` command:
2544

2645
.. code-block:: terminal
2746
2847
$ php bin/console workflow:dump name | dot -Tpng -o graph.png
48+
$ php bin/console workflow:dump name --dump-format=puml | java -jar plantuml.jar -p > workflow.png
2949
3050
.. note::
3151

3252
The ``dot`` command is part of Graphviz. You can download it and read
3353
more about it on `Graphviz.org`_.
3454

55+
The ``plantuml.jar`` command is part of PlantUML. You can download it and
56+
read more about it on `PlantUML.com`_.
57+
58+
3559
.. _Graphviz.org: http://www.graphviz.org
60+
.. _PlantUML.com: http://plantuml.com/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy