Skip to content

Commit 36dc826

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: [Workflow] Rework a bit the doc
2 parents 74436c4 + 743226f commit 36dc826

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

_build/redirection_map

+2-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@
414414
/frontend/encore/legacy-apps /frontend/encore/legacy-applications
415415
/configuration/external_parameters /configuration/environment_variables
416416
/contributing/code/patches /contributing/code/pull_requests
417-
/workflow/state-machines /workflow/introduction
417+
/workflow/state-machines /workflow/workflow-and-state-machine
418+
/workflow/introduction /workflow/workflow-and-state-machine
418419
/workflow/usage /workflow
419420
/introduction/from_flat_php_to_symfony2 /introduction/from_flat_php_to_symfony
420421
/configuration/environment_variables /configuration/env_var_processors

reference/configuration/framework.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2879,7 +2879,7 @@ type
28792879
**type**: ``string`` **possible values**: ``'workflow'`` or ``'state_machine'``
28802880

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

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

workflow.rst

+22-3
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
Installation
99
------------
@@ -170,6 +170,25 @@ As configured, the following property is used by the marking store::
170170
public $content;
171171
}
172172

173+
.. note::
174+
175+
The marking store type could be "multiple_state" or "single_state". A single
176+
state marking store does not support a model being on multiple places at the
177+
same time. This means a "workflow" must use a "multiple_state" marking store
178+
and a "state_machine" must use a "single_state" marking store. Symfony
179+
configures the marking store according to the "type" by default, so it's
180+
preferable to not configure it.
181+
182+
A single state marking store uses a string to store the data. A multiple
183+
state marking store uses an array to store the data.
184+
185+
.. tip::
186+
187+
The ``marking_store.type`` (the default value depends on the ``type`` value)
188+
and ``arguments`` (default value ``['marking']``) attributes of the
189+
``marking_store`` option are optional. If omitted, their default values will
190+
be used. It's highly recommenced to use the default value.
191+
173192
.. tip::
174193

175194
Setting the ``audit_trail.enabled`` option to ``true`` makes the application
@@ -744,5 +763,5 @@ Learn more
744763
.. toctree::
745764
:maxdepth: 1
746765

747-
workflow/introduction
748-
workflow/dumping-workflows
766+
/workflow/workflow-and-state-machine
767+
/workflow/dumping-workflows

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

-2
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)