Class: RbEAI::Workflow

Inherits:
Object
  • Object
show all
Defined in:
lib/rbeai/Workflow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xmlStr) ⇒ Workflow

Returns a new instance of Workflow.



14
15
16
17
18
19
20
21
22
23
# File 'lib/rbeai/Workflow.rb', line 14

def initialize(xmlStr)
  @xmlDoc = Document.new(xmlStr)
  aux = XPath.first(@xmlDoc, "./workflow")
  @instid = ""
  rate    = _getRate(aux.attributes["rate"])    
  @name   = aux.attributes["name"]
  @inputQueue = Queue.new
  @startPipe = _initPipeTask()    
  @thControl = _initProcess(rate.to_i)
end

Instance Attribute Details

#instidObject

Returns the value of attribute instid.



12
13
14
# File 'lib/rbeai/Workflow.rb', line 12

def instid
  @instid
end

Instance Method Details

#finishObject



30
31
32
33
34
# File 'lib/rbeai/Workflow.rb', line 30

def finish()
  @thControl.kill()
  @startPipe.finish()
  @startPipe.waitToEnd()      
end

#runObject



25
26
27
28
# File 'lib/rbeai/Workflow.rb', line 25

def run()
  @startPipe.run()    
  @thControl.run()
end