Class KiePMMLSimplePredicateWithResultASTFactory


  • public class KiePMMLSimplePredicateWithResultASTFactory
    extends Object
    Class used to generate KiePMMLDroolsRule out of a SimplePredicate
    • Constructor Detail

      • KiePMMLSimplePredicateWithResultASTFactory

        public KiePMMLSimplePredicateWithResultASTFactory()
    • Method Detail

      • declareRuleFromSimplePredicate

        public static void declareRuleFromSimplePredicate​(KiePMMLDroolsRule.Builder builder,
                                                          List<KiePMMLDroolsRule> rules,
                                                          Object result,
                                                          boolean isFinalLeaf)
        This method will create a rule that, in the RHS, 1) update the status (used for flowing between rules) 2) add outputfields to result variables 3) eventually (if isFinalLeaf == true) set the final result and the result code to OK

        Example of generated rule with isFinalLeaf == true rule "_classRootNode_classOrAndNestedNode" when $statusHolder : KiePMMLStatusHolder( status == "_classRootNode" ) ( INPUT1( value < -5.0 ) or

        INPUT2( value < -5.0 && value > -10.0 ) ) then

        $statusHolder.setStatus("DONE"); update($statusHolder); $pmml4Result.setResultCode("OK"); $pmml4Result.addResultVariable($pmml4Result.getResultObjectName(), "classOrAndNestedNode");

        end

        Parameters:
        builder -
        rules -
        result -
        isFinalLeaf -