Hi John,

Unfortunately I don¹t have a backtrace ‹ we patched it(in the calling
code, non ruote files) by manually skipping processes that have 0
expressions. We were getting missing_method 'attribute' for nilclass when
we were trying to iterate through processes that collect their
definition_name. The error was raised ultimately for processes that had 0
expressions in them (and maybe wfid=nil, not sure about this). Running
through ruote Engine#processes I found that wfid variable can be different
if passing options hash with some garbage in it (eg :test=>²test²). I
would expect to have the same list of processes returned by
Engine#processes if I don¹t pass options hash or if I pass options hash
with unusable keys.

Thanks
Iuri

On 2/9/11 5:37 PM, "John Mettraux" <[email protected]> wrote:

>
>On Wed, Feb 09, 2011 at 03:29:50PM -0800, Ocha wrote:
>> 
>> I was looking at processes method in engine.rb (ruote 2.1.11) and I
>> see that list of processes returned by that method can be different
>> when passing in an options hash. If there are options passed in (for
>> example :skip=>0) then we will get only processes that have
>> expressions associated because of expression_wfids method in base.rb.
>> 
>> I ran into a problem when I called Engine.processes and tried to read
>> definition_name for each process. I got a method missing error on
>> 'attribute' for nilclass.
>
>Hello Ocha,
>
>welcome to ruote's mailing list.
>
>Could I have the backtrace fo the "missing error" ?
>
>> I would recommend changing Engine#processes to:
>> 
>>       if opts.size > 0
>>         wfids = @context.storage.expression_wfids(opts)
>>         return wfids.size if opts[:count]
>>       else
>>         wfids = @context.storage.expression_wfids
>>       end
>>       list_processes(wfids, opts)
>> 
>> let me know what you think...
>
>OK, #list_processes is meant to deal with a 'wfids' set to nil. I will
>look at the error backtrace and make the appropriate modification.
>
>
>Thanks in advance,
>
>-- 
>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


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

Reply via email to