Reader small image

You're reading from  Bonita Open Solution 5.x Essentials

Product typeBook
Published inNov 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781782167082
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Rohit Bhat
Rohit Bhat
author image
Rohit Bhat

Rohit Bhat is a Computer Science graduate from BITS Pilani, India and is currently working as a Software Specialist in Opera Solutions. He has done projects in a variety of fields of technology encompassing Data Mining, Android Apps, Open CV, Swarm Intelligence, Workflow Automation, and Video Conferencing. He has been extensively using Bonita Open Solution for Workflow Automation and Business Process Modeling for a number of clients for his company. You might find him surfing the Internet for any kind of knowledge and news, or plonked on his bed with a book in his hands. He loves to keep himself abreast of the latest technology and is a gadget freak. He is always ready for a discussion about any topic under the sun. He has a myriad interest in business, startups, entrepreneurship, finance, and current affairs. However, he is always excited to go on trips and tours, especially nature trails and trekking, with a camera around his neck. Apart from reading, he likes to pen his thoughts and is a freelance blogger, too. He can play the keyboard but wishes he had more time to learn a new instrument. He loves to listen to psychedelic, slow, and alternative rock. You can say "Hi" to him at mail@rohitbhat.com. This is his first book as an author. He is, however, a reviewer of Packt's Android Application Programming with OpenCV, published a couple of months ago.
Read more about Rohit Bhat

Right arrow

Chapter 5. Adding Connectors

We had a look at how to define conditions, transitions, and contingencies in the previous chapter. These features allowed us to modify the existing steps and web forms according to our needs. Here we will introduce the connectors available in Bonita. Connectors, as the name suggests, are used to get data in and out of Bonita via various means. We also have the ability to send e-mails, make calendar appointments, and so on, via connectors. Bonita Studio has a lot of connectors pre-defined and we only have to fill in the various parameters to make them work.

Connectors are a powerful functionality provided by Bonita that makes it easy to integrate with other third-party applications. This is a nifty and useful feature that makes Bonita Open Solution an ideal platform for integrating different data at a single place.

Types of connectors in Bonita


Click on any step, navigate to the Connectors tab and click on Add.... We are greeted with a huge list of connectors. The connectors bundled under the Bonita category are related to the workflow itself. We can modify various steps and variables of the workflow using these connectors. The database connectors are already configured for most of the famous databases in use and they only need connection parameters to connect to the databases. We can execute SQL queries and modify the result set using these database connectors. We also have Drools connectors that make use of the Drools engine to execute custom-defined rules. In addition, we have some connectors for calendar and events, and integration with LDAP, SAP, Salesforce, and other popular web services. There's also a connector for executing a Java class and another for sending an e-mail through the workflow. We have a couple of connectors for scripting purposes, too.

We will look at some of these connectors...

Finalizing the web form data


We have seen how the connectors work in Bonita. Now we need to edit certain fields in the forms that we had left empty before as we didn't have the data with us. Now, as we have learned how to use connectors, we have all the necessary data. Let us finalize these forms now.

We have obtained the data from the database connector and saved it in the rowSet variable. Now, we need to populate the fields of the ChooseFlight form using this data.

Open the ChooseFlight web form and populate each field as follows:

  • The Image widget: The label of this widget should contain the name of the airline. Hence, click on Edit expression... for the label and enter the following:

    rowSet.toList(3).get(0);

    rowSet contains the result set of the SQL query. Hence, we extract the third column of the result set, which is the airline name according to the SQL query that we have written. This will give a list of all the airline names that match the SQL query. Out of this list, we extract the first...

Summary


In this section, we visited the various connectors that are provided by Bonita. In a nutshell, Bonita connectors are used to get data into the workflow or externalize the data from the workflow. All these connectors can be implemented by the various APIs of the tasks that we want to perform. These APIs have to be coded in Java or Groovy. But Bonita has added a layer of abstraction on these APIs and we just have to configure the various connectors that are provided. These connectors are more than enough to get the majority of tasks done. We have seen how the Bonita connectors, Email connectors, Database connectors, and Groovy connectors work with an example. Similarly there are other connectors that we can explore, depending on the functionality we wish to achieve. There are even some connectors that have been contributed by the community and are available for use on the Bonitasoft portal. You can check them out at http://www.bonitasoft.org/exchange/index.php. Make use of these powerful...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Bonita Open Solution 5.x Essentials
Published in: Nov 2013Publisher: PacktISBN-13: 9781782167082
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Rohit Bhat

Rohit Bhat is a Computer Science graduate from BITS Pilani, India and is currently working as a Software Specialist in Opera Solutions. He has done projects in a variety of fields of technology encompassing Data Mining, Android Apps, Open CV, Swarm Intelligence, Workflow Automation, and Video Conferencing. He has been extensively using Bonita Open Solution for Workflow Automation and Business Process Modeling for a number of clients for his company. You might find him surfing the Internet for any kind of knowledge and news, or plonked on his bed with a book in his hands. He loves to keep himself abreast of the latest technology and is a gadget freak. He is always ready for a discussion about any topic under the sun. He has a myriad interest in business, startups, entrepreneurship, finance, and current affairs. However, he is always excited to go on trips and tours, especially nature trails and trekking, with a camera around his neck. Apart from reading, he likes to pen his thoughts and is a freelance blogger, too. He can play the keyboard but wishes he had more time to learn a new instrument. He loves to listen to psychedelic, slow, and alternative rock. You can say "Hi" to him at mail@rohitbhat.com. This is his first book as an author. He is, however, a reviewer of Packt's Android Application Programming with OpenCV, published a couple of months ago.
Read more about Rohit Bhat