Let's say that your email template is named "sendToNextUser" and it has the following content:
------
Dear @#nextAssignedUserFullName,
You have been assigned to case @#APP_NUMBER.
------
Then, your trigger code would be:
Code: Select all$taskUID = '1220028735824ce9181a724086456364'; //set to next task ID
$aAssigned = PMFGetNextAssignedUser(@@APPLICATION, $taskUID);
$fullName = $aAssigned['USR_FIRSTNAME'].' '.$aAssigned['USR_LASTNAME'];
$aVars = array('nextAssignedUserFullName' => $fullName);
$c = new Cases();
$aUsers = $c->getUsersParticipatedInCase(@@APPLICATION);
$to = $aAssigned['USR_EMAIL'];
foreach ($aUsers['array'] as $userId => $userInfo) {
$to .= (empty($to) ? '' : ', ') . $userInfo['USR_EMAIL'];
}
PMFSendMessage(@@APPLICATION, 'boss@example.com', $aAssigned['USR_EMAIL'], '', '',
'Upcoming case to work on', 'sendToNextUser.html', $aVars);
See:
https://wiki.processmaker.com/3.1/Proce ... User.28.29
https://wiki.processmaker.com/3.0/Inter ... Case.28.29
Remember that you should use a database query in a trigger fired after routing to look up the next assigned user if the next task does not have cyclical assignment.