Package org.drools.compiler.compiler

Examples of org.drools.compiler.compiler.DroolsWarning


            } else if ( name.equals( "agenda-group" ) ) {
                if ( StringUtils.isEmpty(rule.getRuleFlowGroup())) {
                    rule.setAgendaGroup( attributeDescr.getValue() ); // don't override if RFG has already set this
                } else {
                    if ( rule.getRuleFlowGroup().equals( attributeDescr.getValue() ) ) {
                        DroolsWarning warn = new RuleBuildWarning( rule, context.getParentDescr(), null,
                                                                   "Both an agenda-group ( " + attributeDescr.getValue() +
                                                                   " ) and a ruleflow-group ( " + rule.getRuleFlowGroup() +
                                                                   " ) are defined for rule " + rule.getName() + ". Since version 6.x the " +
                                                                   "two concepts have been unified, the ruleflow-group name will override the agenda-group. " );
                        context.addWarning( warn );
                    }
                }
            } else if ( name.equals( "activation-group" ) ) {
                rule.setActivationGroup( attributeDescr.getValue() );
            } else if ( name.equals( "ruleflow-group" ) ) {
                rule.setRuleFlowGroup( attributeDescr.getValue() );
                if ( ! rule.getAgendaGroup().equals( AgendaGroup.MAIN ) && ! rule.getAgendaGroup().equals( attributeDescr.getValue() ) ) {
                    DroolsWarning warn = new RuleBuildWarning( rule, context.getParentDescr(), null,
                                                               "Both an agenda-group ( " + attributeDescr.getValue() +
                                                               " ) and a ruleflow-group ( " + rule.getRuleFlowGroup() +
                                                               " ) are defined for rule " + rule.getName() + ". Since version 6.x the " +
                                                               "two concepts have been unified, the ruleflow-group name will override the agenda-group. " );
                    context.addWarning( warn );
View Full Code Here


            } else if ( name.equals( "agenda-group" ) ) {
                if ( StringUtils.isEmpty(rule.getRuleFlowGroup())) {
                    rule.setAgendaGroup( attributeDescr.getValue() ); // don't override if RFG has already set this
                } else {
                    if ( rule.getRuleFlowGroup().equals( attributeDescr.getValue() ) ) {
                        DroolsWarning warn = new RuleBuildWarning( rule, context.getParentDescr(), null,
                                                                   "Both an agenda-group ( " + attributeDescr.getValue() +
                                                                   " ) and a ruleflow-group ( " + rule.getRuleFlowGroup() +
                                                                   " ) are defined for rule " + rule.getName() + ". Since version 6.x the " +
                                                                   "two concepts have been unified, the ruleflow-group name will override the agenda-group. " );
                        context.addWarning( warn );
                    }
                }
            } else if ( name.equals( "activation-group" ) ) {
                rule.setActivationGroup( attributeDescr.getValue() );
            } else if ( name.equals( "ruleflow-group" ) ) {
                rule.setRuleFlowGroup( attributeDescr.getValue() );
                if ( ! rule.getAgendaGroup().equals( AgendaGroup.MAIN ) && ! rule.getAgendaGroup().equals( attributeDescr.getValue() ) ) {
                    DroolsWarning warn = new RuleBuildWarning( rule, context.getParentDescr(), null,
                                                               "Both an agenda-group ( " + attributeDescr.getValue() +
                                                               " ) and a ruleflow-group ( " + rule.getRuleFlowGroup() +
                                                               " ) are defined for rule " + rule.getName() + ". Since version 6.x the " +
                                                               "two concepts have been unified, the ruleflow-group name will override the agenda-group. " );
                    context.addWarning( warn );
View Full Code Here

TOP

Related Classes of org.drools.compiler.compiler.DroolsWarning

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.