What is yii2-workflow ?

yii2-workflow is an extension of the Yii2 Framework, designed to help you manage workflow in your app. It is the successor of simpleWorkflow which was developed some years ago for the 1.x version of Yii. Both extensions try to keep thing simple and easy to use. They rely as much as possible on standard Yii2 features like Events, components, behaviors, etc.

Before going any further in your reading it is important to understand what yii2-workflow is not :

  • it is not a complete and complex workflow engine
  • it does not provide any UI components (basically it's a behavior that you add to your ActiveRecord models)
  • it is not a solution to all your problems (I whish it would though)

Requirements

Well, the only requirement here is to have installed the latest version of the Yii2 Framework (or at least a version greater or equal to 2.0.3).

How to install

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist raoul2000/yii2-workflow "*"

or add

"raoul2000/yii2-workflow": "*"

to the require section of your composer.json file.

What's next ?

If you have been using the previous implementation of this extension it could be a good thing to start by reading the Upgrade From 1.x chapter.

If you want to know more about workflow in general in the features provided by yii2-workflow in particular, check the overview chapter.

If you feel like an advanced workflow Expert (more or less), the dive into the Concept chapter.