raoul2000 / yii2-workflow

A simple workflow engine for Yii2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement constraint for transitions

papa-stiflera opened this issue · comments

Implement constraint for transitions as in version for Yii1.

commented

Status constraint are not available anymore as PHP code declared in the workflow definition. They should now be implemented as event handler attached to a beforeEnterStatus event. If the constraint is not satisfied, it must invalidate the event so to block the transition.

I will write a chapter on this in the Guide soon....

commented

check this chapter for details on how to implement status constraints...