On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Are  somewhere some examples using complex dollor notations to access
> a value in a complex workitem attribute ( a array of hash maps )
> within the process definition ( usefull in "if", "case", ...
> expressions ) ?

This works for me :

---8<---

#!/usr/bin/env ruby

require 'rubygems'
require 'openwfe/def'
require 'openwfe/workitem'
require 'openwfe/engine/engine'

engine = OpenWFE::Engine.new

engine.register_participant ".*" do |workitem|
    puts workitem.participant_name
end

class TestDef < OpenWFE::ProcessDefinition

    sequence do
        participant "${f:array.0.a}"
        participant "${f:array.1.a}"
    end
end

li = OpenWFE::LaunchItem.new TestDef
li.array = []
li.array << { "a" => "|A|", "b" => "|B|" }
li.array << { "a" => "_A_", "b" => "_B_" }
fei = engine.launch li

engine.wait_for fei

--->8---

I will enhance the documentation :
http://rubyforge.org/tracker/index.php?func=detail&aid=15195&group_id=2609&atid=10195


Best regards,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to