Skip to content

[Workflow] Document the new transition completed event #8213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

izzyp
Copy link
Contributor

@izzyp izzyp commented Jul 22, 2017

as per PR - symfony/symfony#22587

@xabbuh xabbuh added the On hold label Jul 25, 2017
@xabbuh xabbuh added this to the 3.4 milestone Jul 25, 2017
lyrixx added a commit to symfony/symfony that referenced this pull request Aug 7, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Add transition completed event

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR | symfony/symfony-docs#8213

---

Because the "entered" event is the only event dispatched after the new marking is applied, and publish's an event upon entering into a "Place" (as opposed to completing a transition), it is not sufficient for a lot of use cases and is causing bugs.

Example:
Enabled Transitions:
1. A -> B
2. B -> C
3. C -> B

Transition 1 and transition 3, will dispatch an "entered" event on Place B, forcing post transition behaviour to be the same for both transition 1 and 3.

A user might need different behaviour depending on the transition, rather the the destination.
A concrete use case would be when applying an "undo" transition to a subject. One may or may not want to re-trigger all the events associated with the original transition to that Place.

I propose adding a "completed" event (ie. Transition completed) in addition to the entered event.

Commits
-------

c254cac [Workflow] Added an transition completed event
@javiereguiluz
Copy link
Member

@izzyp thanks for adding these docs and congrats on your first Symfony Docs contribution!

javiereguiluz added a commit that referenced this pull request Jan 10, 2018
…zzyp)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #8213).

Discussion
----------

[Workflow] Document the new transition completed event

as per PR - symfony/symfony#22587

Commits
-------

b8249ab [Workflow] Document the new transition completed event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants