Method: OpenStudio::Workflow::Run#step
- Defined in:
- lib/openstudio/workflow/run.rb
#step ⇒ Object
Step through the states, if there is an error (e.g. exception) then go to error
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/openstudio/workflow/run.rb', line 285 def step step_instance = @jobs.find { |h| h[:state] == @current_state } require step_instance[:file] klass = OpenStudio::Workflow.new_class(step_instance[:job], @input_adapter, @output_adapter, @registry, @options) @output_adapter.communicate_transition("Starting state #{@current_state}", :state) state_return = klass.perform if state_return @output_adapter.communicate_transition("Returned from state #{@current_state} with message #{state_return}", :state) else @output_adapter.communicate_transition("Returned from state #{@current_state}", :state) end next_state rescue StandardError => e step_error("#{e.}:#{e.backtrace.join("\n")}") end |