Skip to content

[Workflow] Add support for getting updated context after a transition #41292

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
Jul 3, 2021

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented May 19, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR

I have a listener that lock the transition. Then, I need to give this
lock to my consumer. ATM, there is no easy way to pass a new resource
from a listener to the caller. I could add a new tmpLock property on my
subject (this is what I did temporary), but I'm not confortable with
this hack.

By adding the final context (it could be updated, that the point of
listener) to the marking, I could easily get data back.

Finally, the PHP doc of WorkflowInterface::apply() tells us:

 * @return Marking The new Marking

So I think it's legit to add also the new context

@carsonbot

This comment has been minimized.

@nicolas-grekas nicolas-grekas changed the title [Workflown] Add support for getting updated context after a transition [Workflow] Add support for getting updated context after a transition May 22, 2021
@nicolas-grekas nicolas-grekas added this to the 5.4 milestone May 22, 2021
5.3
---

* Deprecate `InvalidTokenConfigurationException`
* Added `MermaidDumper` to dump Workflow graphs in the Mermaid.js flowchart format
Copy link
Member

Choose a reason for hiding this comment

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

Please revert all unrelated changes here. We don't need/want to update all the old changelogs. The convention changed only for new entries.

}

/**
* Returns the context after the subject has transitionend.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Returns the context after the subject has transitionend.
* Returns the context after the subject has transitioned.

@fabpot
Copy link
Member

fabpot commented Jul 3, 2021

Thank you @lyrixx.

@fabpot fabpot force-pushed the workflow-marking-context branch from a5052f8 to 571c75e Compare July 3, 2021 05:28
@fabpot fabpot merged commit 6402572 into symfony:5.4 Jul 3, 2021
@lyrixx lyrixx deleted the workflow-marking-context branch July 5, 2021 08:30
This was referenced Nov 5, 2021
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