Hello, John!
Several more questions and (surprise :-) ) suggestion from me. Hope
I'm not disturbing you excessively.
Was "set" intended for setting array elements of process variables?
Example below tries to set first element of variable 'v1'. It doesn't
work unlike setting field. Another thing is that setting of process
variable doesn't parse compound keys.
---
require 'rubygems'
require 'ruote'
require 'ruote/storage/hash_storage'
engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new()))
pdef = Ruote.process_definition :name => 'set test' do
echo 'This works: set f:f1.0'
set :field => 'f1.0', :value => 'val'
echo 'f1[0]: ${f:f1.0}'
echo 'This doesn\'t: set v:v1.0'
set :var => 'v1.0', :value => 'val'
echo 'v1[0]: ${v:v1.0}'
end
wfid = engine.launch pdef, { 'f1' => [] }, { 'v1' => [] }
engine.wait_for(wfid)
------
Another question is regarding setting process variables inside of
concurrent expressions. I tried to set variable inside of
concurrent_iterator, it doesn't work and produce error then run with '-
d'. If wrap "set" in "sequence" inside of "concurrent_iterator" then
it just does nothing.
May be this is a well-known behavior and it's prohibited? I found
nothing about it in the documentation and tests. So probably it's just
my inattention.
And finally, I have a small suggestion regarding "set" syntax.
Sometimes it needs to append value to array, without care about
array's index. It could look like this:
set :field => 'array_field.+', :value => 'some_val'
Maybe you will find this useful.
Best regards, Oleg
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en