Skip to content

Instantly share code, notes, and snippets.

@kennethkalmer
Created August 25, 2011 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kennethkalmer/1171321 to your computer and use it in GitHub Desktop.
Save kennethkalmer/1171321 to your computer and use it in GitHub Desktop.
RuoteAMQP error handling example
Ruote.process_definition :name => 'Test' do
sequence do
# Loop, depending on the amqp participant to set 'completed' once it has successfully processed the
# workitem.
_loop :break_if => "${f:completed}" do
# This remote participant will either set a field called 'completed' to true when it is done,
# or set 'error' with the exception.
amqp_participant :activity => "Do something"
# This participant will only be called if 'completed' is false or nil
human_participant :activity => "AMQP error: ${f:error}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment