@Test public void testOnError() { LocalTransactionStepDefinition onError = rollBackGlobalWorkerUnderTest.onError(new ErrorGlobalOccured()); assertThat(onError.getIn()).isNotNull(); assertThat(onError.getMeta().getTransactionName()).isEqualTo("RollBackGlobalService"); }
@Override @RollBackBusinessLocalTransactional public LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured) { return LocalTransactionStepDefinition.builder().in(errorGlobalOccured).meta(this.meta).build(); }
RollBackGlobalWorker extends LocalTransactionWorker<GlobalRollbackOccured, GlobalTransactionLevelRollbacked, ErrorGlobalOccured> { @Override @RollBackBusinessLocalTransactional public LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured) { return LocalTransactionStepDefinition.builder().in(errorGlobalOccured).meta(this.meta).build(); } }
RollBackGlobalWorker extends LocalTransactionWorker<GlobalRollbackOccured, GlobalTransactionLevelRollbacked, ErrorGlobalOccured> { @Override @RollBackBusinessLocalTransactional public LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured) { return LocalTransactionStepDefinition.builder().in(errorGlobalOccured).meta(this.meta).build(); } RollBackGlobalWorker(); }
RollBackGlobalWorker extends LocalTransactionWorker<GlobalRollbackOccured, GlobalTransactionLevelRollbacked, ErrorGlobalOccured> { @Override @RollBackBusinessLocalTransactional public LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured) { return LocalTransactionStepDefinition.builder().in(errorGlobalOccured).meta(this.meta).build(); } RollBackGlobalWorker(); @PostConstruct void init(); @Override @BusinessLocalTransactional LocalTransactionStepDefinition onStart(GlobalRollbackOccured globalRollbackOccured); @Override @SwitchBusinessLocalTransactional LocalTransactionStepDefinition onNext(GlobalTransactionLevelRollbacked globalTransactionLevelRollbacked); @Override @RollBackBusinessLocalTransactional LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured); }
RollBackGlobalWorker extends LocalTransactionWorker<GlobalRollbackOccured, GlobalTransactionLevelRollbacked, ErrorGlobalOccured> { @Override @RollBackBusinessLocalTransactional public LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured) { return LocalTransactionStepDefinition.builder().in(errorGlobalOccured).meta(this.meta).build(); } RollBackGlobalWorker(); @PostConstruct void init(); @Override @BusinessLocalTransactional LocalTransactionStepDefinition onStart(GlobalRollbackOccured globalRollbackOccured); @Override @SwitchBusinessLocalTransactional LocalTransactionStepDefinition onNext(GlobalTransactionLevelRollbacked globalTransactionLevelRollbacked); @Override @RollBackBusinessLocalTransactional LocalTransactionStepDefinition onError(ErrorGlobalOccured errorGlobalOccured);  }