def jump_to(workitem, position, arg)

      pos = Integer(arg) rescue nil

      return pos if pos != nil

      tree_children.each_with_index do |c, i|

        found = [
          c[0],                                      # exp_name
          c[1]['ref'],                               # ref
          c[1]['tag'],                               # tag
          (c[1].find { |k, v| v.nil? } || []).first  # participant 'xxx'
        ].find do |v|
          v ? (dsub(v, workitem) == arg) : false
        end

        if found then pos = i; break; end
      end

      pos ? pos : position
    end
def jump_to(workitem, position, arg)

      pos = Integer(arg) rescue nil

      return pos if pos != nil

      tree_children.each_with_index do |c, i|

        found = [
          c[0],                                      # exp_name
          c[1]['ref'],                               # ref
          c[1]['tag'],                               # tag
          (c[1].find { |k, v| v.nil? } || []).first  # participant 'xxx'
        ].find do |v|
          v ? (dsub(v, workitem) == arg) : false
        end

        if found then pos = i; break; end
      end

      pos ? pos : position
    end
Jumps to an integer position, or the name of an expression
 or a tag name of a ref name.