On Tue, Jun 15, 2010 at 07:23:47PM +0200, Asier wrote:
>
> First, sorry for the previous multipost... gmail was a bit crazy.
>
> I register a participant (ruote-kit) in config.ru as:
>
> > - - - - - - - - - - - - - - - - - - - - - - - - -
> config.register do
> participant :copper, RuoteAMQP::Participant,
> :reply_by_default => true,
> :default_queue => 'ruote'
> catchall
> end
> > - - - - - - - - - - - - - - - - - - - - - - - - -
>
> Launch this workflow:
>
> > - - - - - - - - - - - - - - - - - - - - - - - - -
> <process-definition name="secuencia simple" revision="1_0">
> <sequence>
> <participant ref="copper" task="almacenamiento" queue="ruote"
> reply_anyway="true"/>
> <participant ref="alice" task="aprobacion"/>
> </sequence>
> </process-definition>
> > - - - - - - - - - - - - - - - - - - - - - - - - -
>
> But it looks like parameters aren't being passed correctly. To
> determine if the workitem must reply to the engine, file
> lib/ruote-amqp/participant.rb makes this test (line 160)
>
> > - - - - - - - - - - - - - - - - - - - - - - - - -
> if @options[:reply_by_default] ||
> workitem.fields['params']['reply_anyway'] == true
> reply_to_engine( workitem )
> end
> > - - - - - - - - - - - - - - - - - - - - - - - - -
>
> But if I put this:
> > - - - - - - - - - - - - - - - - - - - - - - - - -
> p @options,workitem.fields['params']['reply_anyway']
> > - - - - - - - - - - - - - - - - - - - - - - - - -
> just before the 'if' I get
>
> {:reply_by_default=>false, :default_queue=>nil}
> 'true'
>
> So the 'if' always is false!
>
> 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.
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