Class: SimplerWorkflow::Workflow::ActivityTaskTimedOutHandler

Inherits:
DefaultEventHandler show all
Defined in:
lib/simpler_workflow/workflow.rb

Instance Attribute Summary

Attributes inherited from DefaultEventHandler

#workflow

Instance Method Summary collapse

Methods inherited from DefaultEventHandler

#domain, #initial_activity_type, #initialize, #last_activity, #last_input, #scheduled_event

Constructor Details

This class inherits a constructor from SimplerWorkflow::Workflow::DefaultEventHandler

Instance Method Details

#call(decision_task, event) ⇒ Object



191
192
193
194
195
196
197
198
199
200
# File 'lib/simpler_workflow/workflow.rb', line 191

def call(decision_task, event)
  case event.attributes.timeoutType
  when 'START_TO_CLOSE', 'SCHEDULE_TO_START', 'SCHEDULE_TO_CLOSE'
    last_activity_type = last_activity(decision_task, event)
    SimplerWorkflow.logger.info("Retrying activity #{last_activity_type.name} #{last_activity_type.version} due to timeout.")
    decision_task.schedule_activity_task last_activity_type, :input => last_input(decision_task, event)
  when 'HEARTBEAT'
    decision_task.fail_workflow_execution
  end
end