package
BusinessRules
#list any import
classes here.
import com.drools.test.StockOffer;
#declare any global
variables here
function void
printStock( StockOffer stock ) {
#function content (can
have multiple functions)
System.out.println("Name:
"
+
stock.getStockName()
+ " Price: "
+ stock.getStockPrice()
+ " BUY: "
+ stock.getRecommendPurchase());
}
rule "Stock Price
Low Enough"
when
#conditions
offer :
StockOffer(recommendPurchase == null, stockPrice < 100)
then
#actions
offer.setRecommendPurchase( StockOffer.YES
);
printStock( offer
);
end
Results
in:
Description Resource Path Location Type
Missing
package name for rule
package. BusinessRules.drl DroolsStockSample/src/rules Unknown Drools
Error
Yet the test application runs fine!
/steve
Stephen R. Alpert, PhD
GE Healthcare
Clinical Business Solutions
Principal Technical
Architect
T 617 519 2216
F 617 519 2625
www.gehealthcare.com