Distributed Transaction, Saga Pattern, Axon Framework, Spring Boot, Microservices.
ERROR ROLL BACK ORDER if(event.getPaymentStatus().equalsIgnoreCase("ERROR")) { cancelOrderCommand(event.getOrderId()); }else { String shipmentId = UUID.randomUUID().toString(); //Associate the shipment ID SagaLifecycle.associateWith("shipmentId", shipmentId); //Trigger the next flow which is the