Search code examples
.netarchitecturedomain-driven-designsoftware-designbusiness-process-management

What are the criteria which I should know to distinguish between the business processes that should be a part of my system or using BPM


I want to know what are the signs or the criteria which I should know to distinguish between the business processes that should be a part of my system and the others which could be implemented through BPM.

I read the following and I still a little confused:

enter image description here


EX: a vacation Request This process consists of set of states for example the employee requests a vacation from his manager and after that, the request goes to the HR management. This process is a part of HR system.

Should I implement it twice or as a BPM or only as an internal process in my system?


My question is:

What's the best practice for the scenario in which you have a business process? Should we implement it as a standalone process using something like BPM or implementing it as a part of the whole system(and in that case can I get some tips)?

NOTE: I'm not asking about cost here I'm asking mainly about software design perspective?


Solution

  • One heuristic you could use is to check if the process is universal to all users of the domain.

    Let us assume that you are building an HR management system as per your example. Your core domain would involve aspects like hiring, onboarding, payroll, TDS, hierarchies, etc. These functionalities would be applicable across companies/users of your product.

    But each company may define a specific approval process differently. Taking your example of vacation approval, one company may want the manager to approve; the other may want the Manager + HR to approve. Another may want to request to be routed to the payroll department to ensure that the no. of available PTO days has not been breached. These are aspects that are best kept out of the domain and modeled in BPM.

    Having said that, as the author expands in the slide deck you pointed to, processes in BPM have a nasty habit of intruding into your domain. The best mechanism is to implement user-specific workflows in BPM and refactor once in a while to pull the mechanism into the domain if needed.