Implementation of maker-checker flow

Today, I will give you one of the implementations of maker-checker workflow which I had adopted in my projects.

Introduction: 

It’s a quite common workflow in the industry especially followed in the banking domain where maker will create/update contents and the checker will approve the contents. This is considered to avoid mistakes while entering the records in the process.

Requirement:

  • We had the master data which needs to be created or updated through maker-checker flow. Then this data will be visible on the main sites for the users to view.
  • The User with the maker role will able to create and update the contents whereas with the checker role can approve/reject the newly available data.
  • Without checker’s approval, The contents should not be updated on the main master data.

Challenges:

  • If data is already approved and visible on the main site, then modifying/editing the contents will directly reflect on the main site.

Solutions:

Creating new contents were easy as it was not visible on the main website but the problem became slightly challenging where we needed to handle the scenario of data update.

We followed below strategy to handle this.

  • We created two tables for Master data.
    • a Temporary table where contents can be easily modified and created anytime.
    • an Approved Master Table where after the workflow data can be inserted or updated post approval in the temporary table.
  • we created common service which would update the data in the approved table on the basis of simple one to one mapping of temporary to master table.

For example,

  • employee_tmp and employee Table.
  • All modification will happen in the temporary table.
  • After the approval, Data would need to update from the temporary table to the actual table. This way master table will always get a new update after approval through maker-checker flow.

Hope this will people who want to implement this workflow in their projects.

Please do comment and ask if anything is missing or you have better solutions in your mind which others can learn.

Happy Learning!

4 thoughts on “Implementation of maker-checker flow

  1. Hoping am not too late to the party. I just need to know, how you solved the following situation if you did face it.

    A situation where the master entity, i.e employee in this cahse, has a one to many relationship with another entity, say previous jobs.

    Like

    1. Since maker and checker flow is resolved using temporary table for all entities, so, regardless of any situation, any changes will be done in temp table and once it is approved, appropriate changes can be applied to actual master table.

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.