<?xml version="1.0" ?>

<container xmlns="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 https://symfony.com/schema/dic/services/services-1.0.xsd
                        http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

    <framework:config>
        <framework:workflow name="article" type="workflow">
            <framework:initial-marking>draft</framework:initial-marking>
            <framework:marking-store type="method" property="state" />
            <framework:support>Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest</framework:support>
            <framework:place name="draft" />
            <framework:place name="wait_for_journalist" />
            <framework:place name="approved_by_journalist" />
            <framework:place name="wait_for_spellchecker" />
            <framework:place name="approved_by_spellchecker" />
            <framework:place name="published" />
            <framework:transition name="request_review">
                <framework:from>draft</framework:from>
                <framework:to>wait_for_journalist</framework:to>
                <framework:to>wait_for_spellchecker</framework:to>
            </framework:transition>
            <framework:transition name="journalist_approval">
                <framework:from>wait_for_journalist</framework:from>
                <framework:to>approved_by_journalist</framework:to>
            </framework:transition>
            <framework:transition name="spellchecker_approval">
                <framework:from>wait_for_spellchecker</framework:from>
                <framework:to>approved_by_spellchecker</framework:to>
            </framework:transition>
            <framework:transition name="publish">
                <framework:from>approved_by_journalist</framework:from>
                <framework:from>approved_by_spellchecker</framework:from>
                <framework:to>published</framework:to>
            </framework:transition>
        </framework:workflow>

        <framework:workflow name="pull_request">
            <framework:initial-marking>start</framework:initial-marking>
            <framework:support>Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest</framework:support>
            <framework:place name="start">
                <framework:metadata>
                    <framework:title>place start title</framework:title>
                </framework:metadata>
            </framework:place>
            <framework:place name="coding"></framework:place>
            <framework:place name="travis"></framework:place>
            <framework:place name="review"></framework:place>
            <framework:place name="merged"></framework:place>
            <framework:place name="closed"></framework:place>
            <framework:transition name="submit">
                <framework:from>start</framework:from>
                <framework:to>travis</framework:to>
                <framework:metadata>
                    <framework:title>transition submit title</framework:title>
                </framework:metadata>
            </framework:transition>
            <framework:transition name="update">
                <framework:from>coding</framework:from>
                <framework:from>travis</framework:from>
                <framework:from>review</framework:from>
                <framework:to>travis</framework:to>
            </framework:transition>
            <framework:transition name="wait_for_review">
                <framework:from>travis</framework:from>
                <framework:to>review</framework:to>
            </framework:transition>
            <framework:transition name="request_change">
                <framework:from>review</framework:from>
                <framework:to>coding</framework:to>
            </framework:transition>
            <framework:transition name="accept">
                <framework:from>review</framework:from>
                <framework:to>merged</framework:to>
            </framework:transition>
            <framework:transition name="reject">
                <framework:from>review</framework:from>
                <framework:to>closed</framework:to>
            </framework:transition>
            <framework:transition name="reopen">
                <framework:from>closed</framework:from>
                <framework:to>review</framework:to>
            </framework:transition>
            <framework:metadata>
                <framework:title>workflow title</framework:title>
            </framework:metadata>
        </framework:workflow>

        <framework:workflow name="service_marking_store_workflow" type="workflow">
            <framework:marking-store service="workflow_service"/>
            <framework:support>Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest</framework:support>
            <!-- Simple format -->
            <framework:place>first</framework:place>
            <framework:place>last</framework:place>
            <framework:transition name="go">
                <framework:from>first</framework:from>
                <framework:to>last</framework:to>
            </framework:transition>
        </framework:workflow>
    </framework:config>
</container>
