Last updated May 4, 2013. Created on April 18, 2012.
Edited by sisko, mitchell. Log in to edit this page.
- Reaction rules are Rules configuration that triggers on selected events on your site. Each reaction rule may contain several (triggering) events, conditions and actions.
- Events are used to trigger reaction rules. Each event may provide any number of variables for the rule to act on. Events are often tightly coupled to Drupal "hooks".
- Actions are the things carried out by rules. Actions could be sending messages or redirecting site users, but actions can also manipulate variables available to the rule – such as changing a node title or published state. A particularly useful action is set a data value.
- Conditions can be added to rules in order to have actions executed only when certain criteria are met, such as a user having a specified role or a node being older than a month. Conditions may be combined into and and or groups. A particularly useful action is data comparison.
- Components are stand-alone Rules configuration, that can be reused by Rules, other modules, and also called programmatically from code. Components are useful for making complex configuration easier to reuse and maintain.
- Variables are the input and output of Rules plugins and components. All variables belong to a certain type, such as nodes (content), taxonomy terms, text strings or dates. Each data type can also be present in lists, such as a list of users. Data types rely to a large extent on the Entity API module.
- Data selection is an input method used in Rules configuration, allowing the administrator to drill through the data known to Rules in that particular setting. Two advantages of data selection is that it (1) is sensitive to restrictions on data types and (2) allows exploring "chained" data – for example using
node:author:… to explore properties of a node's author (without the user object being explicitly loaded in Rules).
- Plugins are the foundation for the module's reusable configurations. Actions, conditions, events, and components are all plugins. Also the UI is reusable on a plugin basis by using the methods as defined by the RulesPluginUIInterface. It's possible to embed a form for managing a bunch of user created components or reaction rules, e.g. restricted to the events a module provides.
- Elements are the instances of a plugin in a configuration. When configuring a rule, each element is configured by setting the necessary options. Nesting elements, such as beneath an AND or LOOP plugin in the UI, forms a parent/child array of embedded elements, which are controlled by each plugin's definition of which types of plugins are embeddable beneath it. This is used in UI for restricting "draggability".
Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.