feature #24705 [Workflow] Add PlantUML dumper to workflow:dump command (Plopix)
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Add PlantUML dumper to workflow:dump command
| Q | A
| ------------- | ---
| Branch | 4.1
| Bug fix | no
| New feature | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | Will do depending on the comments about that PR
Hello,
`workflow:dump` exports workflows in `dot` format. To me, this format is not the easiest and not the simplest to use. Styles and logic are mixed together which makes it hard to read.
[PlantUML](http://plantuml.com/) is a tool based on Graphviz like Dot but that
generates nicer diagrams, more readable and most of all easier to adapt to your
documentation. Just copy and paste the PUML on the website you will see the rendering live.
Also, there is a [PHPStorm Plugin](https://plugins.jetbrains.com/plugin/7017-plantuml-integration) and [plenty of integration](http://plantuml.com/running) of this format.
This PR adds 2 options
* a `--dump-format=puml` option to the `workflow:dump` command to generate the workflows in PlantUML.
* a `--puml-transition-format=square|arrow` option to the `workflow:dump` command to generate the workflows in PlantUML using a square shape or arrow for the transition. (see below)
The conversion requires the PlantUML JAR, and can be used like that:
```bash
php bin/console workflow:dump pull_request --dump-format=puml | java -jar plantuml.jar -p > workflow.png
```
> don't forget the `-p` to enable the "piping"
Here is an example with `pull_request` workflow of the documentation (with no style and no marking):
```
@startuml
title pull_request
state start <<initial>>
state coding
state travis
state review
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
@enduml
```
As PlantUML let us define styles, I have provided some by default that the user can override.
Adding some marking:
```bash
php bin/console workflow:dump pull_request travis review --dump-format=puml
```
will give us:
```
@startuml
sprite $sf_logo [81x20/16z] {
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
}
title pull_request
skinparam titleBorderRoundCorner 15
skinparam titleBorderThickness 2
skinparam state {
BackgroundColor<<initial>> #87b741
BackgroundColor<<marked>> #3887C6
BorderColor #3887C6
BorderColor<<marked>> Black
FontColor<<marked>> White
}
state start <<initial>>
state coding
state travis <<marked>>
state review <<marked>>
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
@enduml
```
Which gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32086584-253e39c0-ba8b-11e7-82c7-fa24309dbcd6.png)
With `square` as transition, it gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32533123-a8ea4530-c403-11e7-8f88-4f18d5e23a28.png)
Hope you will find that interesting!
Commits
-------
1497d36cab
Add option to the workflow:dump command to allow PlantUML format dump
This commit is contained in:
commit
0c128f8d3c
@ -17,6 +17,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
|||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
|
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
|
||||||
|
use Symfony\Component\Workflow\Dumper\PlantUmlDumper;
|
||||||
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
|
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
|
||||||
use Symfony\Component\Workflow\Marking;
|
use Symfony\Component\Workflow\Marking;
|
||||||
|
|
||||||
@ -39,13 +40,15 @@ class WorkflowDumpCommand extends Command
|
|||||||
new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'),
|
new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'),
|
||||||
new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'),
|
new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'),
|
||||||
new InputOption('label', 'l', InputArgument::OPTIONAL, 'Labels a graph'),
|
new InputOption('label', 'l', InputArgument::OPTIONAL, 'Labels a graph'),
|
||||||
|
new InputOption('dump-format', null, InputOption::VALUE_REQUIRED, 'The dump format [dot|puml]', 'dot'),
|
||||||
))
|
))
|
||||||
->setDescription('Dump a workflow')
|
->setDescription('Dump a workflow')
|
||||||
->setHelp(<<<'EOF'
|
->setHelp(<<<'EOF'
|
||||||
The <info>%command.name%</info> command dumps the graphical representation of a
|
The <info>%command.name%</info> command dumps the graphical representation of a
|
||||||
workflow in DOT format
|
workflow in different formats
|
||||||
|
|
||||||
%command.full_name% <workflow name> | dot -Tpng > workflow.png
|
<info>DOT</info>: %command.full_name% <workflow name> | dot -Tpng > workflow.png
|
||||||
|
<info>PUML</info>: %command.full_name% <workflow name> --dump-format=puml | java -jar plantuml.jar -p > workflow.png
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@ -59,16 +62,27 @@ EOF
|
|||||||
{
|
{
|
||||||
$container = $this->getApplication()->getKernel()->getContainer();
|
$container = $this->getApplication()->getKernel()->getContainer();
|
||||||
$serviceId = $input->getArgument('name');
|
$serviceId = $input->getArgument('name');
|
||||||
|
|
||||||
if ($container->has('workflow.'.$serviceId)) {
|
if ($container->has('workflow.'.$serviceId)) {
|
||||||
$workflow = $container->get('workflow.'.$serviceId);
|
$workflow = $container->get('workflow.'.$serviceId);
|
||||||
$dumper = new GraphvizDumper();
|
$type = 'workflow';
|
||||||
} elseif ($container->has('state_machine.'.$serviceId)) {
|
} elseif ($container->has('state_machine.'.$serviceId)) {
|
||||||
$workflow = $container->get('state_machine.'.$serviceId);
|
$workflow = $container->get('state_machine.'.$serviceId);
|
||||||
$dumper = new StateMachineGraphvizDumper();
|
$type = 'state_machine';
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $serviceId));
|
throw new \InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $serviceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('puml' === $input->getOption('dump-format')) {
|
||||||
|
$dumper = new PlantUmlDumper(
|
||||||
|
'workflow' === $type ? PlantUmlDumper::WORKFLOW_TRANSITION : PlantUmlDumper::STATEMACHINE_TRANSITION
|
||||||
|
);
|
||||||
|
} elseif ('workflow' === $type) {
|
||||||
|
$dumper = new GraphvizDumper();
|
||||||
|
} else {
|
||||||
|
$dumper = new StateMachineGraphvizDumper();
|
||||||
|
}
|
||||||
|
|
||||||
$marking = new Marking();
|
$marking = new Marking();
|
||||||
|
|
||||||
foreach ($input->getArgument('marking') as $place) {
|
foreach ($input->getArgument('marking') as $place) {
|
||||||
@ -80,6 +94,7 @@ EOF
|
|||||||
if (null !== $label && '' !== trim($label)) {
|
if (null !== $label && '' !== trim($label)) {
|
||||||
$options = array('graph' => array('label' => $label));
|
$options = array('graph' => array('label' => $label));
|
||||||
}
|
}
|
||||||
|
$options = array_replace($options, array('name' => $serviceId, 'nofooter' => true));
|
||||||
$output->writeln($dumper->dump($workflow->getDefinition(), $marking, $options));
|
$output->writeln($dumper->dump($workflow->getDefinition(), $marking, $options));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
172
src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php
Normal file
172
src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\Workflow\Dumper;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
use Symfony\Component\Workflow\Definition;
|
||||||
|
use Symfony\Component\Workflow\Marking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PlantUmlDumper dumps a workflow as a PlantUML file.
|
||||||
|
*
|
||||||
|
* You can convert the generated puml file with the plantuml.jar utility (http://plantuml.com/):
|
||||||
|
*
|
||||||
|
* php bin/console workflow:dump pull_request travis --dump-format=puml | java -jar plantuml.jar -p > workflow.png
|
||||||
|
*
|
||||||
|
* @author Sébastien Morel <morel.seb@gmail.com>
|
||||||
|
*/
|
||||||
|
class PlantUmlDumper implements DumperInterface
|
||||||
|
{
|
||||||
|
private const SYMFONY_LOGO = 'sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}';
|
||||||
|
private const INITIAL = 'initial';
|
||||||
|
private const MARKED = 'marked';
|
||||||
|
|
||||||
|
const STATEMACHINE_TRANSITION = 'arrow';
|
||||||
|
const WORKFLOW_TRANSITION = 'square';
|
||||||
|
const TRANSITION_TYPES = array(self::STATEMACHINE_TRANSITION, self::WORKFLOW_TRANSITION);
|
||||||
|
const DEFAULT_OPTIONS = array(
|
||||||
|
'skinparams' => array(
|
||||||
|
'titleBorderRoundCorner' => 15,
|
||||||
|
'titleBorderThickness' => 2,
|
||||||
|
'state' => array(
|
||||||
|
'BackgroundColor<<'.self::INITIAL.'>>' => '#87b741',
|
||||||
|
'BackgroundColor<<'.self::MARKED.'>>' => '#3887C6',
|
||||||
|
'BorderColor' => '#3887C6',
|
||||||
|
'BorderColor<<'.self::MARKED.'>>' => 'Black',
|
||||||
|
'FontColor<<'.self::MARKED.'>>' => 'White',
|
||||||
|
),
|
||||||
|
'agent' => array(
|
||||||
|
'BackgroundColor' => '#ffffff',
|
||||||
|
'BorderColor' => '#3887C6',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
private $transitionType = self::STATEMACHINE_TRANSITION;
|
||||||
|
|
||||||
|
public function __construct(string $transitionType = null)
|
||||||
|
{
|
||||||
|
if (!in_array($transitionType, self::TRANSITION_TYPES)) {
|
||||||
|
throw new InvalidArgumentException("Transition type '{$transitionType}' does not exist.");
|
||||||
|
}
|
||||||
|
$this->transitionType = $transitionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dump(Definition $definition, Marking $marking = null, array $options = array()): string
|
||||||
|
{
|
||||||
|
$options = array_replace_recursive(self::DEFAULT_OPTIONS, $options);
|
||||||
|
$code = $this->initialize($options);
|
||||||
|
foreach ($definition->getPlaces() as $place) {
|
||||||
|
$code[] =
|
||||||
|
"state {$place}".
|
||||||
|
($definition->getInitialPlace() === $place ? ' <<'.self::INITIAL.'>>' : '').
|
||||||
|
($marking && $marking->has($place) ? ' <<'.self::MARKED.'>>' : '');
|
||||||
|
}
|
||||||
|
if ($this->isWorkflowTransitionType()) {
|
||||||
|
foreach ($definition->getTransitions() as $transition) {
|
||||||
|
$code[] = "agent {$transition->getName()}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($definition->getTransitions() as $transition) {
|
||||||
|
foreach ($transition->getFroms() as $from) {
|
||||||
|
foreach ($transition->getTos() as $to) {
|
||||||
|
if ($this->isWorkflowTransitionType()) {
|
||||||
|
$lines = array(
|
||||||
|
"{$from} --> {$transition->getName()}",
|
||||||
|
"{$transition->getName()} --> {$to}",
|
||||||
|
);
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
if (!in_array($line, $code)) {
|
||||||
|
$code[] = $line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$code[] = "{$from} --> {$to}: {$transition->getName()}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->startPuml($options).$this->getLines($code).$this->endPuml($options);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isWorkflowTransitionType(): bool
|
||||||
|
{
|
||||||
|
return self::WORKFLOW_TRANSITION === $this->transitionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function startPuml(array $options): string
|
||||||
|
{
|
||||||
|
$start = '@startuml'.PHP_EOL;
|
||||||
|
|
||||||
|
if ($this->isWorkflowTransitionType()) {
|
||||||
|
$start .= 'allow_mixing'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($options['nofooter'] ?? false) {
|
||||||
|
return $start;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $start.self::SYMFONY_LOGO.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function endPuml(array $options): string
|
||||||
|
{
|
||||||
|
$end = PHP_EOL.'@enduml';
|
||||||
|
if ($options['nofooter'] ?? false) {
|
||||||
|
return $end;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PHP_EOL.'footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**'.$end;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getLines(array $code): string
|
||||||
|
{
|
||||||
|
return implode(PHP_EOL, $code);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function initialize(array $options): array
|
||||||
|
{
|
||||||
|
$code = array();
|
||||||
|
if (isset($options['title'])) {
|
||||||
|
$code[] = "title {$options['title']}";
|
||||||
|
}
|
||||||
|
if (isset($options['name'])) {
|
||||||
|
$code[] = "title {$options['name']}";
|
||||||
|
}
|
||||||
|
if (isset($options['skinparams']) && is_array($options['skinparams'])) {
|
||||||
|
foreach ($options['skinparams'] as $skinparamKey => $skinparamValue) {
|
||||||
|
if (!$this->isWorkflowTransitionType() && 'agent' === $skinparamKey) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!is_array($skinparamValue)) {
|
||||||
|
$code[] = "skinparam {$skinparamKey} $skinparamValue";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$code[] = "skinparam {$skinparamKey} {";
|
||||||
|
foreach ($skinparamValue as $key => $value) {
|
||||||
|
$code[] = " {$key} $value";
|
||||||
|
}
|
||||||
|
$code[] = '}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $code;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\Workflow\Tests\Dumper;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Symfony\Component\Workflow\Dumper\DumperInterface;
|
||||||
|
use Symfony\Component\Workflow\Dumper\PlantUmlDumper;
|
||||||
|
use Symfony\Component\Workflow\Marking;
|
||||||
|
use Symfony\Component\Workflow\Tests\WorkflowBuilderTrait;
|
||||||
|
|
||||||
|
class PlantUmlDumperTest extends TestCase
|
||||||
|
{
|
||||||
|
use WorkflowBuilderTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var DumperInterface[]
|
||||||
|
*/
|
||||||
|
private $dumpers;
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
$this->dumpers =
|
||||||
|
array(
|
||||||
|
PlantUmlDumper::STATEMACHINE_TRANSITION => new PlantUmlDumper(PlantUmlDumper::STATEMACHINE_TRANSITION),
|
||||||
|
PlantUmlDumper::WORKFLOW_TRANSITION => new PlantUmlDumper(PlantUmlDumper::WORKFLOW_TRANSITION),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider provideWorkflowDefinitionWithoutMarking
|
||||||
|
*/
|
||||||
|
public function testDumpWithoutMarking($definition, $expectedFileName, $title, $nofooter)
|
||||||
|
{
|
||||||
|
foreach ($this->dumpers as $transitionType => $dumper) {
|
||||||
|
$dump = $dumper->dump($definition, null, array('title' => $title, 'nofooter' => $nofooter));
|
||||||
|
// handle windows, and avoid to create more fixtures
|
||||||
|
$dump = str_replace(PHP_EOL, "\n", $dump.PHP_EOL);
|
||||||
|
$this->assertStringEqualsFile($this->getFixturePath($expectedFileName, $transitionType), $dump);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider provideWorkflowDefinitionWithMarking
|
||||||
|
*/
|
||||||
|
public function testDumpWithMarking($definition, $marking, $expectedFileName, $title, $footer)
|
||||||
|
{
|
||||||
|
foreach ($this->dumpers as $transitionType => $dumper) {
|
||||||
|
$dump = $dumper->dump($definition, $marking, array('title' => $title, 'nofooter' => $footer));
|
||||||
|
// handle windows, and avoid to create more fixtures
|
||||||
|
$dump = str_replace(PHP_EOL, "\n", $dump.PHP_EOL);
|
||||||
|
$this->assertStringEqualsFile($this->getFixturePath($expectedFileName, $transitionType), $dump);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function provideWorkflowDefinitionWithoutMarking()
|
||||||
|
{
|
||||||
|
$title = 'SimpleDiagram';
|
||||||
|
yield array($this->createSimpleWorkflowDefinition(), 'simple-workflow-nomarking-nofooter', $title, true);
|
||||||
|
yield array($this->createSimpleWorkflowDefinition(), 'simple-workflow-nomarking', $title, false);
|
||||||
|
$title = 'ComplexDiagram';
|
||||||
|
yield array($this->createComplexWorkflowDefinition(), 'complex-workflow-nomarking-nofooter', $title, true);
|
||||||
|
yield array($this->createComplexWorkflowDefinition(), 'complex-workflow-nomarking', $title, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function provideWorkflowDefinitionWithMarking()
|
||||||
|
{
|
||||||
|
$title = 'SimpleDiagram';
|
||||||
|
$marking = new Marking(array('b' => 1));
|
||||||
|
yield array(
|
||||||
|
$this->createSimpleWorkflowDefinition(), $marking, 'simple-workflow-marking-nofooter', $title, true,
|
||||||
|
);
|
||||||
|
yield array(
|
||||||
|
$this->createSimpleWorkflowDefinition(), $marking, 'simple-workflow-marking', $title, false,
|
||||||
|
);
|
||||||
|
$title = 'ComplexDiagram';
|
||||||
|
$marking = new Marking(array('c' => 1, 'e' => 1));
|
||||||
|
yield array(
|
||||||
|
$this->createComplexWorkflowDefinition(), $marking, 'complex-workflow-marking-nofooter', $title, true,
|
||||||
|
);
|
||||||
|
yield array(
|
||||||
|
$this->createComplexWorkflowDefinition(), $marking, 'complex-workflow-marking', $title, false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getFixturePath($name, $transitionType)
|
||||||
|
{
|
||||||
|
return __DIR__.'/../fixtures/puml/'.$transitionType.'/'.$name.'.puml';
|
||||||
|
}
|
||||||
|
}
|
27
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-marking-nofooter.puml
vendored
Normal file
27
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-marking-nofooter.puml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
@startuml
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c <<marked>>
|
||||||
|
state d
|
||||||
|
state e <<marked>>
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
a --> b: t1
|
||||||
|
a --> c: t1
|
||||||
|
b --> d: t2
|
||||||
|
c --> d: t2
|
||||||
|
d --> e: t3
|
||||||
|
d --> f: t4
|
||||||
|
e --> g: t5
|
||||||
|
f --> g: t6
|
||||||
|
@enduml
|
36
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-marking.puml
vendored
Normal file
36
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-marking.puml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
@startuml
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c <<marked>>
|
||||||
|
state d
|
||||||
|
state e <<marked>>
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
a --> b: t1
|
||||||
|
a --> c: t1
|
||||||
|
b --> d: t2
|
||||||
|
c --> d: t2
|
||||||
|
d --> e: t3
|
||||||
|
d --> f: t4
|
||||||
|
e --> g: t5
|
||||||
|
f --> g: t6
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
@ -0,0 +1,27 @@
|
|||||||
|
@startuml
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
state d
|
||||||
|
state e
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
a --> b: t1
|
||||||
|
a --> c: t1
|
||||||
|
b --> d: t2
|
||||||
|
c --> d: t2
|
||||||
|
d --> e: t3
|
||||||
|
d --> f: t4
|
||||||
|
e --> g: t5
|
||||||
|
f --> g: t6
|
||||||
|
@enduml
|
36
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-nomarking.puml
vendored
Normal file
36
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/complex-workflow-nomarking.puml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
@startuml
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
state d
|
||||||
|
state e
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
a --> b: t1
|
||||||
|
a --> c: t1
|
||||||
|
b --> d: t2
|
||||||
|
c --> d: t2
|
||||||
|
d --> e: t3
|
||||||
|
d --> f: t4
|
||||||
|
e --> g: t5
|
||||||
|
f --> g: t6
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
17
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-marking-nofooter.puml
vendored
Normal file
17
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-marking-nofooter.puml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@startuml
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b <<marked>>
|
||||||
|
state c
|
||||||
|
a --> b: t1
|
||||||
|
b --> c: t2
|
||||||
|
@enduml
|
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-marking.puml
vendored
Normal file
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-marking.puml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@startuml
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b <<marked>>
|
||||||
|
state c
|
||||||
|
a --> b: t1
|
||||||
|
b --> c: t2
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
17
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-nomarking-nofooter.puml
vendored
Normal file
17
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-nomarking-nofooter.puml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@startuml
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
a --> b: t1
|
||||||
|
b --> c: t2
|
||||||
|
@enduml
|
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-nomarking.puml
vendored
Normal file
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/arrow/simple-workflow-nomarking.puml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@startuml
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
a --> b: t1
|
||||||
|
b --> c: t2
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
44
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-marking-nofooter.puml
vendored
Normal file
44
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-marking-nofooter.puml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c <<marked>>
|
||||||
|
state d
|
||||||
|
state e <<marked>>
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
agent t3
|
||||||
|
agent t4
|
||||||
|
agent t5
|
||||||
|
agent t6
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
t1 --> c
|
||||||
|
b --> t2
|
||||||
|
t2 --> d
|
||||||
|
c --> t2
|
||||||
|
d --> t3
|
||||||
|
t3 --> e
|
||||||
|
d --> t4
|
||||||
|
t4 --> f
|
||||||
|
e --> t5
|
||||||
|
t5 --> g
|
||||||
|
f --> t6
|
||||||
|
t6 --> g
|
||||||
|
@enduml
|
53
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-marking.puml
vendored
Normal file
53
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-marking.puml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c <<marked>>
|
||||||
|
state d
|
||||||
|
state e <<marked>>
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
agent t3
|
||||||
|
agent t4
|
||||||
|
agent t5
|
||||||
|
agent t6
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
t1 --> c
|
||||||
|
b --> t2
|
||||||
|
t2 --> d
|
||||||
|
c --> t2
|
||||||
|
d --> t3
|
||||||
|
t3 --> e
|
||||||
|
d --> t4
|
||||||
|
t4 --> f
|
||||||
|
e --> t5
|
||||||
|
t5 --> g
|
||||||
|
f --> t6
|
||||||
|
t6 --> g
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
@ -0,0 +1,44 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
state d
|
||||||
|
state e
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
agent t3
|
||||||
|
agent t4
|
||||||
|
agent t5
|
||||||
|
agent t6
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
t1 --> c
|
||||||
|
b --> t2
|
||||||
|
t2 --> d
|
||||||
|
c --> t2
|
||||||
|
d --> t3
|
||||||
|
t3 --> e
|
||||||
|
d --> t4
|
||||||
|
t4 --> f
|
||||||
|
e --> t5
|
||||||
|
t5 --> g
|
||||||
|
f --> t6
|
||||||
|
t6 --> g
|
||||||
|
@enduml
|
53
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-nomarking.puml
vendored
Normal file
53
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/complex-workflow-nomarking.puml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title ComplexDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
state d
|
||||||
|
state e
|
||||||
|
state f
|
||||||
|
state g
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
agent t3
|
||||||
|
agent t4
|
||||||
|
agent t5
|
||||||
|
agent t6
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
t1 --> c
|
||||||
|
b --> t2
|
||||||
|
t2 --> d
|
||||||
|
c --> t2
|
||||||
|
d --> t3
|
||||||
|
t3 --> e
|
||||||
|
d --> t4
|
||||||
|
t4 --> f
|
||||||
|
e --> t5
|
||||||
|
t5 --> g
|
||||||
|
f --> t6
|
||||||
|
t6 --> g
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-marking-nofooter.puml
vendored
Normal file
26
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-marking-nofooter.puml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b <<marked>>
|
||||||
|
state c
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
b --> t2
|
||||||
|
t2 --> c
|
||||||
|
@enduml
|
35
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-marking.puml
vendored
Normal file
35
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-marking.puml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b <<marked>>
|
||||||
|
state c
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
b --> t2
|
||||||
|
t2 --> c
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
@ -0,0 +1,26 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
b --> t2
|
||||||
|
t2 --> c
|
||||||
|
@enduml
|
35
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-nomarking.puml
vendored
Normal file
35
src/Symfony/Component/Workflow/Tests/fixtures/puml/square/simple-workflow-nomarking.puml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
@startuml
|
||||||
|
allow_mixing
|
||||||
|
sprite $sf_logo [81x20/16z] {
|
||||||
|
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
|
||||||
|
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
|
||||||
|
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
|
||||||
|
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
|
||||||
|
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
|
||||||
|
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
|
||||||
|
}
|
||||||
|
title SimpleDiagram
|
||||||
|
skinparam titleBorderRoundCorner 15
|
||||||
|
skinparam titleBorderThickness 2
|
||||||
|
skinparam state {
|
||||||
|
BackgroundColor<<initial>> #87b741
|
||||||
|
BackgroundColor<<marked>> #3887C6
|
||||||
|
BorderColor #3887C6
|
||||||
|
BorderColor<<marked>> Black
|
||||||
|
FontColor<<marked>> White
|
||||||
|
}
|
||||||
|
skinparam agent {
|
||||||
|
BackgroundColor #ffffff
|
||||||
|
BorderColor #3887C6
|
||||||
|
}
|
||||||
|
state a <<initial>>
|
||||||
|
state b
|
||||||
|
state c
|
||||||
|
agent t1
|
||||||
|
agent t2
|
||||||
|
a --> t1
|
||||||
|
t1 --> b
|
||||||
|
b --> t2
|
||||||
|
t2 --> c
|
||||||
|
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
|
||||||
|
@enduml
|
Reference in New Issue
Block a user