def replay_at_error(err)

      err = error(err) unless err.is_a?(Ruote::ProcessError)

      msg = err.msg.dup

      if tree = msg['tree']
        #
        # as soon as there is a tree, it means it's a re_apply

        re_apply(
          msg['fei'],
          'tree' => tree,
          'replay_at_error' => true,
          'workitem' => msg['workitem'])

      else

        action = msg.delete('action')

        msg['replay_at_error'] = true
          # just an indication

        @context.storage.delete(err.to_h) # remove error
        @context.storage.put_msg(action, msg) # trigger replay
      end
    end
def replay_at_error(err)

      err = error(err) unless err.is_a?(Ruote::ProcessError)

      msg = err.msg.dup

      if tree = msg['tree']
        #
        # as soon as there is a tree, it means it's a re_apply

        re_apply(
          msg['fei'],
          'tree' => tree,
          'replay_at_error' => true,
          'workitem' => msg['workitem'])

      else

        action = msg.delete('action')

        msg['replay_at_error'] = true
          # just an indication

        @context.storage.delete(err.to_h) # remove error
        @context.storage.put_msg(action, msg) # trigger replay
      end
    end
Replays at a given error (hopefully the cause of the error got fixed
 before replaying...)