Examples of RuleEngine


Examples of org.emftrace.core.rules.ruleengine.RuleEngine

   *
   * @return new RuleEngine-component
   */
  public static RuleEngine createRuleEngine()
  {
    return new RuleEngine();
  }
View Full Code Here

Examples of org.emftrace.core.rules.ruleengine.RuleEngine

        List<Rule> rules = null;
        if( selectedRules != null ) rules = selectedRules;
        else                        rules = selectedCatalog.getRules();
               
            int numRules = rules.size();
            RuleEngine ruleEngine = Activator.getRuleEngine();
   
            monitor.beginTask("Applying rules...", numRules+1);
   
            for(int i = 0; i < rules.size(); i++)
            {                                       
                monitor.subTask(rules.get(i).getRuleID() + " ("+(i+1)+"/"+numRules+")");
                ruleEngine.applyRule(project, selectedModels, rules.get(i));
                monitor.worked(1);
            }
           
            monitor.subTask("Cleaning up project");
            Activator.getProjectCleaner().cleanUpProject(project);
View Full Code Here

Examples of org.emftrace.core.rules.ruleengine.RuleEngine

    }
   
    @Test
    public void testCreateRuleEngine()
    {
      RuleEngine tmp = null;
      assertNull(tmp);
      tmp = EMFTraceCoreFactory.createRuleEngine();
      assertNotNull(tmp);
    }
View Full Code Here

Examples of org.wso2.carbon.rule.server.RuleEngine

    public ServiceEngine createServiceEngine(ServiceDescription serviceDescription,
                                             AxisService axisService,
                                             ResourceLoader resourceLoader) {
        //TODO
        RuleEngine ruleEngine =
                RuleServiceManger.getInstance().getRuleServerManagerService().createRuleEngine(
                        axisService.getClassLoader());
        RuleServiceExtensionDescription extensionDescription =
                (RuleServiceExtensionDescription) serviceDescription.getServiceExtensionDescription();
        RuleSetDescription ruleSetDescription = extensionDescription.getRuleSetDescription();
        Object ruleSource = ruleSetDescription.getRuleSource();

        int tenantId =  SuperTenantCarbonContext.getCurrentContext(axisService).getTenantId();
        if (ruleSource == null) {
            Object value = loadRuleScript(axisService.getClassLoader(), ruleSetDescription,
                    resourceLoader,tenantId);
            if (value == null) {
                throw new LoggedRuntimeException("Cannot load the rule script from" +
                        " the " + ruleSetDescription, log);
            }
            ruleSetDescription.setRuleSource(value);
        }

        String uri = ruleEngine.addRuleSet(ruleSetDescription);
        return new RuleServiceEngine(axisService, ruleEngine, uri);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.