[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:58:07 EDT 2013


rule "Eval Tree Node RPart_Model - 25 - Default Child"
salience 3
when
    $node : TreeNode( context == "RPart_Model", $id : id == "25", $def :
defaultChld != "null" && != null )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "25",
visitMode == "DEFAULT_CHILD", downward == true,
                                 results.keySet not contains "25", $conf :
confidence,
                                 ( mAC_STAT_CD_RE == true  ) )
then
    System.out.println( "UNKNOWN found at 25 !!!!, JUMPING TO Default Child
" + $def );
    modify ( $tok ) {
        setConfidence( $conf * 1.0 ),
        setCurrent( $def );
    }
end


rule "Eval Tree Node RPart_Model - 25 - Default Child Undo Jump"
salience 5
no-loop
when
    $node : TreeNode( context == "RPart_Model", $id : id == "25", $def :
defaultChld != "null" && != null )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "25",
visitMode == "DEFAULT_CHILD", downward == false, $conf : confidence,
                                 ( mAC_STAT_CD_RE == true  ) )
then
    System.out.println( "UNKNOWN found at 25 !!!!, UNDOING JUMP penalty " +
$def );
    modify ( $tok ) {
        setConfidence( $conf / 1.0 );
    }
end


rule "Eval Tree Node RPart_Model - 24 - Down"
salience $children.size() - $children.indexOf( $child )

when
    $node : TreeNode( context == "RPart_Model", $id : id == "24", $children
: children, children.size > 0 )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "24",
$trail : trail,
                                 ( ( mAC_STAT_CD_RE == false &&
vAC_STAT_CD_RE in ( "group0" ) ) ) || ( visitMode == "AGGREGATE_NODES" && (
( mAC_STAT_CD_RE == true  ) ) ) )
    $child : String( this not memberOf $trail ) from $children
then
    System.out.println( "Visiting node 24, going down to " + $child );
    modify ( $tok ) {
        getTrail().add( $child ),
        setDownward( true ),
        setCurrent( $child );
    }
end


rule "Eval Tree Node RPart_Model - 24 - True"
salience 3
no-loop
when
    $node : TreeNode( context == "RPart_Model", $id : id == "24", $out :
outcome,
                      children.size == 0, $conf : confidence, $tot :
recordCount )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "24",
$baseConf : confidence,
                                 $res : results, results.keySet not contains
"24",
                                 visitMode != "AGGREGATE_NODES",
                                 ( mAC_STAT_CD_RE == false && vAC_STAT_CD_RE
in ( "group0" ) )
                               )
then
    System.out.println( "TRUE Solution found at 24 !!!! " );
    modify( $tok ) {
       setConfidence( $baseConf * ( $conf.containsKey( $out ) ? (Double)
$conf.get( $out ) : 1.0 ) ),
       setTotalCount( $tot ),
       setOutcome( $out ),
       setCurrent( "null" );
    }
end


rule "Eval Tree Node RPart_Model - 24 - Unknown Weighted"
salience 3
when
    $node : TreeNode( context == "RPart_Model", $id : id == "24", $out :
outcome )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "24",
                                 visitMode == "WEIGHTED_CONFIDENCE" || ==
"LAST_PREDICTION" || == "NULL_PREDICTION",
                                 results.keySet not contains "24",
                                 ( mAC_STAT_CD_RE == true  ) )
then
    System.out.println( "UNKNOWN found at 24, collecting for later
evaluation !!!! " );
    modify ( $tok ) { getResults().put( "24", $out ); }
end


rule "Eval Tree Node RPart_Model - 24 - Default Child"
salience 3
when
    $node : TreeNode( context == "RPart_Model", $id : id == "24", $def :
defaultChld != "null" && != null )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "24",
visitMode == "DEFAULT_CHILD", downward == true,
                                 results.keySet not contains "24", $conf :
confidence,
                                 ( mAC_STAT_CD_RE == true  ) )
then
    System.out.println( "UNKNOWN found at 24 !!!!, JUMPING TO Default Child
" + $def );
    modify ( $tok ) {
        setConfidence( $conf * 1.0 ),
        setCurrent( $def );
    }
end


rule "Eval Tree Node RPart_Model - 24 - Default Child Undo Jump"
salience 5
no-loop
when
    $node : TreeNode( context == "RPart_Model", $id : id == "24", $def :
defaultChld != "null" && != null )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "24",
visitMode == "DEFAULT_CHILD", downward == false, $conf : confidence,
                                 ( mAC_STAT_CD_RE == true  ) )
then
    System.out.println( "UNKNOWN found at 24 !!!!, UNDOING JUMP penalty " +
$def );
    modify ( $tok ) {
        setConfidence( $conf / 1.0 );
    }
end


rule "Eval Tree Node RPart_Model - 2 - Down"
salience $children.size() - $children.indexOf( $child )

when
    $node : TreeNode( context == "RPart_Model", $id : id == "2", $children :
children, children.size > 0 )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "2",
$trail : trail,
                                 ( ( mAC_CSE_TYP_RE == false &&
vAC_CSE_TYP_RE in ( "group0" ) ) || ( ( mAC_STAT_CD_RE == true  ) && ( (
mAC_STAT_CD_RE == false && vAC_STAT_CD_RE in ( "group0", "group1", "group2",
"group3" ) ) ) ) ) || ( visitMode == "AGGREGATE_NODES" && ( ( (
mAC_STAT_CD_RE == true  ) ) || ( ( mAC_CSE_TYP_RE == true  ) ) ) ) )
    $child : String( this not memberOf $trail ) from $children
then
    System.out.println( "Visiting node 2, going down to " + $child );
    modify ( $tok ) {
        getTrail().add( $child ),
        setDownward( true ),
        setCurrent( $child );
    }
end


rule "Eval Tree Node RPart_Model - 2 - True"
salience 3
no-loop
when
    $node : TreeNode( context == "RPart_Model", $id : id == "2", $out :
outcome,
                      children.size == 0, $conf : confidence, $tot :
recordCount )
    $tok  : RPart_ModelTreeToken( context == "RPart_Model", current == "2",
$baseConf : confidence,
                                 $res : results, results.keySet not contains
"2",
                                 visitMode != "AGGREGATE_NODES",
                                 ( mAC_CSE_TYP_RE == false && vAC_CSE_TYP_RE
in ( "group0" ) ) || ( ( mAC_STAT_CD_RE == true  ) && ( ( mAC_STAT_CD_RE ==
false && vAC_STAT_CD_RE in ( "group0", "group1", "group2", "group3" ) ) ) )
                               )
then
    System.out.println( "TRUE Solution found at 2 !!!! " );
    modify( $tok ) {
       setConfidence( $baseConf * ( $conf.containsKey( $out ) ? (Double)
$conf.get( $out ) : 1.0 ) ),
       setTotalCount( $tot ),
       setOutcome( $out ),
       setCurrent( "null" );
    }
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-tp4024963p4025012.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list