Class KiePMMLDroolsRule


  • public class KiePMMLDroolsRule
    extends Object
    Data-class used to store information needed to generate a Drools rule
    • Method Detail

      • builder

        public static KiePMMLDroolsRule.Builder builder​(String name,
                                                        String statusToSet,
                                                        List<org.dmg.pmml.OutputField> outputFields)
        Parameters:
        name - The rule name
        statusToSet - The status to set in the rhs' default then; e.g.:

        then

        $statusHolder.setStatus(statusToSet);

        update($statusHolder);

        If there is a break statement in the lhs, then the statusToSet will be applied differently if the node is a final/leaf or not.

        If the node is a final/leaf, the statusToSet will be applied in the default then directive, while in the default then[match] it will be set as "DONE"

        ; e.g.:

        then

        $statusHolder.setStatus(statusToSet);

        update($statusHolder);

        then[match]

        $statusHolder.setStatus("DONE");

        update($statusHolder);

        If the node is a not final/leaf, the statusToSet will be set in the then[match] directive, while in the default then it will be set as "DONE"

        ; e.g.:

        then

        $statusHolder.setStatus("DONE");

        update($statusHolder);

        then[match]

        $statusHolder.setStatus(statusToSet);

        update($statusHolder);

        Returns:
      • getName

        public String getName()
      • getStatusToSet

        public String getStatusToSet()
        The status to set in the rhs ($statusHolder.setStatus("DONE"); update($statusHolder);)
        Returns:
      • getOutputFields

        public List<org.dmg.pmml.OutputField> getOutputFields()
      • getAgendaGroup

        public String getAgendaGroup()
      • getActivationGroup

        public String getActivationGroup()
      • getFocusedAgendaGroup

        public String getFocusedAgendaGroup()
      • getStatusConstraint

        public String getStatusConstraint()
      • getIfBreakField

        public String getIfBreakField()
      • getIfBreakOperator

        public String getIfBreakOperator()
      • getIfBreakValue

        public Object getIfBreakValue()
      • getResultCode

        public org.kie.pmml.api.enums.ResultCode getResultCode()
      • getResult

        public Object getResult()
      • getToAccumulate

        public Double getToAccumulate()
        The accumulation to set in the rhs ($statusHolder.accumulate(_toAccumulate_);
        Returns:
      • isAccumulationResult

        public boolean isAccumulationResult()
        It true, set the overall accumulation as final result
        Returns: