Class: RbEAI::TransfTask

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

Overview

<task name=“transf” type=“Transf” pool=“3”>

  <next>final</next>
  <transf ord="1" type="xsl" script="transf.xsl"/>
  <transf ord="2" type="awk" script="transf.awk"/>
  <!--<transf type="csv2xml" separator=" "/> -->
  <!--<transf type="xml2csv" separator="|"/> -->
  <!--<transf type="awk" script="transf.awk"/>-->
</task>

Instance Attribute Summary collapse

Attributes inherited from Task

#name, #size, #status, #wflow

Instance Method Summary collapse

Methods inherited from Task

#getItemsNext, #persist, #persistFtp, #persistStr

Constructor Details

#initialize(wflow, xmlFull, xmlDoc) ⇒ TransfTask

Returns a new instance of TransfTask.



143
144
145
146
# File 'lib/rbeai/TasksLogic.rb', line 143

def initialize(wflow, xmlFull, xmlDoc)
  @logic = TransfLogic.new(xmlDoc)
  super(wflow, xmlFull, xmlDoc)
end

Instance Attribute Details

#nextTaskObject

Returns the value of attribute nextTask.



139
140
141
# File 'lib/rbeai/TasksLogic.rb', line 139

def nextTask
  @nextTask
end

Instance Method Details

#doJob(resultQueue, source) ⇒ Object



148
149
150
151
152
# File 'lib/rbeai/TasksLogic.rb', line 148

def doJob(resultQueue, source)      
  aux = persist(source) # Create room for the transformed file
  dest = @logic.transform(aux)
  resultQueue.enq(dest)      
end