def move_on(workitem=h.applied_workitem)
current_position = h.position
h.position = 0 if h.position == -1
child_id = workitem['fei'] == h.fei ?
0 : Ruote::FlowExpressionId.new(workitem['fei']).child_id + 1
com, arg = get_command(workitem)
case com
when 'break' then return reply_to_parent(workitem)
when 'rewind', 'continue' then h.position = 0
when 'skip' then h.position += (arg + 1)
when 'jump' then h.position = arg
else
h.position = h.position + 1 if child_id >= tree_children.size
end
h.position = h.list.length + h.position if h.position < 0
return apply_child(child_id, workitem) if h.position == current_position
val = h.list[h.position]
return reply_to_parent(workitem) if val == nil
set_variable('ii', h.position)
if h.to_v
set_variable(h.to_v, val)
else
workitem['fields'][h.to_f] = val
end
apply_child(0, workitem)
end