Skip to content

Instantly share code, notes, and snippets.

@nicholasf
Created December 10, 2009 00:20
Show Gist options
  • Select an option

  • Save nicholasf/252984 to your computer and use it in GitHub Desktop.

Select an option

Save nicholasf/252984 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruote/engine'
# preparing the engine
engine = Ruote::FsPersistedEngine.new
# registering participants
engine.register_participant :xml_to_hash do
puts "1"
end
engine.register_participant :hash_to_yml do
puts "2"
end
# defining a process
process_def = Ruote.process_definition :name => 'process_xml' do
sequence do
participant :xml_to_hash
participant :hash_to_yml
end
end
@url = "http://bonus.anu.edu.au:80/obj/fStudy/au.edu.anu.assda.ddi.00102-f@relatedMaterials"
engine.launch(process_def, :fields => {:url => @url})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment