You now have the Send Reminder activity, but have not yet defined
how it will work. You will set its Main Task as a method which will send an
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.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 will also need to configure the Studio
engine so that it knows where to send e-mail. In the Project Navigator,
right-click on the top of the ExpenseManagent project, and click
(
).
The Engine dialog box appears.
- Enter the name of your SMTP mail server in the
Mail Server Name field, for example
smtp.xyzcorp.com.
- Click
OK.
The engine dialog box closes with the new settings.