raoul2000 / yii2-workflow

A simple workflow engine for Yii2
BSD 3-Clause "New" or "Revised" License
171 stars 48 forks source link

force model to be a given status #35

Closed cornernote closed 8 years ago

cornernote commented 8 years ago

I have a use case where I need to bypass the workflow and directly set the status. I can't seem to find a method to do this. Is there any existing way to achieve this?

raoul2000 commented 8 years ago

You mean assigning directly a status to the status attribute of your model ? If that's the case you should try to call initStatus() after status attribute assignment (not tested). Please note that this will not fire any event ...

Let me know

ciao