When you create a GenericValue with groovy, you need to initial it with makeValue and after set all fields.
***
GenericValue product = makeValue('Product')
product.internalName = parameters.internalName
***
I simplified this dsl with an automatic parameters check so you can directly write :
***
GenericValue product = makeValue('Product', parameters)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816437 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
While reviewing r1812057 I spotted a bunch of swallowed ClassCastExceptions
I then reviewed all ClassCastExceptions and this fixes all of them with a
minimal logging
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1815797 13f79535-47bb-0310-9956-ffa450edef68
While reviewing r1813634, I found that we could use a multi-catch, and while
doing so found that we were missing a CertificateException according to Eclipse
Confirmed by Java:
:compileJava
ofbiz\framework\service\src\main\java\org\apache\ofbiz\service\rmi\socket\ssl\
SSLServerSocketFactory.java:75: error:
unreported exception CertificateException; must be caught or declared to be
thrown
ks.load(fis, passphrase);
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813671 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.service.rmi.socket.ssl.
(OFBIZ-9714)
I modified the patch to keep the previous logic to get the SSL server
socket. The cast should be safe because of the SSLServerSocketFactory
being used to get the socket.
Thanks Dennis Balkir for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813634 13f79535-47bb-0310-9956-ffa450edef68
We have enabled flag in ServiceEcaRule class, if its set false then seca rule will not be executed.
But there is not way to disable seca.
We can add enabled flag in SECA definition to disable the existing seca rule.
Here is the proposal:
- Add new attribute on seca tag named enabled
- Default value will be true for this.
- If user want to disable existing OOTB seca rule, then user can define same rule in custom component and set the enabled=false
Need to do some changes in code to honor the enabled attribute while loading seca rule.
Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812394 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.service.group.
(OFBIZ-9684)
I modified the patch to make ServiceGroupReader#groupsCache private.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811467 13f79535-47bb-0310-9956-ffa450edef68
non technical service semaphore exceptions
(OFBIZ-9400)
GenericServicejob.failed(...) logs a stacktrace on every SemaphoreWait and
SemaphoreFail exception. The patch changes this for the non-technical service
semaphore exceptions to a one liner error logging to avoid polluting the logfile
with stacktraces e.g. in a scenario where a service is scheduled in short
intervals and fails expected while the former one is still running.
jleroux: I agree the case Martin describes must be quite annoying, especially in
production!
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804962 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
No functional change.
We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html :
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent
rounding mode is largely obsolete; the enumeration values of the RoundingMode
enum, (such as RoundingMode.HALF_UP) should be used instead.>>
That's an easy global replacement. But it also needs to import the RoundingMode
class. It was 26 files so I decided to rather clean all the imports in all files
with the help of Eclipse.
This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
dbWrite(...)
(OFBIZ-9401)
In ServiceSemaphore.dbWrite(...) the transaction is suspended without checking
if there is a transaction in place. This results in logging a warning each time
the TransactionUtil.suspend() method is invoked without a current transaction in
place. The given patch cuts this unnecessary logging by checking if there is an
transaction in place to suspend. If a transaction exists - suspend it.
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804940 13f79535-47bb-0310-9956-ffa450edef68
When you want to remove a service we add a new xml element <deprecated/> that you can put on the service definition like this
<service name="oldService" ...>
<deprecated use-instead="newService" since="theReleaseXXX">The reason to move it as deprecated</deprecated>
<implements service="newService"/>
</service>
A deprecated service generate a warning log each time it is called
When you navigate on webtools a deprecated service is strike in the service list and display deprecated reason on the service definition detail page.
Thanks to Scott, Deepak, Taher and Jacques for sharing on this subject
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804786 13f79535-47bb-0310-9956-ffa450edef68
When you call run service with groovy, you need to be sure that all parametes are good for the service call.
This improvement simplify this dsl with an automatic parameters check so you can call directly like that
run service : createProduct, with: context
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802798 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9399)
Removes the redundant logging done in ServiceSemaphore.waitOrFail() since the
error will be logged by the ServiceEngine anyway.
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801380 13f79535-47bb-0310-9956-ffa450edef68
from given freqCount raster.
(OFBIZ-9374)
If a job is scheduled using TemporalExpressions.Frequency the start time of the
job will gradually move forward when the excecution of the job is delayed by one
or more units of the frequency type.
Example: Job is set up to start at 2017-01-01 00:00:00 and run every ten
minutes. One month later due to some circumstances the job starts at
2017-02-01 00:01:01 which results in the next execution to be scheduled at
2017-02-01 01:11:00 in stead of 2017-02-01 01:10:00.
The reason behind this behaviour is the TemporalExpressions.Frequency#prepareCal
function. It has the purpose to jump from the first starting time to the latest
possible execution of the job. But instead it just sets it to the current time
(with the precision of the chosen frequency type) and calculates the next
execution time from this point.
Thanks: Tobias Laufkötter for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1796047 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9161)
At OFBIZ-9159 I added the entity-auto CRUD services for JobSandbox but
w/o permission check.
While working on this issue I decided it's better to have them and decided to
also put them for JobSandbox CRUD services.
So here are the entity-auto CRUD services for RuntimeData and permission check
for JobSandbox CRUD services
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776558 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9158)
Improves after a discussion with Scott and Taher on dev ML
Improved to be called only with IN params, the JavaDoc is also improved to
reflect the changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776447 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9158)
The idea is to use validate() to render a boolean result. I needed that in a
custom project, I think it's worth contributing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776243 13f79535-47bb-0310-9956-ffa450edef68