To create a step that generates automatic email notifications, open the send email notification step wizard.
NOTE. Email notification can be sent only from Windows OS.
To send e-mail notifications, set up Sending Parameters in the Setting Up Parameters and Administrating Business Processes dialog box.
After the basic step properties have been determined, click the Next button on the first page of the wizard.
The next wizard page is Step Description:

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 owner role. The list contains roles of users specified in the authorization object. By default the field contains the Admin user.
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.
To determine time by which step must be finished, select the Finish Step By checkbox. On selecting the "minutes" or "hours" time measurement units, this box is hidden.
If the step is not finished by the scheduled execution period, the step status becomes Expired.
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:

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:
Text field. It opens the list of available variables. The variable values are generated depending on the unique parameters of each process instance:

NOTE. The list of variables varies depending on the location of email notification sending is specified: event process setting, setting events in step wizard, setting email parameters for the Email Notification Sending step.
Link to Object. Adding links to the step objects in use: algorithm, regular report, data entry form.
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.
Attach File. Files attachments to the mail. Available formats for attached files: image, MS Word and MS Excel documents.
NOTE. One email can contain maximum 10 attached files.The are constraints depending on the email service in use, for example, Gmail does not accept attached files size greater than 25 Mb.
HTML Import. Inserting HTML file to the email contents. On loading HTML file, the
HTML Mode is activated by default and the Email Preview dialog box opens, for example:

NOTE. On importing HTML file, the email contents is replaced by HTML code.
Fore Method. Adding method handler that starts on sending the email:

Determine for the Fore method:
Assembly. Select Fore unit in the drop-down list. Search by unit name is available.
To edit the selected assembly, click the
button.
To create a unit, click the
button.
Method. In the drop-down list select a method. The list contains all unit methods corresponding to the signature:
Sub OnBeforeSendMailMessage(Sender: IBProcessInstance; Args: IBProcessEmailEventArgs);
Parameter:
Sender. Process instance
Args. Event information: step, step old state, new state.
To refresh the methods list, click the
button.
To copy the method signature, click the
button.
HTML Mode. Enable/disable HTML mode. To open the email preview window, click the HTML Mode button and select the Preview Window dialog box.
NOTE. It is unavailable to insert images via HTML mode, select the
Attach File option.
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 launched on step execution start or end.
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.
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.
NOTE. Email notification can be sent only from Windows OS.
To change order of operations execution, use the
/
buttons on the toolbar, 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, set up process steps execution conditions.
See also: