[JBoss JIRA] Created: (JBRULES-2834) TimerAndCalendarTest will fail 4 tests on non english environments
by Burkhard Vogel (JIRA)
TimerAndCalendarTest will fail 4 tests on non english environments
------------------------------------------------------------------
Key: JBRULES-2834
URL: https://issues.jboss.org/browse/JBRULES-2834
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.M1
Environment: Windows XP 32bit *ESP*, JDK 1.6.0_21
Reporter: Burkhard Vogel
Assignee: Mark Proctor
Priority: Minor
When running the mvn install target on a non English system the following test will fail
- testCalendarsWithIntervalsAndStartAndEnd
- testCalendarsWithIntervalsAndStartAndLimit
- testCalendarsWithCronAndStartAndEnd
- testCalendarsWithCronAndStartAndLimit
All these use dates like 03-JAN-2010 in the internal rule definition with will not work in countries where there does not exist a month starting with JAN, for instance in Spanish that would be ENE (from enero) and the test result spills out a date format exception.
These can be alleviated by running the command with two parameters (-Ddrools.defaultcountry=US -Ddrools.defaultlanguage=en) but still the attached patch has to be applied for four other language specific dates within the test code.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (JBRULES-3281) Drools Expert User Guide > The Basics, various edits
by Dr Alt (Created) (JIRA)
Drools Expert User Guide > The Basics, various edits
----------------------------------------------------
Key: JBRULES-3281
URL: https://issues.jboss.org/browse/JBRULES-3281
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-docs-expert
Affects Versions: 5.3.0.Final
Reporter: Dr Alt
Assignee: Mark Proctor
Starting at http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_...
*Stateless Knowledge Session*
Application pseudo code is missing method names:
(!) The following should read {{application.isValid()}} in both occurrences (assertTrue(..) and assertFalse(..)), instead of {{application()}}
{quote}
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
Applicant applicant = new Applicant( "Mr John Smith", 16 );
Application application = new Application();
assertTrue( application.isValid() );
ksession.execute( Arrays.asList( new Object[] \{ application, applicant } ) );
assertFalse( application.isValid() );
{quote}
*Stateful Knowledge Session*
(!) Example code shows "public -classs- Sprinkler" should be "public +class+ Sprinkler".
(!) The sentence after that, "the concepts of inserting and matching against data -was- introduced" should read "+were+"
(!) The fire alarm sample Java code has errors. "builder.getErrors()" should be "kbuilder.getErrors()" and kbase should be initialized before kbase.addKnowledgePackages as:
{{KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();}}
(!) {{ksession.fireAllRules()}} requires a semi-colon.
(!) After retracting the two fire facts, the output should be:
{quote}
Cancel the alarm
Turn +off+ the sprinkler for room office
Turn +off+ the sprinkler for room kitchen
Everything is ok
{quote}
(Eventually, I'll learn how to make these changes myself and request git pulls.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (JBRULES-3444) Overriding the default locale for DRL date parsing should be possible: PackageBuilder.dateFormats should be settable
by Geoffrey De Smet (JIRA)
Geoffrey De Smet created JBRULES-3444:
-----------------------------------------
Summary: Overriding the default locale for DRL date parsing should be possible: PackageBuilder.dateFormats should be settable
Key: JBRULES-3444
URL: https://issues.jboss.org/browse/JBRULES-3444
Project: Drools
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: drools-core (fusion)
Reporter: Geoffrey De Smet
Assignee: Edson Tirelli
The PackageBuilder has a field dateFormats that stores the dateformatter used to parse dates in a DRL.
However it's impossible to modify that. It always parses the DRL with the default locale.
So, if you write a DRL on a UK server and let it compile on TH client, it will fail because it cannot parse 1-JAN-2012.
Here's the code that doesn't support changing the dateFormat:
{code}
public PackageBuilder( Package pkg,
PackageBuilderConfiguration configuration ) {
this.dateFormats = null;//(DateFormats) this.environment.get( EnvironmentName.DATE_FORMATS );
if (this.dateFormats == null) {
this.dateFormats = new DateFormatsImpl();
//this.environment.set( EnvironmentName.DATE_FORMATS , this.dateFormats );
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (JBRULES-3366) When adding resources using both MVEL and Java dialects the JavaDialect constructor fails when dialectData is found and stored.
by Alan Zall (JIRA)
Alan Zall created JBRULES-3366:
----------------------------------
Summary: When adding resources using both MVEL and Java dialects the JavaDialect constructor fails when dialectData is found and stored.
Key: JBRULES-3366
URL: https://issues.jboss.org/browse/JBRULES-3366
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.3.1.Final
Environment: Linux
Reporter: Alan Zall
Assignee: Mark Proctor
In the constructor of JavaDialect, if pkg.getDialectRuntimeRegistry().getDialectData( ID ) returns a non null value, then a null is passed into the PackageStore constructor.
if ( pkg.getDialectRuntimeRegistry().getDialectData( ID ) == null ) {
data = new JavaDialectRuntimeData();
this.pkg.getDialectRuntimeRegistry().setDialectData( ID,
data );
data.onAdd( this.pkg.getDialectRuntimeRegistry(),
this.packageBuilder.getRootClassLoader() );
}
this.packageStoreWrapper = new PackageStore( data,
this.results );
is fixed by:
if (( data = (JavaDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( ID )) == null ) {
data = new JavaDialectRuntimeData();
this.pkg.getDialectRuntimeRegistry().setDialectData( ID,
data );
data.onAdd( this.pkg.getDialectRuntimeRegistry(),
this.packageBuilder.getRootClassLoader() );
}
this.packageStoreWrapper = new PackageStore( data, this.results );
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months