I am using Axon framework 4.8.0.
|
@Autowired
private transient CommandGateway commandGateway;
@StartSaga
@SagaEventHandler(associationProperty = "orderId")
public void handle(OrderCreatedEvent orderCreatedEvent){
ReserveProductCommand reserveProductCommand = ReserveProductCommand.builder()
.orderId(orderCreatedEvent.getOrderId())
.productId(orderCreatedEvent.getProductId())
.quantity(orderCreatedEvent.getQuantity())
.userId(orderCreatedEvent.getUserId())
.build();
log.info("OrderCreatedEvent handled for orderId : "+reserveProductCommand.getOrderId()+
" and ProductId : "+reserveProductCommand.getProductId());
commandGateway.send(reserveProductCommand);
}
From the above code snippet, when commandGateway.send(reserveProductCommand) is called, ReserveProductCommand is not being invoked. Need assistance to understand the situation and reasons to proceed with other Saga Event Handlers.