Class: RbEAI::Workflow
- Inherits:
-
Object
- Object
- RbEAI::Workflow
- Defined in:
- lib/rbeai/Workflow.rb
Instance Attribute Summary collapse
-
#instid ⇒ Object
Returns the value of attribute instid.
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(xmlStr) ⇒ Workflow
constructor
A new instance of Workflow.
- #run ⇒ Object
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
#instid ⇒ Object
Returns the value of attribute instid.
12 13 14 |
# File 'lib/rbeai/Workflow.rb', line 12 def instid @instid end |
Instance Method Details
#finish ⇒ Object
30 31 32 33 34 |
# File 'lib/rbeai/Workflow.rb', line 30 def finish() @thControl.kill() @startPipe.finish() @startPipe.waitToEnd() end |
#run ⇒ Object
25 26 27 28 |
# File 'lib/rbeai/Workflow.rb', line 25 def run() @startPipe.run() @thControl.run() end |