# File lib/ruote/worker.rb, line 376
    def process(msg)

      return false unless @storage.reserve(msg)

      begin

        @context.pre_notify(msg)

        case msg['action']

          when 'launch', 'apply', 'regenerate'

            launch(msg)

          when *EXP_ACTIONS

            Ruote::Exp::FlowExpression.do_action(@context, msg)

          when *DISP_ACTIONS

            @context.dispatch_pool.handle(msg)

          when *PROC_ACTIONS

            self.send(msg['action'], msg)

          when 'reput'

            reput(msg)

          when 'raise'

            @context.error_handler.msg_handle(msg['msg'], msg['error'])

          when 'respark'

            respark(msg)

          #else
            # no special processing required for message, let it pass
            # to the subscribers (the notify two lines after)
        end

        @context.notify(msg)
          # notify subscribers of successfully processed msgs

      rescue => err

        @context.error_handler.msg_handle(msg, err)
      end

      @context.storage.done(msg) if @context.storage.respond_to?(:done)

      @info << msg if @info
        # for the stats

      true
    end