On Thu, Dec 09, 2010 at 04:21:56PM -0800, pharon wrote:
>
> I am using ruote, ruote-amqp and python and was trying to write a
> simple generic "tracer" participant that records the time elapsed
> between each participant in a process. My plan is to use this data
> later to graph the performance of the process.
Hello Pharon, welcome to ruote,
your approach is very complicated. What about something like :
---8<---
require 'rubygems'
require 'ruote'
engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))
engine.add_service(
'history', 'ruote/log/storage_history', 'Ruote::StorageHistory')
pdef = Ruote.process_definition do
alpha
bravo
charly
end
engine.register '.+', Ruote::NoOpParticipant
wfid = engine.launch(pdef)
#engine.noisy = true
engine.wait_for(wfid)
# wait for the process to hit the error
# or to termminate
puts wfid
engine.context.history.by_process(wfid).each do |entry|
next unless entry['action'] == 'receive'
puts "#{entry['participant_name']} : #{Time.parse(entry['original_put_at'])}"
end
--->8---
Sorry, I never had the time to write the documentation about this history
service.
https://github.com/jmettraux/ruote/blob/ruote2.1/test/functional/ft_36_storage_history.rb
I'll try to come up with some documentation during the year end break.
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
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