You have the Send Reminder activity, but have not yet implemented it. You will set the
implementation type of its Main Task as a method. This method sends a reminder e-mail.
-
Right-click on the Send Reminder activity and click .
The
Main Task dialog box appears.
-
Verify that Method is selected in the Implementation Type
drop-down list. If not, set it.
-
In the Method panel, click New.
The
New Process Method dialog box appears.
-
Enter sendReminder in the Method Name text box,
and click OK.
-
Back in the Main Task dialog box, click Edit.
A PBL code editor opens for the
sendReminder method.
-
Enter the following code, exactly as shown, but replace <your e-mail address>
with an e-mail address you have access to:
// Send reminder e-mail
reminderEmail as Mail
reminderEmail = Mail()
reminderEmail.from="<your e-mail address>"
reminderEmail.recipient=Participant(report.submittedBy).email
reminderEmail.subject="Expense Report Message"
reminderEmail.message="This is to remind you that a report you submitted requires editing."
sender as MailSender
sender = MailSender(reminderEmail)
sender.send()
-
Save and close the editor.
-
For this to work, you also need to configure the Studio engine with a working outbound
(SMTP) e-mail server. In the Project Navigator, right-click
on the top of the ExpenseManagent project, and click
(
).
The Engine Preferences dialog appears.
-
Enter the name of your SMTP mail server in the SMTP Mail Server
Name field, for example smtp.xyzcorp.com.
-
Click OK.
The engine dialog box closes with the new settings.