Re: Mini-lang equivalent to while loop

Posted by David E Jones-2 on
URL: http://ofbiz.116.s1.nabble.com/Mini-lang-equivalent-to-while-loop-tp174056p174062.html


Iain,

How long is it taking to run? Perhaps you're running into the default  
transaction timeout of 60 seconds.

There are a couple of ways around this. In general even with a few  
hundred items it should go faster than 60 seconds, so some  
optimization (ie caching, db table indexing, improving queries to  
reduce database round-trips, etc) might be needed. The other  
alternative would be to increase the transaction timeout (either the  
default one, or the timeout for that specific service).

-David


On Nov 8, 2006, at 6:45 AM, Iain Fogg wrote:

> Jacopo,
>
> I was testing the reception of a large(ish) purchase order and  
> could consistently get receiveInventoryProduct to raise an  
> exception, although with no useful diagnostics about what might be  
> causing the problem.
>
> Whenever I try to receive a shipment with several hundred items  
> this would occur. However, if I received the order in "chunks" of  
> 20-30 items everything worked fine. This points to a dynamic  
> runtime error rather than a program logic error, but the logs don't  
> really give an idea of what might be causing it.
>
> Are there known problems with receiveInventoryProduct for big  
> orders? I couldn't see anything on jira...
>
> Cheers, Iain
>
> Jacopo Cappellato wrote:
>> Hi Scott,
>>
>> have a look at the receiveInventoryProduct minilang method in:
>>
>> applications\product\script\org\ofbiz\shipment\receipt
>> \ShipmentReceiptServices.xml
>>
>> you'll find an example of the <loop> operation
>>
>> Jacopo
>>
>>
>> Scott Gray wrote:
>>> Hi All
>>>
>>> I can't seem to find anything among the minilang tags that is  
>>> equivalent to a while loop in java, can anybody point me in the  
>>> right direction or let me know if there isn't anything?
>>>
>>> Thanks
>>> Scott
>>
>>
>>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.13.32/523 - Release Date:  
> 7/11/2006
>