Class: AWS::Flow::ActivityOptions

Inherits:
Options
  • Object
show all
Defined in:
aws-flow-ruby/aws-flow/lib/aws/decider/options.rb

Overview

Options to use on an activity or decider. The following options are defined:

Direct Known Subclasses

ActivityRegistrationOptions, ActivityRuntimeOptions

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Options

#get_options, inherited

Constructor Details

- (ActivityOptions) initialize(default_options = {}, use_defaults = false)

Creates a new set of ActivityOptions.

Parameters:

  • default_options (Hash) (defaults to: {})

    A set of ActivityOptions to use as the default values.

  • use_defaults (true, false) (defaults to: false)

    Set to true to use the pre-defined AWS::Flow::ActivityDefaults.

Options Hash (default_options):

  • :heartbeat_timeout (Integer)

    The optional default maximum time, specified when registering the activity type, before which a worker processing a task must report progress by calling RecordActivityTaskHeartbeat.

    You can override this default when scheduling a task through the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.

  • :schedule_to_close_timeout (Integer)

    The optional default maximum duration, specified when registering the activity type, for tasks of this activity type.

    You can override this default when scheduling a task through the ScheduleActivityTask decision.

  • :schedule_to_start_timeout (Integer)

    The optional default maximum duration, specified when registering the activity type, that a task of an activity type can wait before being assigned to a worker.

    You can override this default when scheduling a task through the ScheduleActivityTask decision.

  • :start_to_close_timeout (Integer)

    The optional default maximum duration for tasks of an activity type specified when registering the activity type.

    You can override this default when scheduling a task through the ScheduleActivityTask decision.

  • :task_list (Array)

    The optional default task list specified for this activity type at registration. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision.

  • :task_priority (Array)

    The optional default task priority specified for this activity type at registration. This default task priority is used if a task priority is not provided when a task is scheduled through the ScheduleActivityTask decision.

    You can override this default when scheduling a task through the ScheduleActivityTask decision.

  • :version (String)

    The version of this activity. If you change any other options on the activity, you must also change the version.



772
773
774
775
776
777
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 772

def initialize(default_options={}, use_defaults=false)
  if default_options.keys.include? :exponential_retry
    @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
  end
  super(default_options, use_defaults)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AWS::Flow::Options

Instance Attribute Details

- (Object) default_task_heartbeat_timeout

The optional default maximum time, specified when registering the activity type, before which a worker processing a task must report progress by calling record_heartbeat on the ActivityTask.

You can override this default when scheduling a task through the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.

The valid values are integers greater than or equal to zero. An integer value can be used to specify the duration in seconds while "NONE" can be used to specify unlimited duration.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

- (Object) default_task_list

The optional default task list specified for this activity type at registration. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision. You can override this default when scheduling a task through the ScheduleActivityTask decision.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

- (Object) default_task_priority

The optional default task priority specified for this activity type at registration. This default task priority is used if a task priority is not provided when a task is scheduled through the ScheduleActivityTask decision. You can override this default when scheduling a task through the ScheduleActivityTask decision.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

- (Object) default_task_schedule_to_close_timeout

The optional default maximum duration, specified when registering the activity type, for tasks of this activity type. You can override this default when scheduling a task through the ScheduleActivityTask decision.

The valid values are integers greater than or equal to zero, or the string "NONE". An integer value can be used to specify the duration in seconds while "NONE" is be used to specify unlimited duration.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

- (Object) default_task_schedule_to_start_timeout

The optional default maximum duration, specified when registering the activity type, that a task of an activity type can wait before being assigned to a worker. You can override this default when scheduling a task through the ScheduleActivityTask decision.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

- (Object) default_task_start_to_close_timeout

The optional default maximum duration for tasks of an activity type specified when registering the activity type. You can override this default when scheduling a task through the ScheduleActivityTask decision.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 675

class ActivityOptions < Options

  properties(
    :heartbeat_timeout,
    :task_list,
    :schedule_to_close_timeout,
    :schedule_to_start_timeout,
    :start_to_close_timeout,
    :task_priority,
    :version,
    :input
  )

  property(:manual_completion, [lambda {|x| x == true}])
  property(:data_converter, [])

  default_classes << ActivityDefaults.new

  # Gets the activity prefix name.
  #
  # @return [String]
  #   The activity name.
  #
  def activity_name
    @prefix_name
  end

  # Sets the activity prefix name.
  #
  # @param [String] value
  #   The activity name to set.
  #
  def activity_name=(value)
    @prefix_name = value
  end

  # Creates a new set of `ActivityOptions`.
  #
  # @param [Hash] default_options
  #   A set of `ActivityOptions` to use as the default values.
  #
  # @option default_options [Integer] :heartbeat_timeout
  #   The optional default maximum time, specified when registering the
  #   activity type, before which a worker processing a task must report
  #   progress by calling `RecordActivityTaskHeartbeat`.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision. If the activity worker subsequently
  #   attempts to record a heartbeat or returns a result, the activity
  #   worker receives an UnknownResource fault. In this case, Amazon SWF no
  #   longer considers the activity task to be valid; the activity worker
  #   should clean up the activity task.
  #
  # @option default_options [Integer] :schedule_to_close_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, for tasks of this activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :schedule_to_start_timeout
  #   The optional default maximum duration, specified when registering the
  #   activity type, that a task of an activity type can wait before being
  #   assigned to a worker.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Integer] :start_to_close_timeout
  #   The optional default maximum duration for tasks of an activity type
  #   specified when registering the activity type.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [Array] :task_list
  #   The optional default task list specified for this activity type at
  #   registration. This default task list is used if a task list is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  # @option default_options [Array] :task_priority
  #   The optional default task priority specified for this activity type at
  #   registration. This default task priority is used if a task priority is not
  #   provided when a task is scheduled through the ScheduleActivityTask
  #   decision.
  #
  #   You can override this default when scheduling a task through the
  #   `ScheduleActivityTask` decision.
  #
  # @option default_options [String] :version
  #  The version of this activity. If you change any other options on the
  #  activity, you must also change the version.
  #
  # @param [true, false] use_defaults
  #   Set to `true` to use the pre-defined {ActivityDefaults}.
  #
  def initialize(default_options={}, use_defaults=false)
    if default_options.keys.include? :exponential_retry
      @_exponential_retry = ExponentialRetryOptions.new(default_options[:exponential_retry])
    end
    super(default_options, use_defaults)
  end

  property(:_exponential_retry, [])

  # Retries the supplied block with exponential retry logic.
  #
  # @param [Hash] block
  #   A hash of {ExponentialRetryOptions}.
  #
  def exponential_retry(&block)
    retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
    @_exponential_retry = retry_options
  end

  # Return the full set of options for the Activity.
  def get_full_options
    result = {}
    usable_properties = self.class.held_properties
    usable_properties.delete(:from_class)
    usable_properties.each do |option|
      result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
    end
    result
  end
end

Instance Method Details

- (String) activity_name

Gets the activity prefix name.

Returns:

  • (String)

    The activity name.



698
699
700
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 698

def activity_name
  @prefix_name
end

- (Object) activity_name=(value)

Sets the activity prefix name.

Parameters:

  • value (String)

    The activity name to set.



707
708
709
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 707

def activity_name=(value)
  @prefix_name = value
end

- (Object) exponential_retry(&block)

Retries the supplied block with exponential retry logic.

Parameters:



786
787
788
789
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 786

def exponential_retry(&block)
  retry_options = Utilities::interpret_block_for_options(ExponentialRetryOptions, block)
  @_exponential_retry = retry_options
end

- (Object) get_full_options

Return the full set of options for the Activity.



792
793
794
795
796
797
798
799
800
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/options.rb', line 792

def get_full_options
  result = {}
  usable_properties = self.class.held_properties
  usable_properties.delete(:from_class)
  usable_properties.each do |option|
    result[option] = self.send(option) if self.send(option) != nil && self.send(option) != ""
  end
  result
end