Case Study - Workflow Automation Service
WAS is the backend micro-service enabling workflows that allow small business owners to automate multiple tasks such as sending reminder emails for unpaid invoices, setting up automatic recurring bill payments sending out recurring statemets etc.
- Industry
- Financial Software
- Year
- Service
- Backend Microservice
Overview
WAS is Intuit's backend micro-service that powers the creating and execution of workflows. Some necessary enhancements required to extend our existing architecture to support various generic use-cases are as follows -
- Support for Purchase Order Approval workflows.
- Support for multiple conditions in workflows and backward compatible CRUD operations.
- DMN compiler to ensure that user-provided condition sets are logically correct.
- Migration of legacy workflows to updated schema and archival of deleted workflows.
Implementation
WAS is a microservice that communicates with 2 other backend services namely QBO Monolith and AppConnect, each hosted on their respective server and all communications occur via API's. QBO monolith is the core backend service that powers Intuit Quickbooks. It exposes CRUD operations to create transactions like Invoices, Bills, Purchase Orders etc. User's can create workflow automations specifically for each transaction type.
AppConnect was responsible for polling OBO periodically to fetch the latest transaction details. This data was consumed by WAS while triggering workflows. Camunda is a third-party orchestration service that was responsible for activities like sending out emails reminders/notifications as part of workflow execution.
Few of my notable contributions to WAS are discussed here in detail -
Purchase Order Approval Workflows - QBO and WAS offered users the ability to create approval workflows for Invoices and Bills initially. We had to extend this use-case for Purchase Order's as well. I single-handedly incorporated necessary changes to implement Purchase Order Approval workflows, that involved the following -
- Schema changes to expose approval specific attributes in the Purchase Order transcation object.
- Trigger API changes to support PurchaseOrder as a key.
- AppConnect poller modifications to poll the new v3 endpoint for the latest transaction data.
- Email template changes to support tags specific to the Purchase Order transaction.
- Adding new rules to our Drools engine based on which workflow would be triggered from QBO, post the creation/updation/deletion of a Purchase Order.
Support for multiple conditions in Workflows - WAS traditionally supported only a single condition in workflows. The workflow was triggered only if this condition was true. Based on consumer feedback, we decided to introduce multiple condition support in WAS. This was a breaking change and required extensive design considerations and code modifications to ensure backward compatibility. I worked with 2 engineers on the POC (proof of concept) and final implementaion. My contributions are outlined as follows -
- Schema changes to support multiple conditions in the worklows CRUD payload.
- Extensive backward compatible code modifications to support workflow Read operation
- Extensive backward compatible code modifications to support workflow Write operation
- Database changes to store multiple condition sets, addition column indexes and a new tables
- Evaluate API enhancements to effectively compute and verify if a workflow should be triggered or not
- Developed a batch job for migration of legacy workflows to updated schema.