Hi all,
In 2.x, I cannot find the "workflow transition state change" (or something like it) condition in rules.
I want to test the transition of my nodes, from one state to another (e.g. review -> expired).
My problem is that if I only check the existing workflow state, the rules fire when the transition is done, but also when I edit the node and save it.
From what I've searched, this condition is present in workflow 1.x
Thanks

Comments

johnv’s picture

In 2.x, the workflow is a normal field. Althiugh there are some specialties, in this case you use the normal field selectors:
if node:field_myworkflow=3 and node:unchanged=4 then trigger my_rule.

cirrus3d’s picture

Thanks for the prompt reply. Would you be kind to elaborate on what the node:unchanged=4 means exactly? Does this refer to the previous workflow state?

johnv’s picture

Yes yku will find that node:__ contains the new value and node:unchanged:__ contains the old value. This way both afe the same when you just save a node without changing workflow. You nay need to enable Token or Entity Tokens. Please confirm if you need to do that.

cirrus3d’s picture

Status: Active » Fixed

Your recommendation seems to have worked. Thanks!

johnv’s picture

Status: Fixed » Closed (works as designed)

Nice to hear! Good luck!

johnv’s picture

Category: Bug report » Support request
johnv’s picture

Version: 7.x-2.3 » 7.x-2.x-dev