Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Added docs for Workflow component#6871
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
d0701f091867c269bca59f99fbb2e797f0c5b2a029196baf9763950dcead2f7e0089c548de43d805b237f57ec1403925ffe6bdee6c7464c783d26c16e7a35f4415466866b25adceebecb959f8ab45edf2fefdb5f7f0f5b0c68128386ecf0ad002a8bb0a88554e7cf113aa433d4f277dc2511c21c9b16562cc293447dc11d3250621c0bd6daFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,45 +11,59 @@ one place simultaneously. It is also worth noting that a workflow does not | ||
| commonly have cyclic path in the definition graph but it is common for a state | ||
| ||
| machine. | ||
| Example of state machine | ||
| ||
| ------------------------ | ||
| Consider the states a GitHub pull request may have. We have an initial "start" | ||
| state, a state for running tests on "travis", then we have the "review" state | ||
| where we can require changes, reject or accept the pull request. At anytime we | ||
| could also "update" the pull request which will result in another "travis" run. | ||
| ||
| .. image:: /_images/components/workflow/pull_request.png | ||
| Below is the configuration for the pull request state machine. | ||
| .. configuration-block:: | ||
| .. code-block:: yaml | ||
| framework: | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. please add | ||
| workflows: | ||
| pull_request: | ||
| type: 'state_machine' | ||
| marking_store: | ||
| type: scalar | ||
| supports: | ||
| - AppBundle\Entity\PullRequest | ||
| places: | ||
| - start | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I've started with many comments, so here a resume of what I suggest for the following: pull_request:type:'state_machine'supports: -AppBundle\Entity\PullRequestplaces: -started -coding -travis -needs_review -reviewed -merged -closedtransitions:test:from:[started, coding]to:travissubmit:from:travisto:needs_reviewrequest_change:from:[travis, needs_review, reviewed]to:codingaccept:from:needs_reviewto:reviewedreject:from:[coding, needs_review, reviewed]to:closedreopen:from:closedto:needs_reviewmerge:from:reviewedto:merged Wdyt? Actually when trying to dump it I've found a bug and submittedsymfony/symfony#20497 :) | ||
| - coding | ||
| - travis | ||
| - review | ||
| - merged | ||
| - closed | ||
| transitions: | ||
| submit: | ||
| from: start | ||
| to: travis | ||
| update: | ||
| from: [coding, travis, review] | ||
| to: travis | ||
| wait_for_reivew: | ||
| from: travis | ||
| to: review | ||
| change_needed: | ||
| from: review | ||
| to:coding | ||
| accepted: | ||
| from: review | ||
| to: merged | ||
| rejected: | ||
| from: review | ||
| to: closed | ||
| reopened: | ||
| ||
| from: closed | ||
| to: review | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. please add XML and PHP formats. <!-- app/config/config.xml--><?xml version="1.0" encoding="utf-8" ?><containerxmlns="http://symfony.com/schema/dic/services"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:framework="http://symfony.com/schema/dic/symfony"xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> <framework:config> <framework:workflowname="pull_request"type="state_machine"> <framework:marking-storetype="scalar"/> <framework:support>AppBundle\Entity\PullRequest</framework:support> <framework:place>start</framework:place> <framework:place>coding</framework:place> <framework:place>travis</framework:place> <framework:place>review</framework:place> <framework:place>merged</framework:place> <framework:place>closed</framework:place> <framework:transitionname="submit"> <framework:from>start</framework:from> <framework:to>travis</framework:to> </framework:transition> <framework:transitionname="update"> <framework:from>coding</framework:from> <framework:from>travis</framework:from> <framework:from>review</framework:from> <framework:to>travis</framework:to> </framework:transition> <framework:transitionname="wait_for_review"> <framework:from>travis</framework:from> <framework:to>review</framework:to> </framework:transition> <framework:transitionname="change_needed"> <framework:from>review</framework:from> <framework:to>coding</framework:to> </framework:transition> <framework:transitionname="accepted"> <framework:from>review</framework:from> <framework:to>merged</framework:to> </framework:transition> <framework:transitionname="rejected"> <framework:from>review</framework:from> <framework:to>closed</framework:to> </framework:transition> <framework:transitionname="reopened"> <framework:from>closed</framework:from> <framework:to>review</framework:to> </framework:transition> </framework:workflow> </framework:config></container> MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Thank you. Im embarrassingly bad at the XML syntax for the config. | ||
| .. _Petri net: https://en.wikipedia.org/wiki/Petri_net | ||