Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added explaination on context in events and initial marking#13947

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
epitre wants to merge2 commits intosymfony:masterfromShaurifr:eventWithContext

Conversation

epitre
Copy link
Contributor

No description provided.

@pluk77
Copy link

@epitre Nice solution, which will indeed also solve the issue of the non-dispatched initial entered event.

@pluk77
Copy link

@epitre Perhaps you can also add a note about the initial marking option to make it clear it is optional and will default to the first place if not defined.

@epitre
Copy link
ContributorAuthor

@epitre Perhaps you can also add a note about the initial marking option to make it clear it is optional and will default to the first place if not defined.

it is explained here :https://github.com/symfony/symfony-docs/pull/13947/files#diff-c94d89e3669d4257383cfe5faf73e644R97

@pluk77
Copy link

@epitre Perhaps you can also add a note about the initial marking option to make it clear it is optional and will default to the first place if not defined.

it is explained here :https://github.com/symfony/symfony-docs/pull/13947/files#diff-c94d89e3669d4257383cfe5faf73e644R97

I was more referring to the config optioninitial_marking in the workflow configuration file (yml, xml, php). It is not clear from the current docs that the initial marking will always be the place that is first in the list of defined places, unless you set a different place usinginitial_marking.

Even if you do not instantiate the workflow by usinggetMarking() but go directly toapply() the subject will still be placed in the initial place first if there is no marking on the subject yet.

Hope I am making sense?

@@ -94,6 +94,16 @@ you can retrieve a workflow from it and use it as follows::
$workflow->can($blogPost, 'publish'); // True
$workflow->getEnabledTransitions($blogPost); // $blogPost can perform transition "publish" or "reject"

If you want to initiate your worflow, you can simply call ``getMarking``::
Copy link
Contributor

Choose a reason for hiding this comment

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

workflow withk

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

thanks

lyrixx added a commit to symfony/symfony that referenced this pull requestAug 12, 2020
This PR was merged into the 5.2-dev branch.Discussion----------[Workflow] Added Context to Workflow EventThere's also a default context for the initial marking event.| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       |Fix#37421| License       | MIT| Doc PR        |symfony/symfony-docs#13947This time, I need context in the events, because, sometimes, the transition is automatic and sometimes, it is manual. I want to be able to make the difference. I figured using the context for that is a good idea. I hope you do too :)By the way, I believe it alsofixes#37421 . I took@pluk77 request to be able to differentiate an initial marking by having a default context in that caseCommits-------bfe07dd Added Context to Workflow Event There's also a default context for the initial marking event.
symfony-splitter pushed a commit to symfony/twig-bridge that referenced this pull requestAug 12, 2020
This PR was merged into the 5.2-dev branch.Discussion----------[Workflow] Added Context to Workflow EventThere's also a default context for the initial marking event.| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       | Fix #37421| License       | MIT| Doc PR        |symfony/symfony-docs#13947This time, I need context in the events, because, sometimes, the transition is automatic and sometimes, it is manual. I want to be able to make the difference. I figured using the context for that is a good idea. I hope you do too :)By the way, I believe it also fixes #37421 . I took@pluk77 request to be able to differentiate an initial marking by having a default context in that caseCommits-------bfe07dda83 Added Context to Workflow Event There's also a default context for the initial marking event.
@lyrixx
Copy link
Member

FYI, The pull request has been merged

epitre reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas deleted the branchsymfony:masterDecember 7, 2020 16:34
@nicolas-grekas
Copy link
Member

This PR has been closed because the master has been removed.
Please submit it again against the appropriate branch.

@epitre
Copy link
ContributorAuthor

epitre commentedDec 8, 2020
edited
Loading

@nicolas-grekas I thought it was merge as said by@lyrixx ?

Anyway, I made a new PR :#14678

@nicolas-grekas
Copy link
Member

I think@lyrixx meant that the feature has been merged on the code side (but not on the doc side.)

lyrixx reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@u-mulderu-mulderu-mulder left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@epitre@pluk77@lyrixx@nicolas-grekas@u-mulder@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp