I’m trying to play a little with Axon and DDD. To keep it simple, let’s say we have:
1.The Inventory with many products, which is my candidate as @Aggragate. At some point (it doesn’t matter when), Inventory is created and products are added.
2.An Order which can contain products from the Inventory. Also an @Aggragate
The simple scenario is that a client creates an order with selected products.
In my backend system Order aggragate is created.
Now the difficult part. I’m starting new Saga and I want to send command like this : MarkProductsAsReservedCommandInInventory, but I don’t have any Inventory identifier.
I’ve seen in some similar demo applications that usually the identifier comes from the client but I don’t see any reason why any client (REST, browser, etc.) should know anything about my Inventory.
So what is the typical solution for this type of situation, which I guess happens very often?
Or maybe I misunderstood some key concepts ?