Class: MINT::Task

Inherits:
Interactor show all
Defined in:
lib/MINT-core/model/task.rb

Overview

A Task defines the basic control flow object, has a #parent task, unless it’s the root task and a textual, unstructured #description.

Direct Known Subclasses

ApplicationTask, InteractionTask

Constant Summary

Constants inherited from Interactor

Interactor::PUBLISH_ATTRIBUTES

Instance Method Summary collapse

Methods inherited from Interactor

class_from_channel_name, #create_attribute_channel_name, create_channel_name, #create_channel_w_name, get, getModel, #getSCXML, get_dm, #init_statemachine, #is_in?, #new_states, notify, #process_event, #process_event!, #process_event_vars, #publish_update, #states, #states=, #sync_event, #sync_states, #to_dot, wait

Methods included from InteractorHelpers

#restart_timeout, #start_timeout, #stop_timeout

Instance Method Details

#initialize_statemachineObject



12
13
14
15
16
17
18
19
20
# File 'lib/MINT-core/model/task.rb', line 12

def initialize_statemachine
  if @statemachine.nil?

    @statemachine = Statemachine.build do
      trans :initialized, :run, :running
      trans :running, :stop, :done
    end
  end
end