Created
August 25, 2011 18:07
-
-
Save kennethkalmer/1171321 to your computer and use it in GitHub Desktop.
RuoteAMQP error handling example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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