Interface RollbackHandler<T extends ProcessContext<?>>

All Known Implementing Classes:
CommitTaxRollbackHandler, CompleteOrderRollbackHandler, ConfirmPaymentsRollbackHandler, DecrementInventoryRollbackHandler, NullCheckoutRollbackHandler, RecordOfferUsageRollbackHandler

public interface RollbackHandler<T extends ProcessContext<?>>
Implementations are responsible for performing compensating operations to revert the state of the activity to what it was prior to execution. Activity, ProcessContext and stateConfiguration variables can be used to gather the necessary information to successfully perform the compensating operation.
Author:
Jeff Fischer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    rollbackState(Activity<T> activity, T processContext, Map<String,Object> stateConfiguration)
    Rollback the state of the activity to what it was prior to execution.
  • Method Details

    • rollbackState

      void rollbackState(Activity<T> activity, T processContext, Map<String,Object> stateConfiguration) throws RollbackFailureException
      Rollback the state of the activity to what it was prior to execution.
      Parameters:
      activity - The Activity instance whose state is being reverted
      processContext - The ProcessContext for the workflow
      stateConfiguration - Any user-defined state configuration associated with the RollbackHandler
      Throws:
      RollbackFailureException - if there is a failure during the execution of the rollback