Enum ActivityCancellationType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ActivityCancellationType>

    public enum ActivityCancellationType
    extends java.lang.Enum<ActivityCancellationType>
    In case of an activity's call scope cancellation the corresponding activity stub call fails with a CanceledFailure. The different modes of this behavior are available and specified by this enum.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABANDON
      Do not request cancellation of the Activity Execution at all (no request is sent to the server) and immediately report cancellation to the Workflow Execution by causing the activity stub call to fail with CanceledFailure immediately.
      TRY_CANCEL
      In case of activity's scope cancellation send an Activity cancellation request to the server, and report cancellation to the Workflow Execution by causing the activity stub call to fail with CanceledFailure
      WAIT_CANCELLATION_COMPLETED
      Wait for the Activity Execution to confirm any requested cancellation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ActivityCancellationType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ActivityCancellationType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • WAIT_CANCELLATION_COMPLETED

        public static final ActivityCancellationType WAIT_CANCELLATION_COMPLETED
        Wait for the Activity Execution to confirm any requested cancellation. An Activity Execution must Heartbeat to receive a cancellation notification through ActivityCompletionException. This can block the cancellation of a Workflow Execution for a long time if the Activity Execution doesn't Heartbeat or chooses to ignore the cancellation request. The activity stub call will fail with CanceledFailure only after cancellation confirmation from the Activity Execution has been received.
      • TRY_CANCEL

        public static final ActivityCancellationType TRY_CANCEL
        In case of activity's scope cancellation send an Activity cancellation request to the server, and report cancellation to the Workflow Execution by causing the activity stub call to fail with CanceledFailure
      • ABANDON

        public static final ActivityCancellationType ABANDON
        Do not request cancellation of the Activity Execution at all (no request is sent to the server) and immediately report cancellation to the Workflow Execution by causing the activity stub call to fail with CanceledFailure immediately.
    • Method Detail

      • values

        public static ActivityCancellationType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ActivityCancellationType c : ActivityCancellationType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ActivityCancellationType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null