Permalink
Browse files

:on_field => 'my.nested.field' now possible

  • Loading branch information...
jmettraux committed May 14, 2011
1 parent 171301e commit 7126daba854da5b411005631ed90381232c1167a
Showing with 17 additions and 3 deletions.
  1. +1 −0 CHANGELOG.txt
  2. +1 −3 lib/ruote/exp/ro_attributes.rb
  3. +15 −0 test/functional/eft_13_iterator.rb
View
@@ -4,6 +4,7 @@
== ruote - 2.2.1 not yet released
- :on_field => 'my.nested.field' now possible
- [concurrent-]iterator :to => 'v:x' / 'f:y' / 'y'
- concurrence :merge_type => 'union'
- Reader.to_radial(tree)
@@ -200,9 +200,7 @@ def lval(vals, vars, flds, att_options)
elsif k = has_att(*flds)
k = attribute(k, h.applied_workitem, att_options)
h.applied_workitem['fields'][k]
# TODO : what about leveraging workitem#lookup ?
Ruote.lookup(h.applied_workitem['fields'], k)
else
@@ -78,6 +78,21 @@ def test_on_f
assert_trace(%w[ alice/0_1_0 bob/0_1_0 charly/0_1_0 ], pdef)
end
def test_on_nested_f
pdef = Ruote.process_definition :name => 'test' do
set 'f:data' => {}
set 'f:data.people' => %w[ alice bob charly ]
iterator :on_f => 'data.people', :to_var => 'v' do
participant '${v:v}'
end
end
@engine.register_participant '.*', TraceParticipant
assert_trace(%w[ alice/0_2_0 bob/0_2_0 charly/0_2_0 ], pdef)
end
def test_to_f
pdef = Ruote.process_definition :name => 'test' do

0 comments on commit 7126dab

Please sign in to comment.