def merge_workitems(workitems, merge_type)

      workitems.inject(nil) do |t, wi|
        Ruote.merge_workitem(workitem_index(wi), t, wi, merge_type)
      end
    end
def merge_workitems(workitems, merge_type)

      workitems.inject(nil) do |t, wi|
        Ruote.merge_workitem(workitem_index(wi), t, wi, merge_type)
      end
    end
Given a list of workitems and a merge_type, will merge according to
 the merge type.

 The return value is the merged workitem.

 (Still used when dealing with highest/lowest merge_type and legacy
 concurrence/citerator expressions)