apache / incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
http://www.drools.org
Apache License 2.0
5.88k stars 2.5k forks source link

[new-parser] OOPath not supported as a LHS pattern #5878

Closed yurloc closed 6 months ago

yurloc commented 6 months ago

Parent issue

Failing tests

Notes

Rule code snippet

rule PlainNot when
    not( /strings [ this == "It Does Work" ] )
then
    strings.add("It Does Work");
end

Error output

### parse : ANTLR4_PARSER_ENABLED = true
13:16:15.451 [main] ERROR o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:280 - Unable to build KieBaseModel:defaultKieBase
InvalidExpressionErrorResult: Unable to find class: not

org.kie.api.builder.CompilationErrorsException: Unable to create KieModule, Errors Existed: [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=/var/home/jlocker/src/github.com/kiegroup/drools/drools-ruleunits/drools-ruleunits-impl/target/test-classes/org/drools/ruleunits/impl/NotTestUnit.drl, line=-1, column=0
   text=Unable to find class: not]]

    at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:526)
    at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:512)
    at org.drools.ruleunits.impl.RuleUnitProviderImpl.createRuleUnitKieModule(RuleUnitProviderImpl.java:118)
    at org.drools.ruleunits.impl.RuleUnitProviderImpl.generateRuleUnit(RuleUnitProviderImpl.java:86)
    at org.drools.ruleunits.impl.RuleUnitProviderImpl.getRuleUnit(RuleUnitProviderImpl.java:81)
    at org.drools.ruleunits.api.RuleUnitProvider.createRuleUnitInstance(RuleUnitProvider.java:44)
    at org.drools.ruleunits.impl.RuleUnitProviderImplTest.notWithAndWithoutSingleQuote(RuleUnitProviderImplTest.java:63)
yurloc commented 6 months ago

/take