Class CompensationBehavior


  • public class CompensationBehavior
    extends Object
    Contains the oddities required by compensation due to the execution structures it creates. Anything that is a cross-cutting concern, but requires some extra compensation-specific conditions, should go here.
    Author:
    Thorben Lindhauer
    • Constructor Detail

      • CompensationBehavior

        public CompensationBehavior()
    • Method Detail

      • executesNonScopeCompensationHandler

        public static boolean executesNonScopeCompensationHandler​(PvmExecutionImpl execution)
        With compensation, we have a dedicated scope execution for every handler, even if the handler is not a scope activity; this must be respected when invoking end listeners, etc.
      • isCompensationThrowing

        public static boolean isCompensationThrowing​(PvmExecutionImpl execution)
      • executesDefaultCompensationHandler

        public static boolean executesDefaultCompensationHandler​(PvmExecutionImpl scopeExecution)
        Determines whether an execution is responsible for default compensation handling. This is the case if
        • the execution has an activity
        • the execution is a scope
        • the activity is a scope
        • the execution has children
        • the execution does not throw compensation
      • getParentActivityInstanceId

        public static String getParentActivityInstanceId​(PvmExecutionImpl execution)