Hello,
I'm looking for a way to launch a component which have be done with the rules UI in Drupal.
I watch this video, it seems so simple with "event", I miss something I guess..
http://drupalize.me/videos/invoking-rules-events

In my module here is the function which has to launch the component

function creation_commission_ca($order) {
	rules_invoke_component('calculer_remuneration_vdi_sur_ca',$order, get_HT($order));
	rules_invoke_component('test');
	dpm($order);
}

the get_HT($order) function get back a drupal message, so she is OK, then I see the dmp of the order, but both components
calculer_remuneration_vdi_sur_ca
test
...are not launched...
Do I need to declare the component in a .inc file?
At this moment, there is only one file in my module .module.

Can you help ?

Comments

zorax’s picture

Issue summary: View changes
zorax’s picture

Issue summary: View changes
TR’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: -Component

rules_invoke_component() is the correct way to invoke the component. Make sure you have the machine name correct - Rules prefixes UI-created component machine names with rules_.