这个问题已经解决,但是主类规则正在解决。但是drl文件没有形成。
package com.sample;
import com.model.example.Product.*;
expander product.dsl
rule "success"
when
There is a Product that
-has price greater than 100
-has quantity less than 2
-has category equal to 'grocery'
then
success
end
我在我创建了dsl和dslr文件的maven项目中遇到异常“无法解析ObjectType'Product'”。
rule "failure"
when
There is a Product that
-has price less than 100
-has quantity greater than 2
-has category equal to 'medicine'
then
fail
end
答案 0 :(得分:1)
DRL import语句与Java一样。因此,导入后跟完整的类名:
import com.model.example.Product;