Skip to content

clarify workflow events #8048

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

Merged
merged 1 commit into from
Jun 18, 2017
Merged

clarify workflow events #8048

merged 1 commit into from
Jun 18, 2017

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Jun 15, 2017

i was a bit confused by what the events exactly mean. after reading through the code and testing some things, this is what i found.


* ``workflow.guard``
* ``workflow.[workflow name].guard``
* ``workflow.[workflow name].guard.[transition name]``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i found it illogic that these events are shown below, when they are also events, just a special type of events.

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but easy win!

@@ -198,6 +211,14 @@ events are dispatched:
* ``workflow.[workflow name].announce``
* ``workflow.[workflow name].announce.[transition name]``

When a state transition is initiated, the events are fired in the following order:

- guard: Validate whether the transition is allowed at all (see below);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link the see below part

- leave: The object is about to leave a place;
- transition: The object is going through this transition;
- enter: The object entered a new place. This is the first event where the object' is marked as being in the new place;
- announce: Triggered once for each workflow that now is available for the object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could integrate this with the event list above so it's all in one place. Perhaps the name (guard), then indented below the description, then bullets below that with the 3 events. We do something here https://github.com/symfony/symfony-docs/blob/master/introduction/http_fundamentals.rst for GET POST stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. see #8060 for this. it looks nice, at least in the github preview

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I already opened #8059 in the meantime. 🙈

@xabbuh
Copy link
Member

xabbuh commented Jun 18, 2017

Thank you David.

xabbuh added a commit that referenced this pull request Jun 18, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

clarify workflow events

i was a bit confused by what the events exactly mean. after reading through the code and testing some things, this is what i found.

Commits
-------

0070621 clarify workflow events
xabbuh added a commit that referenced this pull request Jun 18, 2017
@xabbuh xabbuh merged commit 0070621 into symfony:3.2 Jun 18, 2017
xabbuh added a commit that referenced this pull request Jun 18, 2017
* 3.2:
  [#8048] some minor tweaks
  [#8013] revert wrong data provider change
  correct PHP code
  Added a missing <script> tag in an example
  clarify workflow events
  minor tweak
  Fix comment to be consistent with the example
  Reworded the article about slashes in routing placeholders
  Minor reword of code contribution standards
xabbuh added a commit that referenced this pull request Jun 18, 2017
* 3.4:
  [#8048] some minor tweaks
  [#8013] revert wrong data provider change
  correct PHP code
  Added a missing <script> tag in an example
  Fix variable name in CSFR token example code
  [AUTOWIRE] Fix invalid yaml code
  clarify workflow events
  minor tweak
  Fix comment to be consistent with the example
  fix invalid code lines and remove extra space
  Reworded the article about slashes in routing placeholders
  Minor reword of code contribution standards
xabbuh added a commit that referenced this pull request Jun 22, 2017
…abbuh)

This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] rearrange how workflow events are presented

see @weaverryan's suggestion in #8048 (comment)

Commits
-------

f7405d2 rearrange how workflow events are presented
@dbu dbu deleted the patch-1 branch October 18, 2018 17:26
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