I’m sorry if this question has been asked before but I couldn’t find it.
In my domain I have two aggregates order and request. Order is basically a grouping of requests. You create an order and then you create requests that are part of that order. When you submit the order the requests all become submitted and are dealt with individually. At some point every request is completed and the order becomes completed as well.
We currently solve this by having a submitOrder command that will basically load the Order aggregate and all the Requests and tell them to be submitted. I know that one could argue that you can have the Request just be properties of the Order, but they do live independently once created and are two different business concepts. A probably similar problem would be a Person and Employments.
This works fine and is an approach we used in the past when implementing a CQRS system in PHP. However the testing tools provided by axon begin to fall down. I saw the Bank example where a saga is used to deal with a transfer between two accounts, but then it would be two transactions for this one business transaction.
How would be a better approach to handle this?
Thanks in advance!