Unable to set date format by on RHDM using -Ddrools.dateformat=yyyy-MM-dd
Issue
I 'm trying to change date format in rules by starting EAP with -Ddrools.dateformat=yyyy-MM-dd. But the following logs are still shown during startup,
2019-06-04 10:18:37,948 INFO [org.guvnor.common.services.backend.config.DefaultApplicationPreferencesLoader] (MSC service thread 1-5) Setting preference 'drools.dateformat' to 'dd-MMM-yyyy'.
and build of rules fails like the following
2019-06-04 10:19:00,556 ERROR [org.drools.compiler.kie.builder.impl.KieProject] (EJB default - 1) Unable to build KieBaseModel:DefaultKieBase
Unable to Analyse Expression date < "1-May-2019":
[Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String]
[Near : {... date < "1-May-2019" ....}]
^ : [Rule name='Rule']
Wrong date-effective value: Invalid date input format: [1-May-2019] it should follow: [yyyy-MM-dd] : [Rule name='Rule1']
What is a correct way to change drools.dateformat?
Environment
- Red Hat Decision Manager (RHDM)
- 7.0.x
- 7.1.x
- Red Hat Process Automation Manager (RHPAM)
- 7.0.x
- 7.1.x
- Decision Central (decision-central.war) or Business central(business-central.war) is deployed.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.