How to prevent a node being saved when using the Rules module? Is it possible to prevent a node from being saved with Rules? This is what I do now:


Create a rule Before saving content of type ''.


Condition: IF ...


TRUE => Redirect &amp; set message


Create a rule After saving content of type ''.


Calculate &amp; set value



So when a condition is true before saving I want to redirect the user, show a message and DON'T save node.

When it's not true I want to save the node and do the actions in the after saving content of type rule.

The problem is that when the condition is true in the first rule, the redirect and set message is performed. But directly afterwards the node is saved and the actions in the other rule are executed.

How can I make sure that the second rule doesn't get executed? Can I do this without custom code?
I would try to use the Conditional Rules module for this. Some more details about this module (from its project page):


  ... provides Rules plugins for conditionally altering execution flow directly inside a group of actions.


So create a rule in which you add these actions:


Conditional (which you add via the 'Add conditional' link at the bottom)
If Condition (which you add via the 'Add If' link to the right of the 'Conditional' action, and 'Condition' is what you mentioned in your first rule already).
Redirect &amp; set message (which you add via the 'Add Action' link to the right of the 'If' action, and 'Redirect &amp; set message' is what you mentioned in your first rule already). 
Else (which you add via the 'Add Else' link to the right of the 'Conditional' action.
Calculate &amp; set value (which you add via the 'Add Action' link to the right of the 'Else' action, and 'Calculate &amp; set value' is what you mentioned in your second rule already). 


Here is a screenprint of a rule with an action that uses Conditional Rules (though only with an "if"-part here, no "else"):