nagarajgond opened a new issue, #6539:
URL: https://github.com/apache/incubator-kie-drools/issues/6539

   ### Description
   
   Below rule throws exception since it has leading zero with DRL10 parser. 
**Same rule works fine with DRL6 parser**.
   
   ```
   package com.test.drl;
   unit PolicyUnit;
   
   rule "rule2"
        salience -110
        when
                result: /results[ this != null ]
                ( /facts [ name == "hour_of_the_day", value < 02 ])
        then
                result.addFiredRule("rule2");
   end
   ```
   
   
   ```
   Exception in thread "main" org.kie.api.builder.CompilationErrorsException: 
Unable to create KieModule, Errors Existed: [Message [id=1, 
kieBase=defaultKieBase, level=ERROR, path=test/drl/rules/rule2.drl, line=8, 
column=0
      text=no viable alternative at input '( /facts [ name == 
"hour_of_the_day", value < 02'], Message [id=2, kieBase=defaultKieBase, 
level=ERROR, path=test/drl/rules/rule2.drl, line=8, column=0
      text=mismatched input '[' expecting {'unit', 'function', 'global', 
'declare', 'trait', 'type', 'rule', 'query', 'when', 'then', 'end', 'and', 
'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 
'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 
'groupby', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 
'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 
'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 
'attributes', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 
'refract', 'direct', 'activation-group', 'ruleflow-group', 'date-effective', 
'date-expires', 'dialect', 'calendars', 'timer', 'duration', '?/', 'abstract', 
'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 
'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 
'final', 'finally', 'float', 'for', 'if', 'goto', 'implements', 'import', 'insta
 nceof', 'int', 'interface', 'long', 'native', 'package', 'private', 
'protected', 'public', 'return', 'short', 'static', 'strictfp', 'super', 
'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'try', 
'void', 'volatile', 'while', 'module', 'open', 'requires', 'exports', 'opens', 
'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 
'sealed', 'permits', 'non-sealed', '(', ';', '?', '/', IDENTIFIER}], Message 
[id=3, kieBase=defaultKieBase, level=ERROR, path=test/drl/rules/rule2.drl, 
line=0, column=0
      text=Parser returned a null Package]]
        at 
org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:559)
        at 
org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:545)
   ```
   
   
   ### Tech stack
   Java 21
   Drools 10.1.0
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to