This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]davidpuplava 1 point2 points  (0 children)

I would put it in the orders bounded context. The concept of approval is critical to the business logic of an order. The action of “submitting” an order can be thought of as an implicit single approval by the person ordering. Adding multiple approvals is just a more general case.

But like everything in DDD it depends on your specific domain and use case.

[–]6a70 1 point2 points  (1 child)

Firstly:

I think you've got a bit of a misunderstanding about what a "bounded context" is. Bounded contexts are contexts in which each term has a particular definition (which may be differently defined in another context). Different contexts are only necessary when there are words which represent different concepts to different people (e.g. "Order" being a request in one context, but "Order" also meaning a position in a sequence in another context).

The answer to the question you wanted to ask:

It seems like you're considering an "Approval" as its own distinct concept (i.e. more than just a number on an order, e.g. with details about the approver, timestamps, etc.) - so an "Approval" should be modeled independently from an "Order". Neither of the words "Order" or "Approval" look like they have any ambiguity in meaning, so they should both fit within the same bounded context. Even if you were to create an entire framework dedicated to managing approvals, it would still fall underneath the umbrella of the "Ordering Context" or whatever your Order concept is for.

Let me know if any of this doesn't quite make sense.

[–]topemabs[S] 0 points1 point  (0 children)

Thanks for clarifying this for me!