Does a process manager make use of correlation-ids or aggregate-specific identifies to keep track of the process it is managing?
To put it more clearly with an example, consider Figure 2 on Saga on Sagas:
First of all, Process Manager sending a OrderConfirmed
event is wrong right? I (as a process manager) cannot send events, only issue commands. Or am I wrong?
Second, how does the process manager correlate the OrderCreated, SeatsReserved, PaymentReceived events from different aggregates? Is it correlation id that each aggregate honors (and copies over), or is it specific identifiers (e.g. SeatsReserved has an Order Id that refers to the Order Aggregate)?
Finally, if it is the case of correlation ids, who creates them? Is it the client who issues a command, like PlaceOrder(order_id, correlation_id)
? Is it the Aggregate that accepts the command like PlaceOrder(order_id)
and then emits OrderCreated(order_id, corr_id)
event? Or, is it the process manager (in some way) that is responsible for this? Alternatively, perhaps correlation ids have nothing to do with this?
Thanks for any help.