示例#1
0
 @SagaAction
 public void onAnotherDomainEvent(AnotherDomainEvent event) {
   data.setData(event.getData());
   spy.anotherEventHandled();
   completeIfPossible();
 }
示例#2
0
 private void completeIfPossible() {
   if (data.getAggregateId() != null && data.getData() != null) {
     spy.sagaCompleted();
     markAsCompleted();
   }
 }
示例#3
0
 @SagaAction
 public void onSampleDomainEvent(SampleDomainEvent event) {
   data.setAggregateId(event.getAggregateId());
   spy.sampleEventHandled();
   completeIfPossible();
 }