Skip to content

[Workflow] Enter events #21433

Closed
Closed
@ihorsamusenko

Description

@ihorsamusenko
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes/no
Symfony version 3.2.0

I found a strange behaviour of Workflow Class. Particularly this part https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Workflow/Workflow.php#L139-L141 . Turns out, if a listener is subscribed on "workflow.entity.enter.place" it will receive the entity when it is not in the "place" yet.
So technically there is no an event like "right-after-a-transition".
Shouldn't we trigger ""workflow.entity.enter" events after changing the place for entity?

$this->transition($subject, $transition, $marking);
$this->markingStore->setMarking($subject, $marking);
$this->enter($subject, $transition, $marking);

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