In this post I will introduce the Throwing Message Intermediate Event (Email). This is an automatic Step that sends an email in the middle of a Business Process.
If you place a Throwing Message Intermediate Event (Email) in the middle of a Workflow diagram, an email can be sent automatically when a token passes the event. You can embed the input contents of the previous Step into the email body or destination address. Let’s learn how to set up this Throwing Message Intermediate Event (Email) in the following 4 steps.
- Basic chapter: sending an email with a fixed mail body to a fixed address
- Mail body chapter: changing the mail body of an email using embedded commands
- Address embed chapter: changing the address of an email using embedded commands
- Non-delivery response chapter: troubleshooting when an email has not arrived
Incidentally, we will use the same environment which was built in Your first step in Questetra BPM Suite throughout this series of articles. I suggest you first read through the Setting Up an Environment for Tutorial section of Chapter 1 if you haven’t tried out that tutorial yet.
Sending an email to a fixed address with a fixed mail body
First, we are going to configure settings to send a fixed text email to a fixed address. Let’s learn the basic function of the Throwing Message Intermediate Event (Email) with simple settings.
Let’s create a new App from the [App Settings] page. In this case, please set the name of the App as ”Throwing Message Intermediate Event (Email) test“. After creating a new App, start up the Process Modeler and draw a Workflow diagram like the one below.
Arrange the objects in the same way as in the article “Your first step in Questetra BPM Suite”. The Throwing Message Intermediate Event (Email) icon is in the Intermediate Event palette.
Place the icon which is a double-line circle with an envelope figure in it and the label of email. Then draw the flow and connect all the objects. In addition, please change the name of the Human Task next to the Start event to “Confirmation”.
Please be careful not to mistake the Email event with the envelope event which has the label of HTTP.
That is the Throwing Message Intermediate Event (HTTP)
In the current state the icon is indicated next to the Throwing Message Intermediate Event (email) icon. When you click on the event object in selection mode and look at the settings window, it should indicate that “You must specify either To, Cc or Bcc”. Since you are required to specify the destination, this time let’s set the email address of Sumatera, the leader of the management department, as the “To” address. Please enter the email address in the “To” field like the figure below. This time, you’ll set the properties to send an email only to Sumatera.
Also, please type “Report” in the Subject and “Today’s work was completed” in the Body.
Now, after completing the Confirmation task Sumatera will be sent an email with these contents automatically.
You only have to check settings of the Data Items, Data editing permissions and Operator. You don’t have to make any changes to them this time.
Now the App is completed let’s save it, release it and check the operation. Please select Throwing Message Intermediate Event (email) test from the list in the Start page < Workflow and operate the Confirmation Task.
After you finish you will receive an email like the one above as addressed to Sumatera. If it doesn’t arrive please check whether the email address entered in the “To” field is correct. The basic part of the App is completed if the email arrives!
Depending on environment, the sender of the email (From) will be firstname.lastname@example.org.
In the case of sending to multiple people
So far you have made settings to send an email to only one person. It’s also possible to make settings to send an email to multiple people.
The following is an example of settings for sending an email to Canarias and Oahu in addition to Sumatera. This time, I entered Sumatera and Canarias in the To field and Oahu in the Cc field. You can enter multiple email addresses separated by commas (,) in the To, Cc and Bcc fields
The same email will be copied and sent to the email addresses entered in the Cc field as well as the To field. Also, email addresses entered in the Bcc field will receive a copy of the email, but the email address in the Bcc field is only visible to the sender. In this case, since the sender is Questetra BPM Suite, the email address entered in the Bcc field will only be visible on the App settings screen.
In the Mail Body chapter we’ll go even further and describe the settings to embed data into the text body and change the contents of the email according to the results of the Task operation.
Next is the Mail Body chapter