Find your path in a Death-star Microservices architecture using BPM

Find your path in a Death-star Microservices architecture using BPM

The rise of Microservices architecture, popularized by companies as Netflix and Amazon with such a huge number of services it can be depicted as a Death-star, tremendously helped in decentralizing application and data logic giving fast innovation. However, tracking how business processes flow through these services is incredibly hard. By adding Business Process Modeling (BPM) solutions to the architecture, business processes can be tracked by orchestrating the path of the process.

Figure-1 visualization of a Death star Microservices architecture at Netflix and Amazon

BPM

BPM stands for Business Process Modeling and allows to define business processes as workflows that are executed by BPM engines as Camunda, Zeebe and Flowable. The modelling language is very rich and defines flow objects (events, gateways, activities), connecting objects (sequence flow, message flow, association), swim lanes and artifacts. The specification is maintained by the Object Management Group, which also is behind TOGAF and UML.

Figure-2 BPM Elements


The first generation of BPM solutions were heavy solutions taking time and resources to integrate. However, the modern-day BPM solutions are lightweight, embeddable in solutions as Spring Boot and can easily be used as a service orchestrator in a Microservices architecture.

Example: Webshop Order Process

To see how this can be accomplished, let’s work with an example. Imagine the business process of a webshop where an order is received. A simplistic view of the process can be depicted as follows:

Figure-3 example order process

On receiving the order, availability is checked and items are reserved. Payment can be done either by credit card, at delivery or through a coupon. After payment the goods are shipped out and the customer receives an invoice.

Let’s imagine we have built the webshop order process with an event-driven microservice architecture based on the functional domains giving the following services:

  • Order
  •  Inventory
  • CreditCard
  • Coupon
  • Shipping
  • Invoice

The process flow between services is encapsulated in events that trigger the next step in the process. The events are published on queues on an Event Bus, where other services are subscribed at. An Inventory Service for example can listen to Order events to check the availability of an item.

Figure-4 event driven microservice architecture

The services are nicely decoupled by events making it easy to change a service and scale them. However, it is hard to get insight how the process flows in different webshop order scenarios with this architecture. 

BPM to the rescue

So how can you get insight in the order process flow in this microservices architecture? Adding BPM in the mix allows to get an overview how a process flows at runtime.

Replacing the event-bus with a BPM-engine allows you to orchestrate the process flow exactly as modelled by the BPM model with the microservices. A BPM engine as Camunda can interact with services through the use of the external task pattern with defined topics (read queues) where services can subscribe to and read asynchronously.

Having your business processes modelled by BPM and executed accordingly by a process engine gives more control over the processes and assurance that it is executed as designed.

Figure-5  Microservices orchestrated by BPM

The microservices can read the events (tasks in BPM) from the queues and process the event. Through the use of topics/ queues the services are decoupled from the process engine and can run in their own execution space.

Data insights

The execution of this workflow through BPM can be runtime monitored in a process engine allowing to pass valuable information to customer support on information where an individual order is in the process. Also, insights can be gained on the customer journey for this order process. For instance, data can be gathered to tell you what the preferred payment methods and the average time an order takes.

Conclusion

Using BPM in a Microservices architecture delivers a clear view how processes are executed giving more control over your business processes. It gives you assurance that processes are executed as designed and allows to manage the processes in a Microservice architecture.

Another significant advantage is that executing processes through BPM engines can deliver valuable data to the organization. You can track the customer journey and see the most travelled path of the process. This valuable information allows you to optimize the process.

Do want to know more?

At Ritense we use Camunda, one of the top BPM engines, as component for our solutions. We also have the Valtimo platform enriching Camunda with access management and notification capabilities readily deployable in AWS. Integration with your solutions can be done with our own external connector connecting to your services. Give us a call in case you like to have more information.

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics