Technical Aspects
Workflow Definition Persistence
The workflow designer creates standard Pimcore workflow definitions which are loaded by the symfony configuration tree.
All workflows defined with the workflow designer are stored accordingly to the configuration entry
pimcore_workflow_designer.configuration_file_path.
Additional information for the workflow designer (like description, folder, the diagram and some mappings) is packed
into the
custom_extensions node of the Pimcore workflow configuration and read from there.
In the workflow designer, only workflows created with the workflow designer and saved in the file located under the
configuration_file_path configuration are listed.
There might be additional workflows defined in the system. They are also applied to their subjects, but they cannot be configured in the workflow designer.
Diagram Synchronization
The workflow diagram for the visual workflow definition and the actual workflow definition of places, transitions and global actions need to be synchronized. This happens with following rules:
- When opening a workflow in workflow designer and no diagram exists, a diagram is created automatically with some simple layouting logic.
- When opening a workflow in workflow designer and a diagram exists, it is synchronized with the places, transitions and global actions definitions of the workflow - means missing elements are added to the diagram, and zombie elements in the diagram are removed.
- When saving a workflow in the workflow designer, all the workflow elements (places, transitions, global actions) are extracted from the diagram and added to the workflow configuration.
Events
Cache Invalidation
workflow_designer.cache_invalidation is dispatched when a workflow is deleted, and when it is saved with
Save and Rebuild. A plain Save does not dispatch it.
The bundle subscribes to this event itself to rebuild the Symfony container, which is what makes a changed workflow take effect. Listen for it to additionally drop your own caches that depend on the workflow definitions.
namespace App\EventListener;
use Pimcore\Bundle\WorkflowDesignerBundle\Event\Studio\WorkflowCacheInvalidationEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener(event: WorkflowCacheInvalidationEvent::EVENT_NAME)]
final class WorkflowCacheListener
{
public function __invoke(WorkflowCacheInvalidationEvent $event): void
{
// invalidate caches that depend on workflow definitions
}
}
Studio API Pre-Response Events
The designer is a Pimcore Studio plugin backed by Studio Backend endpoints. Before one of those endpoints returns, the bundle dispatches a pre-response event carrying the response schema. Listen for it to add your own data to the response.
| Event name | Dispatched when |
|---|---|
pre_response.workflow_designer.workflow_list | Once per workflow in the list, before the list is returned. |
pre_response.workflow_designer.workflow_detail | A single workflow is returned. |
pre_response.workflow_designer.workflow_create | A new workflow is initialized and returned. It is not persisted yet, that happens on the following save. |
See the Studio Backend Additional and Custom Attributes documentation for the listener pattern.
The endpoints themselves are not a supported public API. Their controllers are marked @internal and may change in any
release without a deprecation path. Do not build integrations against them.