Package org.beangle.ems.rule.engine

Examples of org.beangle.ems.rule.engine.RuleExecutor


  protected boolean stopWhenFail = false;

  public void execute(Context context) {
    Agenda agenda = matcher.buildAgenda(base, context);
    List<Rule> rules = agenda.getRules();
    RuleExecutor executor = executorBuilder.build(rules, stopWhenFail);
    executor.execute(context);
  }
View Full Code Here


  public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    this.appContext = applicationContext;
  }

  public RuleExecutor build(RuleConfig ruleConfig) {
    RuleExecutor executor = build(ruleConfig.getRule());
    if (null == executor) { return null; }
    Map<String, Object> map = CollectUtils.newHashMap();
    for (RuleConfigParam configParam : ruleConfig.getParams()) {
      map.put(configParam.getParam().getName(), configParam.getValue());
    }
View Full Code Here

    // rules.add(rule1);
    rules.add(rule2);

    Context context = new SimpleContext();
    RuleExecutor exceutor = builder.build(rules, false);
    exceutor.execute(context);
  }
View Full Code Here

  public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    this.appContext = applicationContext;
  }

  public RuleExecutor build(RuleConfig ruleConfig) {
    RuleExecutor executor = build(ruleConfig.getRule());
    if (null == executor) { return null; }
    Map<String, Object> map = CollectUtils.newHashMap();
    for (RuleConfigParam configParam : ruleConfig.getParams()) {
      map.put(configParam.getParam().getName(), configParam.getValue());
    }
View Full Code Here

TOP

Related Classes of org.beangle.ems.rule.engine.RuleExecutor

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.