Module: AWS::Flow::Utilities

Defined in:
aws-flow-ruby/aws-flow/lib/aws/decider/utilities.rb

Overview

Utilities for the AWS Flow Framework for Ruby.

Defined Under Namespace

Classes: AddressableFuture

Class Method Summary (collapse)

Class Method Details

+ (Object) activity_task_to_debug_string(message, task)



49
50
51
52
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/utilities.rb', line 49

def self.activity_task_to_debug_string(message, task)
  "#{message} #{task.activity_type.name}.#{task.activity_type.version} "\
  "with input: #{task.input} and task_token: #{task.task_token}"
end

+ (Object) validation_error_string(infix)



64
65
66
67
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/utilities.rb', line 64

def self.validation_error_string(infix)
  "#{self.validation_error_string_partial(infix)} You can look at the "\
    "#{infix} Worker logs to see the original response."
end

+ (Object) validation_error_string_partial(infix)

The following two methods are used to generate an error string when response size of a workflow or activity is greater than 32k.



56
57
58
59
60
61
62
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/utilities.rb', line 56

def self.validation_error_string_partial(infix)
  str = infix.downcase == "workflow" ? "A" : "An"
  str += " #{infix} cannot send a response with data larger than "\
    "#{FlowConstants::DATA_LIMIT} characters. Please limit the size of the "\
    "response."
  str
end

+ (Object) workflow_task_to_debug_string(message, task, task_list)



42
43
44
45
46
47
# File 'aws-flow-ruby/aws-flow/lib/aws/decider/utilities.rb', line 42

def self.workflow_task_to_debug_string(message, task, task_list)
  "#{message} #{task.workflow_type.name}.#{task.workflow_type.version} "\
  "for execution with workflow_id: #{task.workflow_execution.workflow_id}, "\
  "run_id: #{task.workflow_execution.run_id}, task_list: #{task_list} with "\
  "task_token: #{task.task_token}"
end