Hi everyone, I'm relatively new to Ruby, and I'm very new to BPM/Ruote. I'm currently considering using Ruote in conjunction with AMQP to manage multiple distributed systems, so I'm trying to get Rails, ruote, ruote- kit, ruote-amqp and a daemon-kit-based Ruote agent to all play nicely. I'm working on getting a working AMQP participant going with a daemon- kit-based ruote agent, but I'm having problems.
I'm using the following versions of ruote, ruote-amqp, etc.: ruote (2.1.7) ruote-amqp (2.1.5) ruote-kit (2.1.7) daemon-kit (0.1.8pre) - I'm using daustin's version, patched to support Ruote 2.1 (http://github.com/daustin/daemon-kit) Ruote agent starts up fine (pastie of the below is at http://pastie.org/940997): ---------- $ bin/ruote [daemon-kit]: DaemonKit (0.1.8pre) booting in development mode [daemon-kit]: Setting up trap for USR1 [daemon-kit]: Setting up trap for USR2 [daemon-kit]: Setting up trap for HUP [daemon-kit]: Setting up trap for INT [daemon-kit]: Setting up trap for TERM [daemon-kit]: DaemonKit (0.1.8pre) booted, now running ruote [daemon-kit]: AMQP.start({:pass=>"guest", :host=>"rabbitmq", :user=>"guest", :vhost=>"/"}) [daemon-kit]: Subscribing to work1 for workitems ---------- However, when I try to run the following code (also pastied at http://pastie.org/940996), the agent sees nothing. I have verified via tcpdump that traffic is flowing to the rabbitmq server, but I'm not seeing any queues being created (I do see the work1 queue as created by the agent, but none of the expected ruote-workitems, etc.). So my questions are: 1. Should the below code work? 2. How can I get a better view into what is going on behind the scenes so that I can troubleshoot this myself in the future? Any help is greatly appreciated, thank you in advance! ---------- #!/usr/bin/env ruby require 'rubygems' require 'ruote-amqp' require 'ruote-amqp/participant' require 'ruote' require 'ruote/storage/fs_storage' engine = Ruote::Engine.new( Ruote::Worker.new( Ruote::FsStorage.new('ruote_work') ) ) AMQP.settings[:host] = 'rabbitmq' # AMQP.settings[:logging] = true puts AMQP.settings.inspect engine.register_participant(:amqp, RuoteAMQP::Participant.new(:reply_by_default => true )) do |workitem| puts workitem.inspect end pdef = Ruote.process_definition :name => 'print_quote' do sequence do amqp :queue => 'work1', :command => '/sample/quote' end end wfid = engine.launch(pdef) engine.wait_for(wfid) ---------- Output from the above script: ---------- {:vhost=>"/", :pass=>"guest", :ssl=>false, :host=>"rabbitmq", :logging=>false, :timeout=>nil, :user=>"guest", :port=>5672} #<Ruote::Workitem:0x101de46b0 @h={"participant_name"=>"amqp", "fields"=>{"params"=>{"command"=>"/sample/quote", "queue"=>"work1", "ref"=>"amqp"}}, "fei"=>{"sub_wfid"=>nil, "wfid"=>"20100430- bidoyokudu", "engine_id"=>"engine", "expid"=>"0_0_0"}}> ---------- Again, thank you for any help! -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
