2017-04-25 4 views
0

この問題は解決しましたが、メインクラスのルールでは発生しています。しかし、drlファイルは形成されていません。例外 "ObjectType 'Product'を解決できません"

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 『製品』を解決することができません」の例外を取得しています。

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

DRLインポートステートメントは、Javaの場合と同じように機能します。したがって、インポート後にフルクラス名:

import com.model.example.Product; 
関連する問題