Run rule only if workflow state changed to XYZ

590 views Asked by At

In Drupal I'd like to set up a rule that only runs if a workflow state is changed to a specific state. For example, if an Application is marked as 'submitted' and was previous marked as 'draft', I'd like to execute a specific block of PHP.

Is this possible?

2

There are 2 answers

0
gahloot On BEST ANSWER

Yes, using the Rules module this is very simple. The Rules modules lets you test for the change of a specific fiel and test for its value, then run some action. You will need to create your own Action in module code and make it available to Rules so you can execute your own php code, there are some good examples, drupal.org/project/rules.

0
colan On

You should be able to use Rules without writing your own integration code as the Workflow Rules module, bundled with Workflow, does this.