# File lib/ruote/exp/fe_listen.rb, line 229
    def apply

      # gathering info

      h.to = attribute(:to) || attribute(:on)

      h.upon = UPONS[attribute(:upon) || 'apply']
      h.upon = 'error_intercepted' if h.to == 'errors'

      h.lmerge = attribute(:merge).to_s
      h.lmerge = 'true' if h.lmerge == ''

      h.lwfid = attribute(:wfid).to_s
      h.lwfid = %w[ same current true ].include?(h.lwfid)

      h.lwfid = true if h.to == 'errors'
        # can only listen to errors in the same process instance

      persist_or_raise

      # adding a new tracker

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