On Fri, Oct 2, 2009 at 2:42 AM, Charles.Magid <[email protected]> wrote:
>
> thank you again for http://gist.github.com/198728. But it is an
> example off a push onto queue and wait for a response on a queue. I
> was hoping for a wait on response without a push first. Is that
> possible?
Hello,
you could
a) set up a vanilla amqp listener and react to messages on its queue
(none of the scenarii)
Using a non- ruote-amqp listener to react upon messages, launching
ruote process instances.
b) use the AmqpListener of ruote-amqp and react on messages translated
into workitems (scenario 3) Unfortunately, ruote 2.0 (and ruote-aqmp)
seem not yet ready to received launchitems [over amqp], I will work
with Kenneth to fix that.
Advanced :
c) use the 'listen' expression [1] in conjunction with the AmqpListener
---8<---
sequence do
listen :to => "janet", :upon => :reply
participant :ref => 'after_janet_replied'
end
--->8---
The listen expression will block the process instance until a workitem
is received by any listener and is adressed/coming from the
participant named 'janet' (technically it's more like "the participant
whose name matches the regular expression /janet/). Note the :upon =>
:reply.
It seems a) and b) are not what you're looking for. I've traditionally
always discouraged the "fire a process that listens for an event"
approach in favour of the "listen for an event that fires a process"
approach, but maybe you've got your reasons and you understand what
you do.
[1] http://ruote.rubyforge.org/exp/listen.html
I hope this will help, 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
-~----------~----~----~----~------~----~------~--~---