Email actions in Processes

In Processes, you have the option of sending automated emails using the "Email Action" process element.

In addition, you can use the "IMAP event source" process item to monitor the folders of an IMAP mail server and therefore react to the receipt of an email, for example.

Click here for more information.

Email Action

Use this action to send content to selected recipients at will. Adding recipients is just as dynamic as the design of the mail content, from individual pages in Intrexx applications, to pages generated with Groovy or Velocity, to pure text mails.

In order to use this function, the email service must be configured in the "Tools" module. To send emails with links to portal pages via the process, the field "base URL" in the portal properties must contain the root URL of the portal (such as https://portal.example.com/).

You can find the email action in Processes in the "Elements" section. It can be dragged and dropped to the desired location in the process chain and then configured. General information about creating process items can be found here.

Once you have created the email action on the workspace, open the Properties dialog by double-clicking on the element.

General

Enter the title and a description here. Click on "Next".

Content

Subject

Static subject, language independent

Here, you can specify any static text that will be used in the subject line of every email.

Static subject, language dependent

Here, you can specify a language-dependent static text that will be used in the subject line of every email. The language which is used for the subject corresponds to the language used for the email's body. The language is usually determined from the context.

More information is available in the Java documentation: de.uplanet.lucy.server.ContextLanguage.

The language can be overwritten with the expert attribute "language". Either a language code, e.g. "de" or "en", or a variable from the processing context, which contains a language code, can be used as the value.

Multilingualism

Opens a dialog where the title can be entered in each of the portal languages.

System value

Displays the selected system value.

Edit system value

Opens a dialog where the system value can be edited.

Data Field

The subject can also be generated dynamically from the value in a data field. Select the required data field from the drop-down list.

Content

Page from application

Select the view page you want to send from this list. The values of the current record will automatically be used. Please note that all recipients of the email must have read permissions to the page. If no read permissions have been granted, the page will not be sent. Click here for more information about permissions.

Edit parameter

Opens a dialog where the parameters demanded by the target page can be edited.

Generate message from static text

This option gives you the ability to compose a fixed text for the email.

Edit text

Opens an Editor where the text can be edited.

Generate message from Velocity code

With this option, Velocity script will be used to provide the text for the email.

Edit Velocity code

Opens the Velocity editor where you can create messages from the context.

Options

HTML

If this option is selected, the email will be sent in HTML format. Buttons can then be added to the page, which link to specific pages of the application.

Text

If this option is selected, the values in the view and edit fields will be displayed in text format, and separated by tab stops.

SMS

If this option is selected, all line breaks are removed, the complete text is placed in the subject, and the message is sent by SMS, provided that a facility to send SMS messages has been setup by your telecommunications provider.

Message header

Indicates whether the message header has been configured or not.

Edit message header

Opens a dialog where the header information for the email can be configured.

Message headers

Select the desired header property by clicking in the corresponding cell. Predefined properties can be selected from the drop-down list that will appear. Custom properties can be written in the cell directly. The values are filtered accordingly when a property is selected, so you can easily select the values concerned here.

Add message header

Creates a new line to the list for a new property.

Remove message header

Removes the selected row from the list.

mailheader.properties

Both the names of the properties and the values that can be selected here are recorded in the mailheader.properties file. in the installation directory /client/cfg. This can be modified and added to.

Dynamic header value

Instead of static values, dynamic values can also be implemented here, for example from the shared state of the current processing context. The following prefixes are supported:

urn:sharedState:
urn:request:
urn:session:
urn:user:
urn:systemDataGroup:

In a specific example within a Groovy action or filter condition,

def strValue = g_record["5A1D3EC0DB71BE6B6BC4F83BECCE85ACD22F82E6"].value
g_sharedState.customValue = strValue

can be used to define a shared state variable with the name "customValue", which will be filled with a specific value, such as the value from a data field. In a follow-on email action, the value set in the shared state can be read out again. For this, use the prefix named above: urn:sharedState: followed by the name of the variable defined in the Groovy action, customValue When using an entry from a system data group, the value is put together as follows:

urn:systemDataGroup:APPLICATIONS_GUID:DATAFIELD_GUID

Enter the application GUID here where the system data group was created, and the GUID of the data field from the system data group, the value of which should be used, e.g.:

urn:systemDataGroup:142EB475CEF4B719CE2A8430AFEEAF986BFCB229:8647E7B2E26E98FCBAF32DE2C867B2EF756707DA

Click on "OK" to save the settings and close the dialog.

Click on "Next".

Sender

Send from

Current user

With this option, the email address of the current user will be retrieved and entered as the sending address.

Person responsible for the application

The email address of the user, who has most recently saved the application to which the process belongs, will be used.

Static address

With this option, a static email address of your choice can be entered.

Address from data field

This option allows a data field to be used as a dynamic sender list.

Default sender from email service configuration

The default sender is used

System value

With this option, system values can be used as the source of the email address.

Edit system value

Opens a dialog where the system value can be edited.

Options

Use alternative sender address

This option can be used to specify an address which will be used when an email address is not defined or when errors occur.

Click on "Next".

Recipient, Recipient CC, Recipient BCC

Static distribution list

Here, a fixed list of email addresses can be entered as a distribution list. The individual addresses must be separated with a semicolon.

Dynamic distribution list

Application, Data group, Data field

Select the source of the email addresses here. Text data fields, which contain email addresses separated with a semicolon, can also be used. Other separators are not permitted.

Edit filter

Opens a dialog where the address list can be restricted in advance with filter criteria.

Type

Select one of the following four types here:

Address from data field

In contrast to the dynamic distribution list, the value from the current data set will be used. This setting is available from an edit or view page where a data set is loaded or created.

Data Field

Select the field that contains the email addresses of the intended recipients.

Type

Select one of the following four types here:

Superior / Deputy of current user

With this setting, the email address of the supervisor or deputy of the current user will be queried.

System value

With this option, system values can be used as the source of the email addresses.

Edit system value

Opens a dialog where the system value can be edited.

Options

One email for each recipient

With this setting, an individual email will be generated for each recipient. This option is not available on the "Recipient CC/BCC" tab. If this setting is not active, all of the recipients will be added to the email separated by a semicolon.

If you confirm this dialog by clicking "OK", the settings are saved and the dialog is closed again. Configuration of the email action is now complete.

Exception handling

When the email action is created and configured, you can open the Properties dialog again by double-clicking the item on the workspace and set the procedure here in the case that no recipients could be determined.

Cancel transaction (default)

Means that the entire process is cancelled if email addresses cannot be found. For example, if a dynamic distribution list with the type "Free text" was set as the source for the recipients, but the underlying data field does not contain any corresponding data in the current record, the complete process will be aborted by this setting.

Continue transaction

The error is ignored. An email is not sent. The process will continue with the next action.

NULL values

Under some circumstances, a process is not performed without errors even though the "Continue transaction" option has been set.

For example, if the email recipient is determined via a system value from a system data group, the process may be canceled if it contains null values - i.e. when the recipient data field is empty in the system data group.

Values from the system data group are recorded as configuration parameters for applications. Along these lines, if a special value is missing, it is handled as an error. If you do not want this, you can add a Groovy condition or Groovy action, which transfers the list of recipients to the sharedState, before the email action, for example. This kind of list can be empty but cannot contain null values.

The behavior when handling null values is the same for all context variables with the type

  • URN_REQUEST_PREFIX

  • URN_SESSION_PREFIX

  • URN_SHARED_STATE_PREFIX

  • URN_USER_PREFIX

  • URN_WORKFLOW_USER_PREFIX

  • URN_SYSTEM_DATA_GROUP_PREFIX

The property to continue the transaction refers to the list of determined recipient addresses. The recipient addresses in this list are gathered from the following sources:

  • Staticly entered recipients

  • Recipients from the request

  • Recipients from the session

  • Recipients from the sharedState

  • Recipients from a user field

  • Recipients from the system data group

  • Recipients from a data field of the current data record

  • Recipients from a table

  • Superiors of the current user

  • Deputies of the current user

Once this list of recipients has been collated, Intrexx checks whether it is empty. The property then controls what should happen if the list is empty. It should be treated:

  • as an error than leads to an exception or

  • as a warning in the log - an email will not be sent, however.

IMAP event source

This event source monitors a folder on an IMAP email server and generates an event when an email message is received, for example.

It is also possible to access shared folders with an IMAP event source. The necessary settings for this can be set in the properties dialog on the "Options" tab in the IMAP provider settings.

Click here for information on the use of Gmail as an email provider.

Event source type

When you create an IMAP event source, you can choose between the options "Standard IMAP event source" and "Exchange Online IMAP event source".

Default IMAP event source

For example, select the Default IMAP Event Source option if you are accessing an IMAP mailbox on your on-premises infrastructure or IMAP mailboxes that are not hosted on Microsoft Exchange Online.

For detailed instructions on how to create a Default IMAP event source, see the section Set up default IMAP event source.

Exchange Online IMAP Event Source

Select the Exchange Online IMAP event source option if the IMAP mailbox is hosted on Microsoft Exchange Online.

For detailed instructions on how to create an Exchange Online IMAP event source, see the section Set up IMAP event source for Exchange Online.