Maestro supports notifications to be set in the workflow tasks for task assignment, task completion, reminders and escalations which can be set to workflow users.

The message can be custom using a tokens but there is no current way to extend or alter the supported tokens.

The tokens supported now are: [task_console_url], [workflow_name], [task_name] and [task_owner]

The notification system was designed to be extended and ships with 3 examples for email, watchdog and twitter but we don't yet have a way to easily add or alter the tokens using in the messages entered in the task properties.

Comments

blainelang’s picture

Status: Active » Closed (fixed)

The notification base class has been updated and change committed to allow modules to alter and extend the tokens and their replacement values.

Developers should use HOOK_maestro_notification_token_alter to alter the tokens before the notification subject or message is formatted.

Example:
/* @param $token_data
* Array of tokens and their replacements keyed by token_key
*/
function my_module_maestro_notification_token_alter($token_data) {

$token_data['tokens']['mod'] = '[message_of_day]';
$token_data['replacements']['mod'] = 'Have a nice day!';
return $token_data;
}