Rules is a great module for creating event driven actions through the UI and is used throughout the Drupal Commerce modules.

Rules created through the UI can be exported using Features and re-used on multiple sites, but if you want to include a rule with you module that can be dynamically altered depending on the sites configuration this doesn't work.

In this session I will give a brief introduction to rule and explain how to use hook_default_rules_configuration() and hook_default_rules_configuration_alter() to include rules with your module without the need for Features.

I will use the examples from the Commerce European Union VAT module to demonstrate negating conditions, condition sets, and nesting rules.

Further reading
The Little Book of Rules
- drupal.org/files/tiny-book-of-rules.pdf

D.O Documentation
- drupal.org/node/298476
- drupal.org/node/1580776

Learning Rules Framework Videos
- nodeone.se/en/learn-the-rules-framework

DrupalCamp North West [camp2012.nwdrupal.org.uk] is an event of The North West Drupal User Group [camp2012.nwdrupal.org.uk/nwdug]

This film was made possible thanks to a Drupal Association Community Cultivation Grant and the generous support of our sponsors camp2012.nwdrupal.org.uk/our-sponsors

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…