Hi Skip:
If you don't want to use Groovy, then do not change your file name
extensions from .bsh to .groovy. Everything should work just like it did
before without ever changing anything.
If you want to move to using Groovy, you can upgrade gradually. I ended
up converting a few files at a time.
Good Luck
Ruth
On 4/24/13 12:19 PM, Skip wrote:
Thanks Ruth and Adrian.
A final question, do I have to rename .bsh to .groovy. Not hard to do that,
but several thousand references in .xml files will take some time. I ask
this because I see that a beanshell container is still there.
Skip
-----Original Message-----
From: Ruth Hoffman [mailto:[email protected]]
Sent: Wednesday, April 24, 2013 6:39 AM
To: [email protected]
Subject: Re: Upgrading to 12.x
Hi Skip:
Having gone through this exercise several times, here is my opinion
about what to do:
On 4/23/13 6:05 PM, Skip wrote:
I am upgrading from Ofbiz 9.x to 12.x. I have two questions
1. Do I HAVE to change all all my bsh to groovy. I know how to do it.
Its
just that I have a thousand or so bsh scripts and would like to do them
later.
No. I resisted this change for a long time. I preferred the error
messages returned by the BeanShell as - many times - they were more
instructive then those now returned by the Groovy implementation. Turns
out, in almost all cases all you need to do is change the name of the
file to have a .groovy extension. Of course, every place you reference
it, you have to change that name as well.
2. Some time before 10.04.02, many GenericDelegator functions have been
removed. These include several flavors of findByAnd,
FindListIteratorByCondition, etc. Can someone tell me where they were
deprecated at to I can look at the comments as to which functions to use
as
replacements?
What you have to change is GenericDelegator to Delegator in your code.
The findByAnd and FindListIteratorByCondition methods are still
supported. In fact, I see many uses of findByAnd in 12.x Freemarker
templates - of all places. (Probably because it is easier to use then
the "replacement" findList method.)
So, there are really 2 things going on here - one of which you will need
to address to upgrade:
- Change the GenericDelegator to Delegator
- (Optionally) change findByAnd... to "findList" and
FindListIteratorByCondition to "find"
Checkout the OFBiz Javadocs if you need more info on how to use the
delegator.findList and delegator.find methods:
http://ci.apache.org/projects/ofbiz/site/javadocs
Hope that helps.
Ruth
Thanks
Skip