I need clarification on something from someone more experienced to see if I am on right course with this. Following Microsoft's eShopOnContainers microservices approach I got interested in building some small exercise microservices oriented system. But everywhere I look I see same examples using Customers, Products, Orders... and I am not sure if I understand this completely.
For my project I decided to design HR system. Doing some research and got to this. My HR can be divided into these logical parts.
- Recruiting
- Training
- Payroll
- Rewards
- Workforce
- Management
- Time and Attendance
- Staff Welfare
- Development
First I thought these are my Bounded Context's(maybe they are, I am not sure yet) but then I isolated just Recruiting and started thinking about it. I divided Recruiting process in these smaller sub-processes:
- Identifying(recognizing the need for new employee)
- Attracting(advertising and gathering candidate applications)
- Interviewing(collecting candidates data)
- Selecting(visualizing and comparing data in order to find best candidate)
- Hiring(converting candidate to employee)
- Onboarding(creating employee profile, administration...)
I think actually these are my Bounded Context's
1.Identifying - I think of it as a microservice which is subscribed to RecruitingRequestPlaced event. Creating RecruitingRequest with its id, job position, number of candidates, deadline...I also recognise RecruitingRequestCompleted event which determines the outcome. For ex. completed - hired>list of employees. Easy, I am on fire
2.Attracting - In order to collect candidates application I need CandidatesCalatog (I saw analogy with Products Catalog in ms eShop) microservice to hold my candidates who applied for open position. So far so good
3.Interviewing - I found out I can divide this even further in 2 microservices. One would be Interview Schedule calendar appointments kind of service which ties together Time of Interview, Candidate and Interviewer. Second would be Interview Processing, collecting data from interview. Or how I see it, filling some predefined data relevant to job position. At this point I got carried away, I forgot what is my bounded context, my aggregates and what I am I building anyway...Next part really got me confused.
4.Selecting candidates, or how I defined it visualizing collected data, assessing and comparing. And choosing right candidate to hire. First think that crossed my mind is where is my data I collected. It's in Interview Processing microservice. I think I have a problem now. I need to get data from other microservice so my Selecting candidates service makes no sense. Its not good that it depends on Interview Processing.
Should I make it a part of Interviewing microservice? Something crossed my mind if I can put these two things together without any problem then those 2 things aren't my Bounded Context. They belong under same context. But where is actually that line? Can anyone give me his perspective on this. Did I overthink my Recruiting(potential bc) and should it be more simply looked at. Something like:
- Recruiting=Collecting applications, Interviewing candidates and promoting some candidates to Employees