Download the PHP package kitpages/workflow-bundle without Composer
On this page you can find all versions of the php package kitpages/workflow-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kitpages/workflow-bundle
More information about kitpages/workflow-bundle
Files in kitpages/workflow-bundle
Package workflow-bundle
Short Description This is a Symfony2 bundle that provides a workflow system.
License MIT
Homepage https://github.com/kitpages/KitpagesWorkflowBundle
Informations about the package workflow-bundle
KitpagesWorkflowBundle
This bundle provides a generic workflow system.
It is used in production on a specific project, but it must be considered as an beta version.
Use case
Imagine you manage (technically) 3 different newspapers : "NYC news", "Paris news" and "Grenoble news".
- For NYC news, an article has to be validated by the editor in chief only (and rewritten by the author until the editor says yes). Then it should be integrated to the printing process.
- For Paris news, an article is firstly validated by a secretary, then by a pair (another author from the same domain) and the editor. Then it should be integrated to the printing process.
- For Grenoble news : This is only an online newspaper. No validation, but it can be unpublished by the editor later
You can build a single, coherent code that can manage these 3 different buisiness processes. You can do that through a workflow system. Each newspaper process is represented by a workflow configuration file.
This bundle provides a generic workflow system build to represent any business process.
Quick start
-
add default step in config.yml
- using
State of the bundle
- beta state
- partially tested (60%)
- under travis-ci
Installation
Add KitpagesWorkflowBundle in your composer.json
Now tell composer to download the bundle by running:
AppKernel.php
Very minimal configuration in config.yml
Principles
General mecanism
- This bundle is used to manage a state machine
- The configuration of the workflow is defined in a WorkflowConfiguration object
- The current instance of a machine state is in a Workflow object
- A workflow manager keep references of every workflow, listen for ActionEvents, run steps, change workflow states,...
- A step contains the operations to do after the reception of an ActionEvent. Then the returned value allows to decide the next workflow state according to the configuration.
- Every workflow state listen for some ActionEvent
Everything is done in steps
Steps are classes that does something. Steps are documented in the project on github : KitpagesStepBundle.
We are using steps that extends the AbstractWorkflowStep that add a reference to the current workflow and the actionEvent.
Example of step :
Configuration
Code of the step
More advanced Features
TODO : features to document
- workflow parameters
- sub workflow
- workflow events and step events
- workflow configuration shortcuts
- workflow persistance
- serveral workflows in parallel
Versions
- 2014/04/24 : v1.0.0 - first stable release
Roadmap
Backward compatibility is maintained for version 1.x.
By 2014/06
- more tests and docs
- yaml parser in service (static call will remain but deprecated)
- pre-generation and cache for the proxy system
Later :
- a convivial debug interface
All versions of workflow-bundle with dependencies
symfony/framework-bundle Version ~2.3
symfony/monolog-bundle Version ~2.3
symfony/console Version ~2.3
kitpages/step-bundle Version ~1.1