Hi All,
I have used drools-jbrms.war and drools-guvnor.war.
I facing a Problem in both.
I have a package called Rating which has
the following source.
‘Rule
1’ is Business-Rule; ‘Rule
2’ is a Technical-Rule(DRL).
--------------------------------------------------------------------------------------------------------
package rating
import com.esspl.ic.dom.CallDetail;
import com.esspl.ic.dom.ICConstants;
import com.esspl.ic.dom.RateDetail;
import java.util.Map;
import java.lang.String;
global Map rateCache;
rule "Rule 1"
dialect
"mvel"
when
cd
: CallDetail( callType == "VOICE" )
then
cd.setRate(
cd.getCallDuration() * ((RateDetail)
rateCache.get("VOICE")).getRate() );
end
rule "Rule 2"
when
cd
: CallDetail( callType == “SMS”)
then
cd.setRate(cd.getCallDuration()
* ((RateDetail) rateCache.get("SMS")).getRate() );
End
---------------------------------------------------------------------------------------------------------
Rule 2 Compiles fine but Rule 1 does
not.
It seems there is a Problem in compiling
a BusinessRule. The Business Rule Compiler doesn’t support Typecasting. Whereas
the Technical rule compiler supports type casting.
I have to make all my rules as Business
Rules. But it doesn’t get compiled.
Can anyone help me get rid of this
problem.
Thanks in Advance,
Vinoth