The Rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules). It's a replacement with more features for the trigger module in core and the successor of the Drupal 5 workflow-ng module.
Example use cases
- Build flexible content publishing workflows changes
- Send customized mails to notify your users about important
- Create custom redirections, system messages, breadcrumbs, ...
- Build an eCommerce store using Drupal Commerce
And many more...
Features
- Obviously, you may use reaction rules to react upon any event with custom conditions and actions.
- Allows functionality to be re-used via components (Drupal 6: Rule sets only).
- Flexible scheduling system that allows scheduling any component / action.
- Users can share their customizations by using the built-in import/export feature. For that the module also integrates with Features.
- Modular input evaluation system - for example you can install the Token module and use it in every action.
- The module has been developed with site performance in mind, so it makes use of caching routines to speed up rule evaluation.
- Rules 2.x (Drupal 7 only) features improved APIs, a new admin UI, support for all entity types, parameter configuration via simple data selection (i.e. just pass
node:authoras argument) and much more. See this blog post for more details.
Integrations
Modules may use the Rules module's API to provide new events, conditions, actions or default rules, which can be customized by users. Some notable ones are:
- Rules Link - Provides clickable links on entities and views that trigger Rules execution
- Rules list conditions - Allows checking condition(s) on list items, evaluating to TRUE if either "any" or "all" items match the condition(s)
- Views Rules - Provides Views directly as Rules actions and loops to seamlessly use view result data
- Rules Forms - Provides a Rules based method for controlling forms and their elements
- Conditional Rules - Provides inline conditional branching in Rules configuration with statements: If/Else, Switch/Case, While
To make your own integration, check out the developer docs. See also issues tagged rules-integration and a manually updated list of modules supporting Rules.
Requirements
Drupal 6:
- To get token replacements in your actions, install the latest release(6.x-1.12 or later) of the Token module
Drupal 7:
- Entity API - Version 1.0 beta 9 or later!
Drupal 8:
- Typed Data API enhancements - latest release or the latest development snapshot
Resources
- Rules Documentation Handbook
- docs.d8rules.org - developer documentation for Rules 8.x-3.x
- Get support and help others at Stackexchange!
- Rules Group for users and developers
- fago's blog
Credits
- The project has been sponsored by drunomics, epiqo and Google Summer of Code.
- The Drupal 8 port is being sponsored by Acquia, Technocrat among other supporters, plus many individuals who backed the module via drupalfund.us! We are still looking for more sponsors, see d8rules.org.
Maintainers
- Wolfgang Ziegler (fago) (lead maintainer)
- Klaus Purer (klausi)
Past issue queue maintainers
Update troubles?
Please read the issue summary of https://drupal.org/node/2090511.
Drupal 8
Repository: https://github.com/fago/rules
Developer docs: http://docs.d8rules.org/
Would you like to see Rules for Drupal 8 being ready as early as possible? Follow the Rules 8.x Roadmap, checkout out the #d8rules initiative and support us:
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 301,143 sites currently report using this module. View usage statistics.
- Downloads: 2,397,299
- Automated tests: Enabled
- Last modified: September 30, 2016
Stable releases are covered by the security advisory policy.
Look for the shield icon below.
Downloads
Recommended releases
| Version | Download | Date |
|---|---|---|
|
7.x-2.9 |
tar.gz (184.45 KB) | zip (223.02 KB) | 2015-Mar-16 |

