Class: Bizflow::ProcessInterpreter

Inherits:
Object
  • Object
show all
Defined in:
lib/bizflow/interpreters/process_interpreter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(process_name) ⇒ ProcessInterpreter

Returns a new instance of ProcessInterpreter.



9
10
11
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 9

def initialize(process_name)
  @process = Bizflow::SemanticModel::Process.new(process_name)
end

Instance Attribute Details

#input_action_interpreterObject

Returns the value of attribute input_action_interpreter.



7
8
9
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 7

def input_action_interpreter
  @input_action_interpreter
end

#processObject

Returns the value of attribute process.



7
8
9
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 7

def process
  @process
end

#task_action_interpreterObject

Returns the value of attribute task_action_interpreter.



7
8
9
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 7

def task_action_interpreter
  @task_action_interpreter
end

Instance Method Details

#description(description) ⇒ Object



29
30
31
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 29

def description(description)
  process.description = description
end

#handler_action(name, &action) ⇒ Object



25
26
27
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 25

def handler_action(name, &action)

end

#input_action(name, &action) ⇒ Object



13
14
15
16
17
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 13

def input_action(name, &action)
  input_action_interpreter = Bizflow::InputActionInterpreter.new(name)
  input_action_interpreter.instance_eval(&action)
  process.add_action(input_action_interpreter.action)
end

#start(action_name) ⇒ Object



33
34
35
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 33

def start(action_name)
  process.start = action_name
end

#task_action(name, &action) ⇒ Object



19
20
21
22
23
# File 'lib/bizflow/interpreters/process_interpreter.rb', line 19

def task_action(name, &action)
  task_action_interpreter = Bizflow::TaskActionInterpreter.new(name)
  task_action_interpreter.instance_eval(&action)
  process.add_action(task_action_interpreter.action)
end