Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Sep 24, 2019
Merged

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Sep 10, 2019

No description provided.


.. tip::

The ``type`` (default value ``single_state``) and ``arguments`` (default
Copy link
Member Author

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
Copy link
Member Author

Choose a reason for hiding this comment

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

This is wrong

Copy link
Member

@Nyholm Nyholm Sep 10, 2019

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.

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Member

@Nyholm Nyholm Sep 10, 2019

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.

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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
Copy link
Member Author

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.

Copy link
Member

@Nyholm Nyholm left a 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
Copy link
Member

@Nyholm Nyholm Sep 10, 2019

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.

@javiereguiluz
Copy link
Member

@lyrixx can we merge this? Thanks.

@lyrixx
Copy link
Member Author

lyrixx commented Sep 24, 2019

@javiereguiluz yes :)

javiereguiluz added a commit that referenced this pull request Sep 24, 2019
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
@javiereguiluz javiereguiluz merged commit d48d903 into symfony:3.4 Sep 24, 2019
@lyrixx lyrixx deleted the worflow-3.4 branch September 25, 2019 09:05
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.

5 participants