The Business Component Send e-mail is designed to allow you to configure your Message Events to send an automatic e-mail message when running a process application and is available to you in the Barium BPMN Modeler tab called Business Components.



For example, the Send e-mail Business Component can be used to tell somebody that your process has progressed to a certain phase, to send an automatic response that a registered case has been received, to inform an interested party that the process has passed a milestone or to inform one or more interested parties that the process has ended.


The Send e-mail Business Bomponent has the capability of sending e-mails to a specified e-mail address, to the participant set in the process model, or to an e-mail address that has been filled out in a form field by the person who registered the case in the first hand.


Additionally it’s possible to add variables in the e-mail text which can get information from the process instance or out of form fields and present it in the e-mail text. For example: In a process you may have an form with a field for the “reviewers comments” allowing the reviewer to document the outcome of a review. The text filled out in the “reviewers comments” field can be inserted into the e-mail text through a variable and sent to whoever you choose to be the recipient.


Adding the Send e-mail Business Component

The Send e-mail component can only be added to BPMN symbols that send messages such as:

  • Intermediate Event configured with an Intermediate Trigger
  • End Event configured with an End Result Type
  • Tasks configured to be a Send Message Task Type



To configure your process model to add the Send E-mail Business Component simply drag it from your Business Components palette and drop it on the flow object where you wish to send an automatic e-mail.



A window will open where you add the parameters of the business component and configure you’re the e-mail message to send.



Send e-mail Business Component parameters


Subject

The subject text in your e-mail message.


Message

The body text in your e-mail message.


EmailFormField

The ID of the field in your form from which you want to fetch the e-mail addresses to send this message to. Requires that your process model contains an form and a specified field for e-mail addresses.


You must fill out the ID of your form as well as the name of the field in the form with a dot in between for this to work: MyEform.Email. Note that the ID of your form and the name of your email form field is up to you to define.


The ID of the form can be found in the process models Data objects tab. The name of your form field can be found when creating or editing the form in the form editor. In the Picking up form data: DataID & FieldName article you find a short guide how to find and change DataIDs and field names.


EmailAddresses

A field where you can write one or more e-mail addresses to send the message to. These are static e-mail addresses and will send a message to the same e-mail addresses every time your process reaches the business component. This is an effective way of informing external interested parties when a process instance has been received or passed through a specific path in your process.


To add several e-mail addresses, simply write a comma between each address and the message will be sent to all recipients.


EmailParticipants

A checkbox which you can check in order to send the e-mail to the registered e-mail address(es) of the participant set on the configured task or event , or on the lane which it is placed in.


EmailAllPerformers 

Use this setting to send the e-mail to the registered e-mail addresses of all the previous performers in all roles of the instance. 


EmailPreviousPerformerInAllRoles 

This setting sends the e-mail message to the registered e-mail addresses of the previous performer in all roles of the instance. In difference to EmailAllPerformers this exclude the ones where the participant of the role has been substituted by a new performer, then only the newest performer in that role gets the e-mail.



Send E-mail Business Component variables

Accessing and sending process information in your e-mail is one of the more powerful features of the Send E-mail Business Component. Variables are easy and are written plain text with dollar-signs ($) before and after the variable.


For example you can write in your subject:


“Thank you, we have received your registration for $activity.name$


In the e-mail subject the e-mail will replace $activity.name$ with the instance name of the created process instance.


In the same way you can add variables in the Message field as well. The available variables that you can use can be seen in the list below.


Instance variables

$activity.id$
$activity.name$
$activity.description$
$activity.links.show$


Application variables

$application.id$
$application.name$
$application.description$


Task variables

$task.id$
$task.name$
$task.description$
$task.links.show$


Form field content

$DataID.FieldName$


Learn more about DataIDs and FieldNames in the Picking up form data: DataID & FieldName article.


Send e-mail – layout and design

You can add layout and design to your e-mail message by using simple HTML. Add things like line breaks, bold text or clickable links with simple HTML code.


Common HTML code for e-mail messages

<br>         Line Break
<b>bold</b> Bold text
<i>italic</i> Italic text
<a href=”link.com”> URL Link


Example of body message with HTML

Hello $eform.firstname$ $eform.lastname$,<br>
<br>
Thank you for registering for <b>$activity.name$</b>. We are happy to receive
and handle your case and will do so as swiftly as possible.<br>
<br>
We will continue to keep you updated on the progress of your case via e-mail
to the e-mail address <b>$eform.email$</b>. If you do have any questions
don’t hesitate to call us.<br>
<br>
Best Regards,<br>
The ACME ltd Team!


Inserted in the dialog box, this could look something like this



Changing the Send e-mail Business Component

To change the parameters and settings for your business component you need to open the properties panel for the flow object with your Send e-mail business component set on it.


Right click on the flow object and click on properties.



In the properties tab, under the section Business Components you can access the Senders that have been added to the flow object, click on the button beside the text collection.



A window will open on your screen showing a list of the business components that have been set to your flow object, you can see that the business component Send E-mail is set to it.



Click on the text Send E-mail and the buttons on the right hand side will be clickable. Here you can decide to remove the business component, by clicking on the button Remove. Or you can edit the behavior and content of the Send E-mail business component by clicking on Edit



The Business components Arguments window will pop up and allow you to change the settings and content of your e-mail message.



Do any changes you wish to do and click OK to save it.