Class: RbEAI::RouterTask
Overview
<task name=“router” type=“Router” pool=“2”>
<next>
<goto task="sendfile">
<when filter="xpath:/test/status">91,92</when>
<!--<when filter="name:test.txt"/>-->
</goto>
<goto task="sendftp">
<when filter="sax:status">91,92</when>
<!--<when filter="name:test_2.txt"/>-->
</goto>
<goto task="final"/>
</next>
</task>
Instance Attribute Summary collapse
-
#nextTask ⇒ Object
Returns the value of attribute nextTask.
Attributes inherited from Task
Instance Method Summary collapse
- #doJob(resultQueueList, obj) ⇒ Object
-
#initialize(wflow, xmlFull, xmlDoc) ⇒ RouterTask
constructor
A new instance of RouterTask.
- #initQueues ⇒ Object
Methods inherited from Task
#getItemsNext, #persist, #persistFtp, #persistStr
Constructor Details
#initialize(wflow, xmlFull, xmlDoc) ⇒ RouterTask
Returns a new instance of RouterTask.
92 93 94 95 |
# File 'lib/rbeai/TasksLogic.rb', line 92 def initialize(wflow, xmlFull, xmlDoc) @logic = RouterLogic.new(xmlDoc) super(wflow, xmlFull, xmlDoc) end |
Instance Attribute Details
#nextTask ⇒ Object
Returns the value of attribute nextTask.
88 89 90 |
# File 'lib/rbeai/TasksLogic.rb', line 88 def nextTask @nextTask end |
Instance Method Details
#doJob(resultQueueList, obj) ⇒ Object
97 98 99 100 101 |
# File 'lib/rbeai/TasksLogic.rb', line 97 def doJob(resultQueueList, obj) task = @logic.enroute(obj) print task, "=> ", obj , "\n" resultQueueList[task].enq(obj) if task != nil end |
#initQueues ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/rbeai/TasksLogic.rb', line 103 def initQueues() resultQueueList = Hash.new(0) @logic.destinations.each do | task, logic| resultQueueList[task] = Queue.new end return resultQueueList end |