Let's say I have 2 entities(aggregate roots) in different microservices.
I have a requirement to add a possibility to fill the custom(dynamic) form during the lifecycle of these entities.
Forms are created by users and it mustn't be possible to fill Report specific form in Inspection and vise-versa. Form structure(field types) and form submission(answers) model are the same among these entities.
My question is how to design it in microservices way, given the following domain constraints:
Approach #1
Introduce in each service a form entity and store answers in report/inspection respectively.
Pros:
Cons:
Approach #2
Introduce a new form service to store user-defined forms and form answers. Entities should reference answers only by id.
Pros:
Cons:
I'll give a bit of generic answer:
A good microservices infrastructure is more about services solving specific business problems, and less about being interfaces for databases - this is a common mistake - a service literally looks like a proxy for database queries.
Let me extract service ideas from your description:
The next step would be to describe API's for every service (please, find youtube video on "designing apis" very old talk at google).
Then you validate api's by sequence diagrams - as a result you may merge services - in case they are too small; or split larger chunks.
At the end of the day - you want to apply Unix philosophy for your services: "Do one thing and do it well".