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