Package org.openhab.model.rule.rules

Examples of org.openhab.model.rule.rules.Rule


   
    if(modelRepository!=null && scriptEngine!=null) {
      EObject model = modelRepository.getModel(modelName);
      if (model instanceof RuleModel) {
        RuleModel ruleModel = (RuleModel) model;
        Rule rule = getRule(ruleModel, ruleName);
        if(rule!=null) {
          Script script = scriptEngine.newScriptFromXExpression(rule.getScript());
          logger.debug("Executing scheduled rule '{}'", rule.getName());
          try {
            script.execute(RuleContextHelper.getContext(rule));
          } catch (ScriptExecutionException e) {
            logger.error("Error during the execution of rule {}", rule.getName(), e.getCause());
          }
        } else {
          logger.debug("Scheduled rule '{}' does not exist", ruleName);
        }
      } else {
View Full Code Here

TOP

Related Classes of org.openhab.model.rule.rules.Rule

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.