From 24a88183660645785ef9427c70936e9155375f60 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Feb 2019 15:58:25 +0100 Subject: [PATCH 1/3] Bootstraped the documentation of Workflow options --- reference/configuration/framework.rst | 141 ++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index fc07929a40f..034dd97e998 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -191,6 +191,20 @@ Configuration * `strict_email`_ * `translation_domain`_ +* `workflows`_ + + * :ref:`enabled ` + * :ref:`name ` + + * `audit_trail`_ + * `initial_place`_ + * `marking_store`_ + * `places`_ + * `supports`_ + * `support_strategy`_ + * `transitions`_ + * `type`_ + secret ~~~~~~ @@ -2143,6 +2157,133 @@ lock The default lock adapter. If not defined, the value is set to ``semaphore`` when available, or to ``flock`` otherwise. Store's DSN are also allowed. +workflows +~~~~~~~~~ + +**type**: ``array`` + +A list of workflows to be created by the framework extension: + +.. configuration-block:: + + .. code-block:: yaml + + # config/packages/workflow.yaml + framework: + workflows: + my_workflow: + # ... + + .. code-block:: xml + + + + + + + + + + + + + + .. code-block:: php + + // config/packages/workflow.php + $container->loadFromExtension('framework', [ + 'workflows' => [ + 'my_workflow' => // ... + ], + ]); + +.. seealso:: + + See also the article about :doc:`using workflows in Symfony apps `. + +.. _reference-workflows-enabled: + +enabled +....... + +**type**: ``boolean`` **default**: ``false`` + +Whether to enable the support for workflows or not. This setting is +automatically set to ``true`` when one of the child settings is configured. + +.. _reference-workflows-name: + +name +.... + +**type**: ``prototype`` + +Name of the workflow you want to create. + +audit_trail +""""""""""" + +**type**: ``array`` + +initial_place +""""""""""""" + +**type**: ``string`` **default**: ``null`` + +marking_store +""""""""""""" + +**type**: ``array`` + +Each marking store can define any of these options: + +* ``arguments`` (**type**: ``array``) +* ``service`` (**type**: ``string``) +* ``type`` (**type**: ``string`` **possible values**: ``'multiple_state'`` or + ``'single_state'``) + +places +"""""" + +**type**: ``array`` + +supports +"""""""" + +**type**: ``string`` | ``array`` + +support_strategy +"""""""""""""""" + +**type**: ``string`` + +transitions +""""""""""" + +**type**: ``array`` + +Each marking store can define any of these options: + +* ``from`` (**type**: ``string``) +* ``guard`` (**type**: ``string``) a :doc:`ExpressionLanguage ` + compatible expression to block the transition +* ``name`` (**type**: ``string``) +* ``to`` (**type**: ``string``) + +type +"""" + +**type**: ``string`` **possible values**: ``'workflow'`` or ``'state_machine'`` + +Defines the kind fo workflow that is going to be created, which can be either +a :doc:`normal workflow ` or a :doc:`state machine `. + .. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html .. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning .. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html From 918744451db7b5d95413bbcce7d514d785bceb33 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Feb 2019 16:32:42 +0100 Subject: [PATCH 2/3] Fixed a repeated reference --- reference/configuration/framework.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 034dd97e998..2921ace721a 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -203,7 +203,7 @@ Configuration * `supports`_ * `support_strategy`_ * `transitions`_ - * `type`_ + * :ref:`type ` secret ~~~~~~ @@ -2276,6 +2276,8 @@ Each marking store can define any of these options: * ``name`` (**type**: ``string``) * ``to`` (**type**: ``string``) +.. _reference-workflows-type: + type """" From d6a66b56a20c911bd5ad193cbae3e310edd7cefd Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Feb 2019 16:39:10 +0100 Subject: [PATCH 3/3] Fixed another wrong reference --- reference/configuration/framework.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 2921ace721a..45204b31e97 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -125,7 +125,7 @@ Configuration * `https_port`_ * `resource`_ * `strict_requirements`_ - * `type`_ + * :ref:`type ` * `secret`_ * `serializer`_ @@ -760,6 +760,8 @@ resource The path the main routing resource (e.g. a YAML file) that contains the routes and imports the router should load. +.. _reference-router-type: + type ....