Is there a way to programmatically create a Rules component?
I mean a component like the ones listed on
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Rule components can be programmatically created- although they can be quite cumbersome to code from scratch. I'd recommend building a component with some conditions, actions, and rulesets and exporting it. Then you can analyze the exported php to determine how to define your custom component set.
You'll most likely want to reference:
A list of the hooks available for the D7 version of the Rules module can be found here: http://www.drupalcontrib.org/api/drupal/contributions%21rules%21rules.api.php/group/rules_hooks/7
A good set of Developer Documentation for custom rules (albeit an old set of documentation for the D6 version of Rules) can be found here: https://www.drupal.org/node/298486