A Bonita journey from the ground up (Part 1)
In this series of posts I would like to share my journey from my early Bonita discovery to my very first application completion using this comprehensive tool.
Starting from the beginning, I followed the Bonita Living Application Development training. This 5 day workshop gave me solid basic knowledge about BPM, and also some hands-on with the comprehensive Bonita Studio. The concepts and goals behind BDM (Business Data Models), Diagrams, Processes, Cases, Tasks, Organization, Actors, and REST API Extensions were clear. The applications built and deployed on the local machine with a single click, was a promise to prompt development.
On the other hand, I was feeling a bit lost dealing with action flows and navigating the multiple Bonita Studio tabs and subtabs. I felt like the Bonita Studio interface was hiding a data flow I was more used to thinking about in my past data processing engineer life. Glad to say, those confusions quickly faded away.
Then came the time to think about my own application - first because as a new Bonitasoft employee I was asked to develop one as an on-boarding exercise, and second because I’m convinced being self-driven with an application is the best way to get a handle on a new environment. I scratched my head for a while, and inspired by an excellent example explained during my training, I chose to develop Boodle: a Bonita-based doodle.
I was aware it was neither a business oriented process nor a complex work-flow, but it was rich enough to cover numerous Bonita’s capabilities. Plus, I had cool application features in mind, like submitting event places in addition to dates, or notifying the final event date & place to all participants.
The take off
There I came with my application idea, free of any exercise or tutorial, as an independent, autonomous, emancipated engineer.
As a first step, I choose to develop a minimalist version:
- I focused on event dates only - postponing the capability to vote for a place;
- no process was created yet to summarize all votes of all participants for one event;
- no process was created yet to decide the final event date and notify the participants.
In BPMN terms, the inner application was very simple: the Business Data Model was made of 2 Business Objects: Event and Vote.
And it was composed of only two processes: one for creating an event, the other for each participant to vote. The first process was made to call the second one as needed in a parallel multi-instantiation loop (one instance per participant).
One UI was created for each process. Thanks to the integrated UI generator - called the UI Designer - both were completed with a few clicks, looking nice and fully functional, almost usable as-is:
- on the “event creation” UI, I just added one inner variable to list all the organization Users - using the Bonita Identity API and a Select widget to select participants using their emails.
- on the “participants vote” UI, I aligned the dates and the participant attendance booleans on the same rows to ease reading and voting.
And that was it. What a quick UI design !
At that point, I had the application basics fully functional and looking nice with a small effort. It indeed took me around 5 full days to complete this first version including the (only) Bonita installation.
I can’t imagine how much time I would have spent to code the same application from scratch - thinking about cross platform development environment selection and tool (chains) setup, about data management and storage in a database, about the user management layers, about backend API encapsulation and serving, about the UI design in any front-end web framework.
The icing on the cake: the application can run indifferently on either Windows/Linux/MacOS, and may even be deployed easily through a Docker container.
My beginner’s retrospective
Looking back on my journey, I took note of the following particular points that I hope, will help other beginners to ramp up even faster:
- Learning Groovy by itself was easy - I had experience with other high level languages which helped - but the lack of means to debug the scripts within Bonita Studio was time consuming and weird. Adding some debug messages in a console would have been of great help, but is not available out of the box. So to test my scripts, I mostly ran them again and again: deploy and run the application; restart a case each time. When it failed: explore the logs to get clues to the root cause.
==> My advice: get used to Bonita Studio’s validation tab as early as possible in your ramp up.
- From the logs, figuring out which script is failing is not trivial. First, because logs can quickly become dense. Also, logs may become hard to read when dealing with multiple processes.
==> My advice: clean the log file as often as possible, and test processes separately if you can.
- For the same reasons as above, I took time to dig into non-compiling scripts after changing the BDM structure or any data defined at the Pool or Task level in a diagram.
==> My advice: watch out for future Bonita versions. I’ve heard about current R&D effort around a smart refactoring :).
- My own design inefficiencies: I initially created a Business Object for the management of participants. Then I found out it was not adding any value to the existing Bonita User except extra application complexity. It obviously took me some time to both create and remove it.
==> My advice: I don’t have anything specific here to suggest. Trial and error is actually, IMHO, a rather efficient way to progress. Not sure it is always worth trying to shorten the learning process!
Special thanks to Enrico, my coach during the training. As a Bonita insider, I also really appreciated Bonitasofters’ work on the online Bonita Documentation, which is a very comprehensive and handy support, and all the here-and-there hints and contextual information within the Bonita suite. For everyone, the Community Q&A has a lot of helpful information too!
Next steps should include:
- design of a REST API extension to gather event votes from participants;
- design of a custom widget to display a summary of event votes efficiently;
- completion of the workflow to invite the event creator to decide about the final event modalities and notify all participants.
How many days will I need to complete that? Stay tuned !
Want to know about me?
LinkedIn is your friend! You can visit my profile