Hi John..

sorry for my stupid questions....

yes it works for me too(not adding the control_field using densha's
web ui, though):

<process-definition name="main_process" revision="1">
        <sequence>
                <participant ref="reader" />
                <participant ref="dumper" />
                <iterator on-value="${f:control_field}"    to-variable="j">
                        <participant ref="toto" />
                </iterator>
        </sequence>
</process-definition>


the reader is a block partecipant defined in config/openwferu_partecipants:
$openwferu_engine.register_participant "reader" do |workitem|
        puts "now insert new field name"
        field_name = gets
        field_name.chomp!
        puts "now insert new field value"
        field_value = gets
        workitem.send("#{field_name}=", field_value)
        puts "workitem's field value is #{      workitem.send("#{field_name}") 
}"
end
( with this it doesn't work ... but it's due to the \n added by gets )

chomping! field_name after read all works fine and user is happy to
control at runtime iteration count....


$openwferu_engine.register_participant "dumper" do |workitem|
  puts workitem.inspect
end
( this helped me to find what was wrong )






On Nov 9, 2007 8:35 AM, John Mettraux <[EMAIL PROTECTED]> wrote:
>
> On Nov 9, 2007 4:24 PM, John Mettraux <[EMAIL PROTECTED]> wrote:
> > On Nov 9, 2007 3:42 PM, Tomaso Tosolini <[EMAIL PROTECTED]> wrote:
> > >
> > > On Nov 8, 2007 11:56 PM, John Mettraux <[EMAIL PROTECTED]> wrote:
> > > >
> > > > On Nov 9, 2007 6:06 AM, Tomaso <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > The problem is that at this moment such a mechanism don't work,
> > > > > > whatever value is put into
> > > > > > control_value when the workitem is sent to "preparecontrolvalue"
> > > > > > partecipant, i tried simple values
> > > > > > like "1,2,3", but nothing to do.
> > > > >
> > > > > .... sorry....
> > > > > please do a gsub "control_value", "control_field" in the previous
> > > > > string...
> > > >
> > > > So it works :)
> > >
> > > Hi John...
> > > does it work for you?
> > > it tried it using densha but after the "preparecontrolvalue"
> > > partecipant in which simply i add the control_field="1,2,3" by hand,
> > > the process starts the iteration but it seems the number of iterations
> > > is 0(the whole process ends immediately) instead of 3. Is this
> > > behaviour correct?
> >
> > Now testing in Densha.
> >
> > Meanwhile, have you looked at logs/openwferu_development.log ? Grep
> > for "IteratorExpression", there should be some explanation there.
>
> Hi Tomaso,
>
> I just tested manually in Densha and it works fine. three iterations.
>
>
> Maybe you have more information.
>
>
> 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