In this post I will introduce the “Throwing Message Intermediate Event (Email)” that sends an email in the middle of a Workflow.”Throwing Message Intermediate Event (Email)” 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 3 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 by Processes
- Address embed chapter : Changing the address of an email by Processes
Incidentally, we will use the same environment which we have built in “Your first step of 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 usage of the Throwing Message Intermediate Event (Email) with simple settings.
First, 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.
You arrange the objects by drag and drop in the same way as in the article “Your first step of Questetra BPM Suite”. The “Throwing Message Intermediate Event (Email)” icon is not on the Basic palette but on the Advanced palette. You place the icon which is a double-line circle with an envelope figure in it and the label of email . Then, you draw the flow and connect all the objects. In addition, please change the name of Human Task next to the Start event, to “Confirm”.
In the current state, the icon “⚠” is indicated next to the Throwing Message Intermediate Event (Email)” icon. When you double click on the event object and view the properties, 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 “Subject” and “Today’s work was completed” in “Body”.
Now, after completing the ” Confirm” task, “Sumatra” will be sent an email with this content automatically.
You only have to check settings of Data Items, Data editing permission and Operator. This time, you don’t have to add any changes to them.
Now the App is completed. Let’s save, release it and check the operation. Please select “Throwing Message Intermediate Event (Email), test” from the list of “Start” < “Workflow” and handle the “Confirm” Task.
After you “finish”, you will receive an email like the one above as addressed to “Sumatra”. 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!
In the case of sending to multiple people
You have made settings, so far, 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 when sending an email to “Canary” and “Oahu” in addition to “Sumatra”. This time, I entered “Sumatra” and “Canary” into To and “Oahu” into Cc. 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, the email address entered in the Bcc field is the destination of the 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 can only be indicated on the App setting screen.
In the next “Mail body chapter” I will 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, as further advanced contents.Next: Mail body chapter