On 10/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi John,
>
> I tried to use a more complex dollar notation but I got an exception.
> The program and the exception is below.
> What is wrong ?
> I apply your example to my scenario and I thought that it should work,
> but it does'nt.
>
> Best regards,
>
> Andreas
>
>
>
> require 'rubygems'
> require 'openwfe/def'
> require 'openwfe/workitem'
>
> require 'openwfe/engine/engine'
> require 'openwfe/extras/participants/sqsparticipants'
> require 'openwfe/extras/listeners/sqslisteners'
> require 'openwfe/expressions/raw_prog'
> require 'openwfe/tools/flowtracer'
>
> engine = OpenWFE::Engine.new
>
>
> engine.register_participant :log do |workitem|
>     #engine.ldebug "LOG #{workitem.params.msg}"
>     puts workitem.lookup_attribute("params.msg")
> end
>
>
> class TenderProcessDefinition < OpenWFE::ProcessDefinition
>
>     sequence do
>
>         _if do
>            equals :field_value => "${f:supplierList.
> 1.DunsNr}", :other_value => "ZUTE8555"
>             #then
>             log :msg => "matched"
>             #else
>             log :msg => "not matched"
>         end
>     end
>
>     set :field => "supplierList", :value =>
> [{"name"=>"companyA","DunsNr" => "JGE4753"},
> {"name"=>"companyB","DunsNr" => "ZUTE8555"},
> {"name"=>"companyC","DunsNr" => "GTI6775"},
> {"name"=>"companyD","DunsNr" => "XUE6755"}]
> end

Hi Andreas,

you've spotted two things.

1). the process fails silently, that's bad, you had to use trace_flow
to detect the root error. I have to to fix that.

2). the root issue, the array is set in the process definition, using
Ruby, IIRC, the array is turned into a String, I have to check why
it's like that for now. It guess it would follow the "principle of
least surprise" if it simply worked the way you coded it.

I have to investigate those two issues.

For now, I recommend that you set such array/hash values inside of
participants or when preparing the launch items, not in the process
definition.


Thanks and 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