I'm trying to create a custom action, the function is being called at the right time and everything.

however, i am having trouble parsing variables into my function.

Does the rules module automatically pass something? I need to get the $node and $user variables, and i haven't been able to work it out from the examples.

thanks in advance!

nick

Comments

mitchell’s picture

If your variable is a node reference, you can use an action to load that variable. You can add multiple actions to a rule, and loading the variable would be done before using the variable.

nicksanta’s picture

thanks for the reply, it wasnt the exact answer i was looking for but it put me in the right spot to work it out.
apparantly you need to specify these things called 'arguments' lol.

this

	$info['sems_workflow_rules_mail_to_assigned'] = array(
		'label' => t('Sends an update email to all assigned users'),
		'module' => 'sems_workflow',			
	);

to this

	$info['sems_workflow_rules_mail_to_assigned'] = array(
		'label' => t('Sends an update email to all assigned users'),
		'module' => 'sems_workflow',
		'arguments' => array(
		  'node' => array(
			  'type' => 'node',
			  'label' => 'the node',
			),
		),			
	);
fago’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mitchell’s picture

Component: Provided module integration » Provided Module Integrations

Updated component.