Skip to content

[Workflow] Support for getting a workflow from registry using a class instead of an instance  #31506

@asimonf

Description

@asimonf

Description
Right now, the only way to obtain the corresponding workflow from the registry is by passing an object of the object that the workflow supports. This feature would allow for obtaining the workflow without the object, but rather, with the class.

Example

    $workflow = $this->workflowRegistry->get(Object::class);

    foreach ($objects as $object) {
        $workflow->apply($object, 'to_next');
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions