Choosing the right Business Process Automation (BPA)
Problem Statement:
Capillary Technologies being a B2B SaaS platform, provides intelligent technology-driven solutions to help businesses drive growth and build long-lasting relationships with their customers.
As frequently seen in Hollywood movies and TV series :), fuel stations in western and certain advanced countries are self-served, meaning customers fuel their vehicles themselves. The payment in such scenarios is primarily done via two mechanisms
- Pre-auth payment via swiping your card at the pump — Here is a video showing how a customer fuels using a credit card at the site.
- Pre-auth via OTA using the mobile application of the retailer — With the advent of more reliable internet and secure methods retailers have started building mobile applications to make the process highly convenient and rewarding for the customers.
This blog talks about how we built a workflow that can cater to such automated use cases and also gives comparison across various Business process automation(BPA) tools.
Why Workflow
Listing down some of the reasons for the use case of automated workflow/Business Process Automation.
1. Helping Business and IT Collaborate in common language — A recent study commissioned by Camunda, stated that 95% of respondents agreed that for process automation to happen effectively, business and IT leaders need to be aligned and collaborate. Improved collaboration combined with the new integration framework empowers business agility by drastically reducing the time it takes to design and agree on process changes — Camunda blog (https://camunda.com/blog/2022/04/camunda-platform-8-orchestrate-all-the-things/)
2. Automated Retrial and Rollback support- As we were dealing with payments that involve multiple steps, failure at any step should not leave the workflow in an incomplete state. For example, money deducted but service incomplete, the fuel pump nozzle gets permanently locked, etc. We needed automated retrial support to refund the money as well as unlock pumps.
Choosing the right Workflow:
To build a workflow service serving the features, we initially had to decide between building our own homegrown tool vs using any available open source tools. Below are some of the basic criteria in our view that helped us analyse and decide between the two
So in conclusion there are pros and cons of both the approaches and for our use-cases we want to have an automated workflow/Business Process Automation. We went with our evaluation of 3 most popular BPA tools in market which are:
During our evaluation we also finalised the criteria based on which evaluation will happen, Listing down the criteria and the comparison between them below:
Camunda in Action:
Camunda was a clear winner for us, Listing down in detail around the criteria against which it was evaluated and also how it is used in Capillary:
- Needs to follow a request/response model (synchronous model) — In our use-case, we wanted a certain set of APIs to be sequential and the user is waiting for the response, and another set of APIs to be completely asynchronous, Camunda supports both.
- Built-in compensation/rollback support for each action — Since we were dealing with payments and petrol pumps, If in any of the workflow step anything goes wrong we should be able to reverse the payment as well as unlock the pump, For each action, a rollback action can be attached and each action can itself define what error rollback needs to be triggered
- Programmatic workflow creation/updation/deleting ( via APIs) — Ease of use of APIs and the ability to modify workflows programmatically as well as from Camunda admin UI (camunda cockpit) is possible, It is friendly for code-savvy individuals as well as business folks.
4. Organisation specific custom workflows — Abstraction of workflows for multiple tenants was extremely important, Workflow modified or a new workflow created for one tenant should not adversely affect the workflow of another tenant.
5. Custom metrics and APM Integrations — We used the Camunda framework with Spring-Boot, It is very easy to emit metrics to Prometheus and Newrelic integration is also pretty straightforward.
6. Multi-instance capability and scalability — Camunda is highly scalable, The database behind Camunda is MYSQL, and our orchestrator service is a Spring-Boot-based micro-service that is horizontally auto-scalable.
A load test was done with dummy actions and a process definition of 4 steps. With throughput close to 1k rpm the average response times were under 80 ms. The pod size was 2 core 4GB. With 1k rpm, there was not much of a difference with 1 core 2GB pod as well, Attaching load test snapshot captured in NewRelic.
Another load test was done with actual actions, Response time was ~ 200 ms for 5K RPM.
7. Version control and promotion — Camunda has a built-in version control embedded in the Platform.Every time we update a workflow a version-id is attached to the workflow. The process APIs will be triggered on the version of choice of any given workflow, It also supports a promotion workflow, so only promoted versions will become default version.
8. Built-in retrial support — Camunda supports both fixed delay retrial as well as exponential retrials out of the box, This ensures that any failure at any of the steps gets retired before triggering the cancellation/compensation flow
Drawbacks of Camunda
It has a Postgres/MYSQL database at the backend, and it is very difficult to scale if you increase the number of processes running. We were able to overcome it by a certain extent by disabling event history . The main issue here is horizontal scaling of MYSQL. Sharding is by default not supported, It needs some effort to get this running using multiple shards. Camunda has another product called Camunda Cloud, which supposedly doesn’t have the same scalability problems, but we are not using Camunda Cloud because the set of features is smaller than Camunda On-Premises.
Conclusion:
- Camunda workflow model can bridge the gap between technology and business. It is helping our business to configure workflow without the involvement of the technology team.
- Changes in workflow are super simple, any change in authentication, endpoint or even addition of an additional step to an existing workflow is a matter of minutes.
- We have come across a myriad of cases where we need to call an external web-hooks, state-management between steps or onboarding a new organisation on our Platform. Some of these use-cases can be solved very easily.
Camunda Platform is #1 ranked solution in Business Process Design tools, #1 ranked solution in BPM Software, and #2 ranked solutions in top Process Automation tools. PeerSpot users give Camunda Platform an average rating of 8.2 out of 10. Their rich developer community also encourages people to use the platform for workflow use-cases.
I hope this blog was useful in providing an idea of the BPA tools available in market and the basis on which choices should be made, If you enjoyed this article, share it with your friends and colleagues!
Special thanks to Bhanu Bobbali for helping with the blog.