your solution is very right and I confirm the record should be updated in DB. Now to tell you what may cause this incorrect behavior, I would need more info. Could you please post your Model, action, and workflow so I can help you ?
Thanks
Posted 13 April 2011 - 12:19 PM
Posted 14 April 2011 - 08:51 AM
//$model->swNextStatus('deploying');
$model->del_status='test_report';
$model->save();
Posted 14 April 2011 - 12:51 PM
Posted 15 April 2011 - 03:02 AM
Raoul, on 14 April 2011 - 12:51 PM, said:
Posted 15 April 2011 - 07:17 AM
Posted 03 May 2011 - 07:09 AM
Posted 03 May 2011 - 09:03 AM
class Subscription extends CActiveRecord {
// ....
public function afterSave(){
// assumes the relation name is 'client' and that the target status is 'client/signed_contact'
$this->client->swNextStatus('client/signed_contact');
}
}
Posted 03 May 2011 - 09:53 AM
Posted 01 June 2011 - 01:41 AM
Posted 01 June 2011 - 02:12 AM
Quote
Posted 01 June 2011 - 03:26 AM
'components'=>array(
// adding the simple Workflow source component
'swSource'=> array(
'class'=>'application.extensions.simpleWorkflow.SWPhpWorkflowSource',
// use a path alias only
'basePath' => 'application.my_workflows'
),
// ....Quote
// definition workflow1
array(
'initial' => 'A',
'node' => array(
array('id'=>'A', 'transition'=>'B,C'),
array('id'=>'B', 'transition'=>'C,D'),
// use the fullname workflow2/S1 to jump to another workflow
array('id'=>'C','transition'=>'B,D,workflow2/S1'),
array('id'=>'D')
)
)
// definition workflow2
array(
'initial' => 'S1',
'node' => array(
array('id'=>'S1', 'transition'=>'S2,S3,S1'),
// use the fullname workflow1/B to jump to another workflow
array('id'=>'S2', 'transition'=>'S1, workflow1/B'),
array('id'=>'S3')
)
)
Posted 01 June 2011 - 03:36 AM
Posted 01 June 2011 - 03:46 AM
Posted 01 June 2011 - 04:08 AM
Quote
Posted 01 June 2011 - 04:28 AM
Posted 01 June 2011 - 11:03 AM
$this->_wfs= Yii::app()->{$this->workflowSourceComponent};
Posted 01 June 2011 - 12:55 PM
'swSource'=> array(
// here, just add 'modules'
'class'=>'application.modules.extensions.simpleWorkflow.SWPhpWorkflowSource',
'basePath'=> 'application.models.simpleWorkflow.workflows',
),
public function behaviors()
{
return array(
'swBehavior' => array(
'class' => 'application.extensions.simpleWorkflow.SWActiveRecordBehavior',
// don't forget to declare 'myComponent' in the configuration !
'workflowSourceComponent' => 'myComponent'
),
...
demo.zip (52.08K)