use of org.drools.verifier.components.Consequence in project drools by kiegroup.
the class RuleDescrVisitor method visitRuleDescr.
public void visitRuleDescr(RuleDescr descr) throws UnknownDescriptionException {
rule = new VerifierRule(descr, rulePackage, descr.getNamedConsequences());
rule.setName(descr.getName());
for (AttributeDescr attribute : descr.getAttributes().values()) {
rule.getAttributes().put(attribute.getName(), attribute.getValue());
}
Consequence consequence = visitConsequence(rule, descr.getConsequence());
for (String name : descr.getNamedConsequences().keySet()) {
visitNamedConsequence(name, descr.getNamedConsequences().get(name));
}
// TODO: NEEDS TO BE FIXED
// rule.getMetadata().putAll( descr.get );
rule.setConsequencePath(consequence.getPath());
rule.setConsequenceType(consequence.getConsequenceType());
rule.setLineNumber(descr.getLine());
data.add(rule);
rulePackage.getRules().add(rule);
solvers.startRuleSolver(rule);
visitAndDescr(descr.getLhs());
solvers.endRuleSolver();
addSubItems();
}
Aggregations