BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MariaD
Barite | Level 11

Hi Folks,

 

Is it possible to send an email when a task inside a process, in SAS Risk and Finance Workbench, is completed? My questions is because we have a flow that has differents users and responsibilities. Our idea is send an email to the next responsible user, when the previous task is completed, to alert him about his actions is required. 

 

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
rspinks_sas
SAS Employee

Hi Maria,

 

Yes, if you wanted to change the email message in the example I used previously, you would need to update the process definition and reload it. With existing projects that are using that process definition, any notifications that were sent before you reloaded the definition are still saved in the project. New notifications will use the latest definition.

 

However, reloading a process definition might not always be desirable (for example, reloading also restarts the project workflow). To help minimize the chances of having to do that, there are a couple of ways you can set up your notification rules:

  • Instead of using the message attribute in the notification rule (as in the previous example), you can use the template attribute to specify a separate email template file that resides on the server. Then if you want to change the content of the email, you can simply change the template file directly, without requiring a change to the process definition itself. (See product doc on notification templates here.)

  • A similar idea applies to the recipient list. If you list individual email addresses in the toRecipients attribute and decide later you need to change that list, you will need to reload the process definition. To avoid that, you can just specify a group instead and manage the members of the group outside SAS Risk and Finance Workbench in SAS Management Console. If you change the group’s membership, you can refresh the user entitlements to pick up the changes immediately (In the version 3.2 UI, click Configuration > User Entitlements > Refresh User Entitlements.).

Here’s an example of how such a notification rule might look:

 

{"eventType":"TaskEnded","toRecipients":"Group A","subject":"Task $TASK_ID$ completed","template":"notify_complete.html"}

Regards,

Richard

View solution in original post

3 REPLIES 3
rspinks_sas
SAS Employee

Hi Maria,

 

You can automate notifications from tasks in process definitions for several conditions:

  • When a task is started
  • When a task is completed
  • When a task is due within N days
  • When a task has been active (in progress) for N days
  • When a task is N days past its scheduled due date

In your case, you can send a notification when a task is completed by doing the following in your process definition file:

 

  1. On the Tasks sheet for the task in question, specify a value of 5 in the NOTIFICATION column. This enables you to specify a custom notification rule.
  2. In the NOTIFICATION PARAMETERS column, define the notification rule. For example, the following rule sends a notification when the task is completed:

    {"eventType":"TaskEnded","toRecipients":"someone@example.com","subject":"Task $TASK_ID$ completed","message":"Attention $PROCESS_TASK_OWNERS$: <br> Task $TASK_ID$ has been completed.  Your action is now required on the next task."}

 

Note: Be sure you have selected Enable email notifications in the project properties where you’re using the process definition.

 

For more information about defining notification rules in the Tasks sheet of your process definition, you can check out the product documentation (credentials required).

 

Hope this helps!

 

Regards,

Richard Spinks (with a big thanks to Ken Sizer and Kelly Young for their shared expertise!)

MariaD
Barite | Level 11

Thanks, @rspinks_sas! Very clear your answer! One more question about it, if I define an email on template definition, what happen when I need to change that email? I need to upload again the process definition file?  If is it the case, what happen the existing projects? 

rspinks_sas
SAS Employee

Hi Maria,

 

Yes, if you wanted to change the email message in the example I used previously, you would need to update the process definition and reload it. With existing projects that are using that process definition, any notifications that were sent before you reloaded the definition are still saved in the project. New notifications will use the latest definition.

 

However, reloading a process definition might not always be desirable (for example, reloading also restarts the project workflow). To help minimize the chances of having to do that, there are a couple of ways you can set up your notification rules:

  • Instead of using the message attribute in the notification rule (as in the previous example), you can use the template attribute to specify a separate email template file that resides on the server. Then if you want to change the content of the email, you can simply change the template file directly, without requiring a change to the process definition itself. (See product doc on notification templates here.)

  • A similar idea applies to the recipient list. If you list individual email addresses in the toRecipients attribute and decide later you need to change that list, you will need to reload the process definition. To avoid that, you can just specify a group instead and manage the members of the group outside SAS Risk and Finance Workbench in SAS Management Console. If you change the group’s membership, you can refresh the user entitlements to pick up the changes immediately (In the version 3.2 UI, click Configuration > User Entitlements > Refresh User Entitlements.).

Here’s an example of how such a notification rule might look:

 

{"eventType":"TaskEnded","toRecipients":"Group A","subject":"Task $TASK_ID$ completed","template":"notify_complete.html"}

Regards,

Richard

Discussion stats
  • 3 replies
  • 1491 views
  • 2 likes
  • 2 in conversation