Email Connector

Email Connector

In this video, I will show you one last thing in our sample process, how to add a “connector.”

BonitaBPM is powerful software on its own, but it’s not an island.  Its potential is almost unlimited when you start to interact with external applications using what are appropriately called “connectors”

I’m going to show you a very simple one, where in we send off an email when our process is finished and our “coffee” is ready.

I will add one more service task before my end event which will accomplish this.

Delete Flow just before the End event.

Add Service Task and name it “Get Coffee” then connect it to the end event.

Get  Coffee connected to End event

Now I can select the task I just created.

To make “Get Coffee” task a connector head down to General, and below the Data tab we used last video you will see the Connectors tab. Click this, and then select “Add…”

Connectors tab

Here you can see Bonitasoft has a huge library of prebuilt connectors.

For this example we are going to be sending an email, but we could do numerous other things, from having it send out a tweet to updating an external database.

If they don’t have the connector you want, you can even build them yourself if someone else hasn’t already done it for you, although granted that becomes a bit more involved.

For our purpose select messaging and then Email which uses SMTP — the Simple Mail Transfer Protocol.

Select Messaging

Click next and give it a name

Email SMTP

Then click next again

Here I need to enter the SMTP details of my server.  If you don’t know your email settings, you could get this information from your IT department or whoever handles your network administration.

I am using Gmail so my settings are correct, although I need to add my login name and password

Enter SMTP details
Enter SMTP details

Click Next. Enter the “to” and “from” addresses.

I will just put myself to keep it simple, but eventually these could even be variables pointing to information that we asked for earlier in the process, or even read something from a database using another connector.


Hit next… type subject and message. Once everything is entered click Finish.

Now this task has a picture of an electrical cord in the top right corner to indicate that it is a connector.

the Get Coffee Connector

Now that we are all set, let’s test it out.  Quickly I will show you my inbox with all my mail read and up to date.

Back in BonitaBPM hit “Run” and I will pull over the browser window that has popped up.

Run test

Now the thing to mention here is Bonita has a sample company and a user Named walter.bates for testing purposes. When I run my process, that user gets logged in automatically.  If I were to deploy this in the real world, the first screen would be a login request of the user.

Now I can step through my process. Click “Choose Coffee” link.

Type “Dark Roast” and click Submit.

Next, click “Pour in Grounds” and select “grounds” check box. Then hit Submit.

Select grounds check box

I didn’t build a nice looking form, but that is where I select if my coffee is ground

And when it is all done I can close it down, and hop over to my inbox.

Sure enough I have received my test email.

Received test mail

This concludes our lesson and should give you plenty of tools to start building processes of your own.