framework:
  workflows:
    rebuild:
      type: 'state_machine'
      audit_trail:
        enabled: true
      marking_store:
        type: 'method'
        property: 'place'
      supports:
        - App\Entity\Scenario
      initial_marking: draft
      places:
        - draft
        - workers_stop_requested
        - workers_stopped
        - maintenance_mode_set
        - move_packs
        - call_service_hooks
        - sync_filesystem_modules_with_database
        - update_storage
        - call_pre_hooks
        - prepare_fs
        - build_code
        - set_configuration
        - install_dependencies
        - remove_modules
        - clear_xcart_cache
        - install_assets
        - update_module_structures
        - init_database
        - update_database_schema
        - deploy_demo_catalog_images
        - load_fixtures
        - create_admin_profile
        - resize_images
        - refresh_view_lists
        - call_post_hooks
        - done
      transitions:
        request_workers_to_stop:
          from: draft
          to: workers_stop_requested
        wait_for_workers_stop:
          from: workers_stop_requested
          to: workers_stopped
        set_maintenance_mode:
          from: workers_stopped
          to: maintenance_mode_set
        move_packs:
          from: maintenance_mode_set
          to: move_packs
        call_service_hooks:
          from: move_packs
          to: call_service_hooks
        sync_filesystem_modules_with_database:
          from: call_service_hooks
          to: sync_filesystem_modules_with_database
        update_storage:
          from: sync_filesystem_modules_with_database
          to: update_storage
        call_pre_hooks:
          from: update_storage
          to: call_pre_hooks
        prepare_fs:
          from: call_pre_hooks
          to: prepare_fs
        build_code:
          from: prepare_fs
          to: build_code
        set_configuration:
          from: build_code
          to: set_configuration
        install_dependencies:
          from: set_configuration
          to: install_dependencies
        remove_modules:
          from: install_dependencies
          to: remove_modules
        clear_xcart_cache:
          from: remove_modules
          to: clear_xcart_cache
        install_assets:
          from: clear_xcart_cache
          to: install_assets
        update_module_structures:
          from: install_assets
          to: update_module_structures
        init_database:
          from: update_module_structures
          to: init_database
        update_database_schema:
          from: init_database
          to: update_database_schema
        deploy_demo_catalog_images:
          from: update_database_schema
          to: deploy_demo_catalog_images
        load_fixtures:
          from: deploy_demo_catalog_images
          to: load_fixtures
        create_admin_profile:
          from: load_fixtures
          to: create_admin_profile
        resize_images:
          from: create_admin_profile
          to: resize_images
        refresh_view_lists:
          from: resize_images
          to: refresh_view_lists
        call_post_hooks:
          from: [refresh_view_lists, call_post_hooks]
          to: call_post_hooks
        done:
          from: call_post_hooks
          to: done
