-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Workflow | |
|
||
Using the Workflow component inside a Symfony application requires to know first | ||
some basic theory and concepts about workflows and state machines. | ||
:doc:`Read this article </workflow/introduction>` for a quick overview. | ||
:doc:`Read this article </workflow/workflow-and-state-machine>` for a quick overview. | ||
|
||
A workflow is a process or a lifecycle that your objects go through. Each | ||
step or stage in the process is called a *place*. You do also define *transitions* | ||
|
@@ -158,13 +158,20 @@ As configured, the following property is used by the marking store:: | |
|
||
The marking store type could be "multiple_state" or "single_state". A single | ||
state marking store does not support a model being on multiple places at the | ||
same time. | ||
same time. This means a "workflow" must use a "multiple_state" marking store | ||
and a "state_machine" must use a "single_state" marking store. Symfony | ||
configures the marking store according to the "type" by default, so it's | ||
preferable to not configure it. | ||
|
||
A single state marking store use a string to store the data. A multiple | ||
state marking store use an array to store the data. | ||
|
||
.. tip:: | ||
|
||
The ``type`` (default value ``single_state``) and ``arguments`` (default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced with this tip + previous note. |
||
value ``marking``) attributes of the ``marking_store`` option are optional. | ||
If omitted, their default values will be used. | ||
The ``marking_store.type`` (the default value depends on the ``type`` value) | ||
and ``arguments`` (default value ``['marking']``) attributes of the | ||
``marking_store`` option are optional. If omitted, their default values will | ||
be used. It's highly recommenced to use the default value. | ||
|
||
.. tip:: | ||
|
||
|
@@ -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 commentThe 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. |
||
/workflow/dumping-workflows |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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.
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. both workflow or state machine are either cyclic or straight forward, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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.
See Wikipeida on Petri net > Work flow net.
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 commentThe 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 commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
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 commentThe 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. 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 commentThe 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".) |
||
common for state machines; | ||
* In order to apply a transition, workflows require that the object is in all | ||
the previous places of the transition, whereas state machines only require | ||
that the object is at least in one of those places. | ||
|
Uh oh!
There was an error while loading. Please reload this page.