drupalworkflowcckdrupal-rules

Run rule only if workflow state changed to XYZ


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?


Solution

  • 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.