I'd like to programmatically alter the target state of a transition in certain situations. I thought I might be able to do it with hook_workflow, op == transition pre, but the transition object isn't passed by reference.

If I veto the current transition and create a new one from within hook_workflow, I have to do something to prevent an infinite loop. I'm doing this whenever the current state is X.

Note that when I need to change the target state, it's always back to the previous state. Is it possible to use workflow_revert programmatically from within hook_workflow?

Thank you!

Comments

rubymuse created an issue. See original summary.

johnv’s picture

Status: Active » Fixed

You have numerous options. Please check workflow.api.php from the dev version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.