DDD where to put logic where authority can lie with one domain and also with multiple domains

26 views Asked by At

I have a banking system where loan is a integral part or a aggregate. There is a loan Authorization system where a loan is authorised by multiple other domains or departments including Locker, Credit Management, Asset Management etc. I am part of Asset Management. There 2 types of authorisation

  1. Master Authorisation
  2. Child Authorisation

If we have master authorisation from Asset Management and child authorisation is ignored from other domain and the loan is approved and goes to Loan Management domain.

If we don't have master Authorisation the we have to rely on all Child Authorisation to Approve from other departments then only after all approvals, Loan is approved

Currently, all the logic related to Master and Child Authorisation sits inside Asset Management but Is it correct?

Or can we move the logic to a generic sub domain first and then to a shared kernel slowly.

0

There are 0 answers