@Test public void testContextRollbackOnFailureNonTransactionalAlreadySucceeded() { final RollbackOnFailure context = new RollbackOnFailure(true, false); Integer[][] inputs = new Integer[][]{{4, 2, 2}, {2, 0, 999}, {null, 2, 999}, {10, 2, 999}, {8, 2, 4}}; final List<Integer> results = new ArrayList<>(); try { processInputs(context, inputs, results); } catch (ProcessException e) { fail("ProcessException should NOT be thrown"); } assertEquals("Successful inputs", 2, context.getProcessedCount()); }
public int getProcessedCount() { return processedCount; }
RollbackOnFailure { public int getProcessedCount() { return processedCount; } }
RollbackOnFailure { public int getProcessedCount() { return processedCount; } RollbackOnFailure(boolean rollbackOnFailure, boolean transactional); }
RollbackOnFailure { public int getProcessedCount() { return processedCount; } RollbackOnFailure(boolean rollbackOnFailure, boolean transactional); static PropertyDescriptor createRollbackOnFailureProperty(String additionalDescription); static BiFunction<FCT, ErrorTypes, ErrorTypes.Result> createAdjustError(final ComponentLog logger); static AdjustRoute<FCT> createAdjustRoute(Relationship ... failureRelationships); static ExceptionHandler.OnError<FCT, I> createOnError(ExceptionHandler.OnError<FCT, I> onError); static void onTrigger(
            ProcessContext context, ProcessSessionFactory sessionFactory, FCT functionContext, ComponentLog logger,
            PartialFunctions.OnTrigger onTrigger); int proceed(); int getProcessedCount(); boolean isRollbackOnFailure(); boolean isTransactional(); boolean canRollback(); boolean shouldDiscontinue(); void discontinue(); }
RollbackOnFailure { public int getProcessedCount() { return processedCount; } RollbackOnFailure(boolean rollbackOnFailure, boolean transactional); static PropertyDescriptor createRollbackOnFailureProperty(String additionalDescription); static BiFunction<FCT, ErrorTypes, ErrorTypes.Result> createAdjustError(final ComponentLog logger); static AdjustRoute<FCT> createAdjustRoute(Relationship ... failureRelationships); static ExceptionHandler.OnError<FCT, I> createOnError(ExceptionHandler.OnError<FCT, I> onError); static void onTrigger(
            ProcessContext context, ProcessSessionFactory sessionFactory, FCT functionContext, ComponentLog logger,
            PartialFunctions.OnTrigger onTrigger); int proceed(); int getProcessedCount(); boolean isRollbackOnFailure(); boolean isTransactional(); boolean canRollback(); boolean shouldDiscontinue(); void discontinue(); static final PropertyDescriptor ROLLBACK_ON_FAILURE; }