lib/openwfe/expressions/fe_iterator.rb in openwferu-0.9.7 vs lib/openwfe/expressions/fe_iterator.rb in openwferu-0.9.8

- old
+ new

@@ -38,11 +38,10 @@ # # John Mettraux at openwfe.org # require 'openwfe/expressions/flowexpression' -require 'openwfe/expressions/fe_utils' module OpenWFE # @@ -91,11 +90,11 @@ @iterator.next(self, workitem) store_itself() get_expression_pool.launch_template( - self, 0, @children[0], workitem, nil) + self, @iterator.counter-1, @children[0], workitem, nil) end end # # Iterator instances keep track of the position of an iteration. @@ -123,11 +122,11 @@ @value_separator = /,\s*/ unless @value_separator @counter = 0 - raw_list = OpenWFE::lookup_vf_attribute( - iterator_expression, workitem, :value, :on) + raw_list = iterator_expression.lookup_vf_attribute( + workitem, :value, :on) @iteration_list = extract_iteration_list(raw_list) workitem.attributes['__ic__'] = @iteration_list.length end