Class KiePMMLSimplePredicateWithAccumulationASTFactory


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

      • KiePMMLSimplePredicateWithAccumulationASTFactory

        public KiePMMLSimplePredicateWithAccumulationASTFactory()
    • Method Detail

      • declareRuleFromSimplePredicate

        public static void declareRuleFromSimplePredicate​(KiePMMLDroolsRule.Builder builder,
                                                          List<KiePMMLDroolsRule> rules,
                                                          boolean isLastCharacteristic)
        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 set the value to accumulate

        rule "_ResidenceStateScore_1" when $statusHolder : KiePMMLStatusHolder( status == "_ResidenceStateScore" )

        RESIDENCESTATE( value == "KN" ) then

        $statusHolder.setStatus("_ResidenceStateScore_1"); $statusHolder.accumulate("10.0"); update($statusHolder);

        end

        end

        Parameters:
        builder -
        rules -
        isLastCharacteristic -