Skip to content
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

[Workflow] Rework a bit the doc #12295

Open
wants to merge 3 commits into
base: 3.4
from

Conversation

@lyrixx
Copy link
Member

commented Sep 10, 2019

No description provided.


.. tip::

The ``type`` (default value ``single_state``) and ``arguments`` (default

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

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

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

This is wrong

This comment has been minimized.

Copy link
@Nyholm

Nyholm Sep 10, 2019

Member

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.

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

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

This comment has been minimized.

Copy link
@noniagriconomie

noniagriconomie Sep 10, 2019

Contributor

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

This comment has been minimized.

Copy link
@Nyholm

Nyholm Sep 10, 2019

Member

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.

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

Sure, But the real difference in symfony (at least) is about multi vs single state.
This is that we should emphasis

This comment has been minimized.

Copy link
@Nyholm

Nyholm Sep 10, 2019

Member

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.

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

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

This comment has been minimized.

Copy link
@javiereguiluz

javiereguiluz Sep 10, 2019

Member

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.

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

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.

@@ -493,5 +500,5 @@ Learn more
.. toctree::
:maxdepth: 1

workflow/introduction
workflow/dumping-workflows
/workflow/workflow-and-state-machine

This comment has been minimized.

Copy link
@lyrixx

lyrixx Sep 10, 2019

Author Member

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.

@lyrixx lyrixx force-pushed the lyrixx:worflow-3.4 branch from a69810b to d74d2f7 Sep 10, 2019

@Nyholm
Copy link
Member

left a comment

Thank you.

I just left some minor comments

workflow.rst Show resolved Hide resolved
@@ -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

This comment has been minimized.

Copy link
@Nyholm

Nyholm Sep 10, 2019

Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.