Skip to content

Instantly share code, notes, and snippets.

View hading's full-sized avatar

Howard Ding hading

  • TriCo Libraries
  • PA, USA
View GitHub Profile
@hading
hading / process.rb
Created August 25, 2011 19:15 — forked from kennethkalmer/process.rb
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"
# Copyright 2011© MaestroDev. All rights reserved.
module Maestro
#
# An error class for error emitted by the "remote side" and received here.
#
class ReceiveError < RuntimeError
attr_reader :fei