# File lib/ruote/exp/fe_await.rb, line 251
    def apply

      #
      # gathering info

      action, condition = self.class.extract_await_ac(attributes)

      raise ArgumentError.new(
        "couldn't determine which event to listen to from: " +
        attributes.inspect
      ) unless action

      global = (attribute(:global).to_s == 'true')
      global = false if action == 'error_intercepted'

      h.amerge = attribute(:merge).to_s

      persist_or_raise

      #
      # adding a new tracker

      @context.tracker.add_tracker(
        global ? nil : h.fei['wfid'],
        action,
        Ruote.to_storage_id(h.fei),
        condition,
        { 'action' => 'reply',
          'fei' => h.fei,
          'workitem' => 'replace',
          'flavour' => 'await' })
    end