I have a saga that can handle multiple messages like so:
public class OrderSaga : ISaga<Order>
, InitiatedBy<StartOrderSaga>
, Orchestrates<CancelOrder>
, Orchestrates<PaymentForOrderReceived>
, Orchestrates<CheckOrderWasPaid>
, Orchestrates<OrderAbandoned>
, Orchestrates<CheckOrderHasBeenShipped>
, Orchestrates<OrderShipped>
, Orchestrates<CheckOrderHasDelayDuringShipment>
, Orchestrates<OrderArrivedAtDestination>
, Orchestrates<OrderCompleted>
{...}
but only Orchestrates<CancelOrder> seems to be picked up. So I suppose (I did not find the line, but am under a strong impression this is so), that only the first Orchestrates is registered.
Probably this is by design. From what I imagined a saga to be, it seems only logical that it receives many different messages, but I might be wrong. I might be wrong with my whole assumption, too :)
How am I supposed to handle this? Are Sagas supposed to only handle one (in my case) a ChangeStateMessage<State> or should I wire the other ConsumerOfs/Orchestrates by hand?