-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Workflow] Rework a bit the doc #12295
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
Conversation
|
||
.. tip:: | ||
|
||
The ``type`` (default value ``single_state``) and ``arguments`` (default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced with this tip + previous note.
There is too much to way about the marking store.
Chould we add a new chapter (in this page OC) instead?
@@ -49,8 +49,6 @@ your model. The most important differences between them are: | |||
|
|||
* Workflows can be in more than one place at the same time, whereas state | |||
machines can't; | |||
* Workflows usually don't have cyclic paths in the definition graph, but it's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.. I would say this is very true. But maybe we can express it differently.
Workflows usually have a defined start and end. State machines usually keep running forever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still disagree. Why do you say a State Machine keep running? I had many state machine that have a start and a end too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both workflow or state machine are either cyclic or straight forward, no?
for me the only difference is the state representation, single or multiple
but not transitions process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had many state machine that have a start and a end too
That does not make you correct. =)
A mathematician would disagree with you.
But as you say, one can probably use Workflow and StateMachine interchangeably. But you should always know what you are using to know how to relate to your object.
Why do you say a State Machine keep running?
See Wikipeida on Petri net > Work flow net.
WF-nets have the soundness property,[20] indicating that a process with a start marking of k tokens in its source place, can reach the termination state marking with k tokens in its sink place (defined as K-sound WF-net). Additionally, all the transitions in the process could fire (i.e., for each transition there is a reachable state in which the transition is enabled).
That is not usually the case for a state machine.
I may be wrong saying "a State Machine keep running". But the opposite is true. A Workflow has an end. A state machine does not need one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. But I don’t like the idea that this bullet (or a version of it) is removed.
This is the place where we state the differences and help people choose implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. The difference is when you need 1 or many places at the same time.
Or in an other shape: It's when you can parallelism or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As someone who doesn't know much about Workflows, a phrase like the following proposed by Tobias would be easy to understand for me:
Workflows usually have a defined start and end. State machines usually keep running forever.
Also, the phrase says "usually" instead of "always / never", "can / can't", etc. so I guess it's compatible with what @lyrixx is saying too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really sorry to insist but the main difference is not about this point.
For most application a state machine is enough because there are no parallelism. Then if the need is real, a workflow better fit.
A workflow is more powerful but it comes with more complexity. Some people doesn't understand the sentence "the object must be in all place before the transition". (I'm on my phone, it's hard to make a link)But see related issue about that.
I agree the sentence is totally valid in theory but the choose should not be based on this fact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed my mind. I'm in favour of removing this line.
I still think this line is correct. But it is too complex, not very important and easily misunderstood.
(I just had a conversation with a person referring to this line and said "workflows cannot have loops".)
@@ -493,5 +500,5 @@ Learn more | |||
.. toctree:: | |||
:maxdepth: 1 | |||
|
|||
workflow/introduction | |||
workflow/dumping-workflows | |||
/workflow/workflow-and-state-machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change could be reverted, but it's stange to have an introduction that is not main entry point. More over there are no links at the end of the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I just left some minor comments
@@ -49,8 +49,6 @@ your model. The most important differences between them are: | |||
|
|||
* Workflows can be in more than one place at the same time, whereas state | |||
machines can't; | |||
* Workflows usually don't have cyclic paths in the definition graph, but it's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.. I would say this is very true. But maybe we can express it differently.
Workflows usually have a defined start and end. State machines usually keep running forever.
@lyrixx can we merge this? Thanks. |
@javiereguiluz yes :) |
d74d2f7
to
d48d903
Compare
This PR was squashed before being merged into the 3.4 branch (closes #12295). Discussion ---------- [Workflow] Rework a bit the doc <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- d48d903 [Workflow] Rework a bit the doc
No description provided.