hook_workflow - delete before execute (Not possible to schedule another transition)
meba - April 5, 2009 - 12:00
| Project: | Workflow |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | workflow |
Jump to:
Description
Hi,
in workflow_execute_transition():
// Notify modules that transition has occurred. Actions should take place
// in response to this callback, not the previous one.
module_invoke_all('workflow', 'transition post', $old_sid, $sid, $node);
// Clear any references in the scheduled listing.
db_query('DELETE FROM {workflow_scheduled_transition} WHERE nid = %d', $node->nid);This means that the hook is run before the transitions are deleted from the table. Result - i can't respond to a state transition in the hook by scheduling another transition, because the code will delete it immediatelly.
It should be fairly simple to just switch both lines...
| Attachment | Size |
|---|---|
| workflow_transition.patch | 1.25 KB |

#1
Adding a tag
#2
Is anybody interested in this issue?