# File lib/ruote/exp/flow_expression.rb, line 320
    def self.do_action(context, msg)

      fei = msg['fei']
      action = msg['action']

      if action == 'reply' && fei['engine_id'] != context.engine_id
        #
        # the reply has to go to another engine, let's locate the
        # 'engine participant' and give it the workitem/reply
        #
        # see ft_37 for a test/example

        engine_participant =
          context.plist.lookup(fei['engine_id'], msg['workitem'])

        raise(
          "no EngineParticipant found under name '#{fei['engine_id']}'"
        ) unless engine_participant

        engine_participant.reply(fei, msg['workitem'])
        return
      end

      # normal case

      fexp = nil

      n = context.storage.class.name.match(/Couch/) ? 3 : 1
        #
      n.times do |i|
        if fexp = fetch(context, msg['fei']); break; end
        sleep 0.028 unless i == (n - 1)
      end
        #
        # Simplify that once ruote-couch behaves

      fexp.do(action, msg) if fexp
    end