Description of problem: Saving this rule in workbench: rule 'Dummy rule' //dialect 'mvel' when a : Applicant() then System.out.println(a); end triggers incremental build, which results with following error: 13:47:12,285 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (pool-15-thread-4) Unable to build KieBaseModel:defaultKieBase Rule Compilation error : [Rule name='Dummy rule'] defaultpkg/Rule_Dummy_rule307182425.java (6:243) : Applicant cannot be resolved to a type If you uncomment dialect option and save the rule the build will succeed. If you remove content of RHS the build will succeed too. What about the error message? It doesn't help at all. Could that be improved? Version-Release number of selected component (if applicable): CR1 (community) How reproducible: always Steps to Reproduce: 1. open Dummy rule in mortgages project 2. replace the content with rule in Description 3. save the rule and wait until incremental build finishes Actual results: Applicant cannot be resolved to a type Expected results: No error or better explanation if the rule is really invalid. Additional info:
Mario, lets talk about this one and try to solve it ourselves, asking Michael if we need any guidance.
If a class has no package, it can't be imported. On data modeler, we just have to force all classes to have a package. It's no longer possible to define a POJO in the default package. The mortgate example in the uf-playground repo needs to be updated with this as well.
I just enforced this constraint on the KieBuilder https://github.com/droolsjbpm/drools/commit/b9ff47c815714d2c5b1840b8e9a4ccaf2a3d3e24 Now if you try to compile a java class with no package declaration it will raise a compilation error.
Data modeler objects creation was modified in order to prevent the creation of data objects without package. master branch: http://github.com/droolsjbpm/kie-wb-common/commit/569c667bb 6.0.x branch: http://github.com/droolsjbpm/kie-wb-common/commit/1ced2efe7
Fixed in ER4.