Coding Rules Integrations
The Rules API provides hooks for developers to create extensions/integrations and further extend the API. The module comes with complete API docs for all provided hooks, available online at Rules Hooks) or by viewing the rules/rules.api.php file.
The sections below describe how to code additional data types and plugins, as well as programmatically interact with rules configurations, execute rules, and define user-facing displays.
Many sections link to NodeOne's Learning Library for their video tutorials on Coding for Rules 2. 4 out of 5 Drupalers recommend it as the more entertaining choice ;-)
All rules hooks must be placed either in the main module or in a mymodule.rules.inc file in the module's root. Unfortunately it's not possible to specify a mymodule.rules.inc file in a module subdirectory such as "includes". See here for more information.