rule "OverrideInput_AC_TYP_RE"
salience 2
when
$new: java.lang.String() from entry-point "in_AC_TYP_RE"
$old: AC_TYP_RE( value != $new )
then
System.out.println(" Overriding previous values " + $old + " because
of
" + $new );
retract( $old );
end
// Display Name : null
declare HDCAP_RATE_RE extends DataField
@role(event)
@Traitable
value : java.lang.String @key @position(1)
displayValue : String = "HDCAP_RATE_RE"
weight : double = 1.0
end
rule "Valid_Values_HDCAP_RATE_RE"
no-loop
salience 9999
when
$in : HDCAP_RATE_RE( $val : value, valid == false,
value == "0" || value == "1"
)
then
System.out.println("--- Invalid -> valid " + $in);
modify ( $in ) {
setValid( true );
}
end
rule "Input_HDCAP_RATE_RE"
when
$in : java.lang.String() from entry-point "in_HDCAP_RATE_RE"
not HDCAP_RATE_RE( value == $in, context == null )
then
// java.lang.String
HDCAP_RATE_RE input = new HDCAP_RATE_RE();
input.setValue( $in );
input.setName("HDCAP_RATE_RE");
input.setMissing(false);
input.setValid(false);
input.setContext(null);
System.out.println("Rule " + drools.getRule().getName() + " for input
"
+ $in + " : will insert " + input.toString());
retract( $in );
insert( input );
end
rule "OverrideInput_HDCAP_RATE_RE"
salience 2
when
$new: java.lang.String() from entry-point "in_HDCAP_RATE_RE"
$old: HDCAP_RATE_RE( value != $new )
then
System.out.println(" Overriding previous values " + $old + " because
of
" + $new );
retract( $old );
end
// Display Name : null
declare COV_CD_RE extends DataField
@role(event)
@Traitable
value : java.lang.String @key @position(1)
displayValue : String = "COV_CD_RE"
weight : double = 1.0
end
rule "Valid_Values_COV_CD_RE"
no-loop
salience 9999
when
$in : COV_CD_RE( $val : value, valid == false,
value == "group0" || value == "group1" || value ==
"group2"
|| value == "group3"
)
then
System.out.println("--- Invalid -> valid " + $in);
modify ( $in ) {
setValid( true );
}
end
rule "Input_COV_CD_RE"
when
$in : java.lang.String() from entry-point "in_COV_CD_RE"
not COV_CD_RE( value == $in, context == null )
then
// java.lang.String
COV_CD_RE input = new COV_CD_RE();
input.setValue( $in );
input.setName("COV_CD_RE");
input.setMissing(false);
input.setValid(false);
input.setContext(null);
System.out.println("Rule " + drools.getRule().getName() + " for input
"
+ $in + " : will insert " + input.toString());
retract( $in );
insert( input );
end
--
View this message in context:
http://drools.46999.n3.nabble.com/PMML-Exception-excuting-consequence-for...
Sent from the Drools: User forum mailing list archive at
Nabble.com.