Package org.drools.analytics.components

Examples of org.drools.analytics.components.VariableRestriction


  private void flatten(VariableRestrictionDescr descr) {
    AnalyticsData data = AnalyticsDataFactory.getAnalyticsData();

    Variable variable = data.getVariableByRuleAndVariableName(currentRule
        .getRuleName(), descr.getIdentifier());
    VariableRestriction restriction = new VariableRestriction();

    restriction.setRuleId(currentRule.getId());
    restriction.setRuleName(currentRule.getRuleName());
    restriction.setPatternId(currentPattern.getId());
    restriction.setPatternIsNot(currentPattern.isPatternNot());
    restriction.setConstraintId(currentConstraint.getId());
    restriction.setFieldId(currentConstraint.getFieldId());
    restriction.setEvaluator(descr.getEvaluator());
    restriction.setVariableId(variable.getId());
    restriction.setVariableName(descr.getIdentifier());

    // Set field value, if it is unset.
    currentField.setFieldType(Field.FieldType.VARIABLE);

    data.save(restriction);
View Full Code Here

TOP

Related Classes of org.drools.analytics.components.VariableRestriction

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.