triggering a transition depending on validation result is indeed a good solution, and I think it should be implemented at a higher level than by the simpleWorkflow
behavior itself. Now the problem is : why doesn't your sw:PENDING_VALID validation rule trigger ? what is the extension version you're using ? I will make some tests on it, just to check that there is no hidden bug messing around
I'm not sure to understand what is your request, but here is a short description of inter-workflow transition with the simpleWorkflow
The way inter-workflow transitions are implemented in the simpleWorkflow
extension is quite ... simple.
A status id used internally by the extension has always the following format : <workflow_id>/<node_id>
(e.g. : "swPost/valid", "task/assigned" ...). When you work with one only workflow, you don't have to use the fullname in your code, as long as you have defined what the "default workflow
" is (this is because the extension will always use the default workflow associated to the model). So when you write :
... the simpleWorkflow
extension will use the default workflow that you have associated to the Post model (for example : 'myPost'), and then create a full status id : 'myPost/validated'.
Now if you want to jump from a workflow to another, you must use the full status id in the workflow definition array :
'initial' => 'S1',
'node' => array(
'id' => 'S1',
'label' => 'status S1',
'id' => 'S2',
'transition' => 'anotherWorkflow/P1' // jump to another workflow !!
// etc ....
Of course, if you want to be able to jump to the other workflow, you must provide a definittion for this workflow ...
Hope this helps.