Skip to content

Commit a00b1a7

Browse files
committed
[FrameworkBundle] Fix support of dumping workflow when workflow is decorated by TraceableWorkflow
1 parent b13e7ce commit a00b1a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Command/WorkflowDumpCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Symfony\Component\Console\Input\InputOption;
2222
use Symfony\Component\Console\Output\OutputInterface;
2323
use Symfony\Component\DependencyInjection\ServiceLocator;
24+
use Symfony\Component\Workflow\Debug\TraceableWorkflow;
2425
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
2526
use Symfony\Component\Workflow\Dumper\MermaidDumper;
2627
use Symfony\Component\Workflow\Dumper\PlantUmlDumper;
@@ -78,6 +79,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7879
throw new InvalidArgumentException(\sprintf('The workflow named "%s" cannot be found.', $workflowName));
7980
}
8081
$workflow = $this->workflows->get($workflowName);
82+
if ($workflow instanceof TraceableWorkflow) {
83+
$workflow = $workflow->getInner();
84+
}
8185
$type = $workflow instanceof StateMachine ? 'state_machine' : 'workflow';
8286
$definition = $workflow->getDefinition();
8387

0 commit comments

Comments
 (0)