To create a step that generates automatic email notifications, open the send email notification step wizard.
To send email notifications, add global variables:
EMAIL_HOST. SMTP server to send messages.
EMAIL_PORT. Port to send messages.
EMAIL_LOGIN. Login to send messages.
EMAIL_PASSWORD. Password to send messages.
EMAIL_FROM_MAIL. Sender address.
EMAIL_DOMAIN. Domain to send messages.
EMAIL_FROM_NAME. Sender name.
NOTE. Global variable can be added using the Processes. Utilities utility with the BP_UTIL identifier. Start utility, click the Email Notification Sending Parameters button. The form containing message sending parameters opens, when it is filled in, the required global variables will be added automatically.
After the basic step properties have been determined, click the Next button on the first page of the wizard. The Step Description page opens:

Determine the following for the Send Email Notification step on the Step Description page:
Access Role. The box is mandatory. In the drop-down list select the access role. The list contains roles of users specified in the authorization object.
If there is no required group of users in the list, click the Open Security Manager button. The dialog box of security manager of Foresight Analytics Platform, which enables the user to create a required group of users.
Enter a numeric value of step execution time and select a time measurement unit in the list:
Minute.
Hour.
Day (default).
Week.
Month.
Quarter.
Half-year.
Year.
The checkbox selected in the Finish Step By box enables setting the time by which the step is to be finished. On selecting the "minute" or "hour" time measurement units, this box is hidden.
If the step is not finished by the planned execution time, its state becomes Expired and Not Executed or Completed with Error.
The step execution period impacts the whole process execution period, which is determined on starting process for execution.
Step Description. The box is optional. A text box for entering a comment for a step.
After the parameters have been determined on the Step Description page, click the Next button.
The next wizard page is Email Parameters, for example:

Determine the following for the Send Email Notification step on the Email Parameters page:
To; Copy; Bcc. The recipient email is entered manually, using option of copy/paste from clipboard.
Subject. The email subject is entered manually, using option of copy/paste from clipboard.
Contents. it is entered manually using the following options:
Variables Values Substitution. To call the list of available variables, click the
button. The variable values are generated depending on the unique parameters of each process instance:

Add Links. To add links to the step objects in use: regular report, algorithm, data entry form - click the
button.
NOTE. Objects by link are viewed in the desktop application, that is why previously check that the web application is created and it contains referenced objects.
Files Attachments. To attach files, click the
button. Available formats for attached files: image, MS Word and MS Excel documents. There are size restrictions depending on the mail service in use. For example, for Gmail: maximum ten attached files up to 25 Mb.
After the parameters have been determined on the Email Parameters page, click the Next button.
The next wizard page is Events:

Set up automatically executed actions started when one of the events is occurred: step execution start, step execution finish and step rejection.
On generating a list of executed actions, select a tab with event first:
Before Execution. The list of actions will be started before executing the current step in the specified order.
After Execution. The list of actions will be started after executing the current step in the specified order.
On Rejection. The list of actions will be started on the current step rejection. The list is available for steps with manual execution. If the step is executed automatically, the tab is not displayed.
To add an event, click the
button on the ribbon. The number of added actions is unlimited.
Actions to be added:
. Execute Fore method. In the right part of the window select:
Unit. In the drop-down list select a unit written in the Fore language, the list contains all repository units and folders containing units. Search by unit name is available.
Method. In the drop-down list select a method. The list contains all unit methods corresponding to the signature:
Sub <Fore method name>(Sender: IBProcessInstance; Args: IBProcessStepStateEventArgs);
Parameter:
Sender. Process instance.
Args. Event information: step, step old state, new state.
. Send Email Notification. In the right part of the window select:
To; Copy; Bcc. The recipient email is entered manually, using option of copy/paste from clipboard.
Subject. The email subject is entered manually, using option of copy/paste from clipboard.
Contents. The contents is entered manually using the option of variables values substitution with step parameters, links to step objects to view in the web application, file attachment.
To change the actions execution order, use the
/
buttons, to delete - the
button.
The list of automatically executed actions can be empty.
Click the Finish button to exit the wizard.
After creating the process steps, go to the steps execution emulation.
See also: