framework:
    workflows:
        milestone:
            type: 'state_machine'
            marking_store:
                type: "method"
                property: "status"
            supports:
                - App\Entity\Milestone
            initial_marking: proposed
            places:
                - proposed
                - planned
                - to_fill
                - in_review
                - validated
                - approved
            transitions:
                accept_proposal:
                    from: proposed
                    to: planned
                ask_fill:
                    from: planned
                    to: to_fill
                fill:
                    from: [to_fill, planned]
                    to: in_review
                approve: # Approve the milestone by the project responsible
                    from: in_review
                    to: approved
                validate: # Validate the milestone by the project monitor
                    from: approved
                    to: validated
                invalidate: # inValidate the milestone by the project monitor
                    from: approved
                    to: in_review
                revise:
                    from: in_review
                    to: to_fill


        project_workflow:
            type: "state_machine"
            supports:
                - App\Entity\Project
            marking_store:
                type: "method"
                property: "status"
            places:
                - draft
                - planning
                - planned
                - in_execution
                - on_hold
                - completed
                - closed
            transitions:
                submit_drafted_project:
                    from: draft
                    to: planning
                submit_project_planning:
                    from: planning
                    to: planned
                start_execution:
                    from: planned
                    to: in_execution
                execution_to_hold:
                    from: in_execution
                    to: on_hold
                hold_to_execution:
                    from: on_hold
                    to: in_execution
                execution_to_completed:
                    from: in_execution
                    to: completed
                close:
                    from:
                        [
                            draft,
                            planned,
                            planning,
                            in_execution,
                            on_hold,
                            completed,
                        ]
                    to: closed

        tasks_workflow:
            type: "state_machine"
            supports:
                - App\Entity\Activity
                - App\Entity\Component
            marking_store:
                type: "method"
                property: "status"
            places:
                - unprioritized
                - prioritized
                - planning
                - planned
                - in_progress
                - review
                - completed
            transitions:
                schedule:
                    from: prioritized
                    to: planning
                confirm_planning:
                    from: [planning]
                    to: planned
                back_planning:
                    from: planned
                    to: planning
                start:
                    from: planned
                    to: in_progress
                review_request:
                    from: in_progress
                    to: review
                refinement:
                    from: review
                    to: in_progress
                complete:
                    from: review
                    to: completed
                deprioritize:
                    from: [prioritized, planned, in_progress, review, completed]
                    to: unprioritized
                prioritize:
                    from: unprioritized
                    to: prioritized
