[rules-users] PMML - Exception excuting consequence for rule xxx in yyy: java.lang.NullPointerException : using KnowledgeAgent
smilk
sunghee.bae at meritz.co.kr
Wed Jul 17 20:40:38 EDT 2013
// Display Name : null
declare Predicted_CHK_YN extends OutputField
@role(event)
@Traitable
value : java.lang.String @key @position(1)
displayValue : String = "Predicted_CHK_YN"
weight : double = 1.0
tgtValue : java.lang.String
end
rule "update_Predicted_CHK_YN_RPart_Model"
salience 2000
when
$new : Predicted_CHK_YN( $ctx : context == "RPart_Model" )
$old : Predicted_CHK_YN( context == $ctx, this before $new )
then
System.out.println(">>>>>>>>>>>>>> NEED TO KILL " + $old);
retract( $old );
end
rule "simpleOutput_CHK_YN_to_Predicted_CHK_YN"
salience -110
when
$src : CHK_YN( $m : missing, $v : valid == true, $val : value, $ctx :
context, $wgt : weight
, context == "RPart_Model"
)
not CHK_YN( missing == false, valid == true, this != $src, weight > $wgt
)
then
System.out.println("Cloning output " + $src );
Predicted_CHK_YN x = new Predicted_CHK_YN();
x.setValue( $val );
x.setMissing( $m );
x.setValid( $v );
x.setName( "Predicted_CHK_YN" );
x.setContext( $ctx );
x.setWeight( $wgt );
insertLogical( x );
end
//rule "Clear Output_RPart_Model_Predicted_CHK_YN"
//salience -110
//when
// not ModelMarker( enabled == true, modelName == "RPart_Model" )
// $x : Predicted_CHK_YN( context == "RPart_Model")
//then
// retract( $x );
//end
//
query "Predicted_CHK_YN" ( String ctx, java.lang.String $result )
Predicted_CHK_YN( context == ctx , $result := value )
end
query "Probability_N" ( String ctx, Double $result )
Probability_N( context == ctx , $result := value )
end
query "Probability_Y" ( String ctx, Double $result )
Probability_Y( context == ctx , $result := value )
end
rule "miningField_RPart_Model_AC_COT_DAY"
when
$src : AC_COT_DAY( $m : missing, $v : valid, $x : value, context == null
)
then
System.out.println("miningField_RPart_Model_AC_COT_DAY");
AC_COT_DAY x = new AC_COT_DAY();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("AC_COT_DAY");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_AGE_GRD"
when
$src : AGE_GRD( $m : missing, $v : valid, $x : value, context == null )
then
System.out.println("miningField_RPart_Model_AGE_GRD");
AGE_GRD x = new AGE_GRD();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("AGE_GRD");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_FDS_AC_YN"
when
$src : FDS_AC_YN( $m : missing, $v : valid, $x : value, context == null
)
then
System.out.println("miningField_RPart_Model_FDS_AC_YN");
FDS_AC_YN x = new FDS_AC_YN();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("FDS_AC_YN");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_AC_STAT_CD_RE"
when
$src : AC_STAT_CD_RE( $m : missing, $v : valid, $x : value, context ==
null )
then
System.out.println("miningField_RPart_Model_AC_STAT_CD_RE");
AC_STAT_CD_RE x = new AC_STAT_CD_RE();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("AC_STAT_CD_RE");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_HDCAP_RATE_RE"
when
$src : HDCAP_RATE_RE( $m : missing, $v : valid, $x : value, context ==
null )
then
System.out.println("miningField_RPart_Model_HDCAP_RATE_RE");
HDCAP_RATE_RE x = new HDCAP_RATE_RE();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("HDCAP_RATE_RE");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_COV_CD_RE"
when
$src : COV_CD_RE( $m : missing, $v : valid, $x : value, context == null
)
then
System.out.println("miningField_RPart_Model_COV_CD_RE");
COV_CD_RE x = new COV_CD_RE();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("COV_CD_RE");
x.setContext("RPart_Model");
insertLogical(x);
end
rule "miningField_RPart_Model_AC_TYP_RE"
when
$src : AC_TYP_RE( $m : missing, $v : valid, $x : value, context == null
)
then
System.out.println("miningField_RPart_Model_AC_TYP_RE");
AC_TYP_RE x = new AC_TYP_RE();
x.setValue($x);
x.setMissing($m);
x.setValid($v);
x.setName("AC_TYP_RE");
x.setContext("RPart_Model");
insertLogical(x);
end
--
View this message in context: http://drools.46999.n3.nabble.com/PMML-Exception-excuting-consequence-for-rule-xxx-in-yyy-java-lang-NullPointerException-using-Knowledt-tp4024963p4024998.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list