Open isfong opened 3 years ago
public OrderValue cancel( Long id ) {
Orders order = this.orderRepository.findById( id )
.orElseThrow( ( ) -> new OrderNotFoundException( id ) );
OrderCancelSagaData orderCancelSagaData = new OrderCancelSagaData( order.getConsumerId( ), order.getId( ), order.getOrderTotal( ) );
this.sagaInstanceFactory.create( this.orderCancelSaga, orderCancelSagaData );
return order.value( );
}
Hi,
this may be connected with:
As issue #107 describes, unhandled exception in CommandHandler or in domain service method or in Aggregate method will break the Saga.
In issue #70 an exception "org.springframework.orm.jpa.JpaSystemException: Transaction was marked for rollback only; cannot commit; nested exception is org.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit" breaks not only the current Saga, but all the future Sagas as well. Only full system restart helps.
BTW, what do you mean about suspended state of the Saga, how do you check this state?
In the saga execution process, an exception is intentionally thrown somewhere, and it is not caught. For example, if the input value is not equal to 1, an exception is thrown. At this time, the entire saga will be in a suspended state. It will never be available unless the entire service is restarted.
Continuously initiate operation requests to the saga,the console only output logs:
Please help me, I am just a novice.