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

Skip to content

Commit a68a7c5

Browse files
committed
minor #12295 [Workflow] Rework a bit the doc (lyrixx)
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
2 parents 03552a3 + d48d903 commit a68a7c5

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

_build/redirection_map

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@
362362
/console/logging /console
363363
/frontend/encore/legacy-apps /frontend/encore/legacy-applications
364364
/contributing/code/patches /contributing/code/pull_requests
365-
/workflow/state-machines /workflow/introduction
365+
/workflow/state-machines /workflow/workflow-and-state-machine
366+
/workflow/introduction /workflow/workflow-and-state-machine
366367
/workflow/usage /workflow
367368
/introduction/from_flat_php_to_symfony2 /introduction/from_flat_php_to_symfony
368369
/contributing/community/other /contributing/community

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,7 @@ type
23802380
**type**: ``string`` **possible values**: ``'workflow'`` or ``'state_machine'``
23812381

23822382
Defines the kind of workflow that is going to be created, which can be either
2383-
a normal workflow or a state machine. Read :doc:`this article </workflow/introduction>`
2383+
a normal workflow or a state machine. Read :doc:`this article </workflow/workflow-and-state-machine>`
23842384
to know their differences.
23852385

23862386
.. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html

workflow.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Workflow
33

44
Using the Workflow component inside a Symfony application requires to know first
55
some basic theory and concepts about workflows and state machines.
6-
:doc:`Read this article </workflow/introduction>` for a quick overview.
6+
:doc:`Read this article </workflow/workflow-and-state-machine>` for a quick overview.
77

88
A workflow is a process or a lifecycle that your objects go through. Each
99
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::
158158

159159
The marking store type could be "multiple_state" or "single_state". A single
160160
state marking store does not support a model being on multiple places at the
161-
same time.
161+
same time. This means a "workflow" must use a "multiple_state" marking store
162+
and a "state_machine" must use a "single_state" marking store. Symfony
163+
configures the marking store according to the "type" by default, so it's
164+
preferable to not configure it.
165+
166+
A single state marking store use a string to store the data. A multiple
167+
state marking store use an array to store the data.
162168

163169
.. tip::
164170

165-
The ``type`` (default value ``single_state``) and ``arguments`` (default
166-
value ``marking``) attributes of the ``marking_store`` option are optional.
167-
If omitted, their default values will be used.
171+
The ``marking_store.type`` (the default value depends on the ``type`` value)
172+
and ``arguments`` (default value ``['marking']``) attributes of the
173+
``marking_store`` option are optional. If omitted, their default values will
174+
be used. It's highly recommenced to use the default value.
168175

169176
.. tip::
170177

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

496-
workflow/introduction
497-
workflow/dumping-workflows
503+
/workflow/workflow-and-state-machine
504+
/workflow/dumping-workflows

workflow/introduction.rst renamed to workflow/workflow-and-state-machine.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ your model. The most important differences between them are:
4949

5050
* Workflows can be in more than one place at the same time, whereas state
5151
machines can't;
52-
* Workflows usually don't have cyclic paths in the definition graph, but it's
53-
common for state machines;
5452
* In order to apply a transition, workflows require that the object is in all
5553
the previous places of the transition, whereas state machines only require
5654
that the object is at least in one of those places.

0 commit comments

Comments
 (0)