class Pione::RuleEngine::RootHandler

RootHandler is a special handler for RootRule.

Public Instance Methods

execute() click to toggle source
Calls superclass method Pione::RuleEngine::FlowHandler#execute
# File lib/pione/rule-engine/root-handler.rb, line 5
def execute
  # import initial input tuples from input domain
  @inputs.flatten.each {|input| copy_data_into_domain(input, @domain_id)}
  # execute the rule
  outputs = super
  # export outputs to output domain
  outputs.flatten.each {|output| copy_data_into_domain(output, '/output')}
  # substantiate symbolic links
  # substantiate_date

  return outputs
end
substantiate_date() click to toggle source

Substantiate symbolic links to files.

# File lib/pione/rule-engine/root-handler.rb, line 19
def substantiate_date
  @outputs.flatten.compact.each do |output|
    if output.location.cached? and output.link?
      FileCache.get(output.location).turn(output.location)
    end
  end
end