On Wed, Jun 16, 2010 at 07:20:57AM +0200, Asier wrote:
> On Miércoles, 16 de Junio de 2010 02:15:05 John Mettraux escribió:
>
> > > Am I doing something wrong?
> >
> > Hello Asier,
> >
> > given
> >
> > p [ @options, workitem.fields['params']['reply_anyway'] ]
> > # => [ {:reply_by_default=>false, :default_queue=>nil}, 'true' ]
> >
> > the 'if' should resolve successively to
> >
> > if @options[:reply_by_default] ||
> > workitem.fields['params']['reply_anyway'] == true if false ||
> > workitem.fields['params']['reply_anyway'] == true
> > if false || true == true
> > if false || true
> > if true
> >
> > I don't understand how you end up with false.
>
> p workitem.fields['params']['reply_anyway']
>
> 'true'
>
> It's a string, but it gets compared to a boolean true, so returns always
> false.
>
> If I change to == 'true' it works ok
>
> Perhaps the problem is in the process xml definition?
Ah sorry, now I get it.
ruote-amqp should be OK with both true and 'true' (the rest is false).
In my opinion, it's an XML process definition but a ruote-amqp issue.
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
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