Examples of RuleServiceProviderImpl


Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

    }

    @Test
    public void testExecuteRules() {
        instance = StatelessRuleServiceJsr94.builder()
                .ruleServiceProvider(new RuleServiceProviderImpl())
                .serviceProviderProperties(null)
                .executionSetProperties(null)
                .ruleSource(getClass().getResourceAsStream(ruleDrl))
                .sessionProperties(null)
                .bulid();
View Full Code Here

Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

    public void testExecuteRulesWithGlobal() {
        Map sessionProperties = new HashMap();
        Map globalMap = new HashMap();
        sessionProperties.put("map", globalMap);
        instance = StatelessRuleServiceJsr94.builder()
                .ruleServiceProvider(new RuleServiceProviderImpl())
                .serviceProviderProperties(null)
                .executionSetProperties(null)
                .ruleSource(getClass().getResourceAsStream("/rule/example.drl"))
                .sessionProperties(sessionProperties)
                .bulid();
View Full Code Here

Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

    yyang = new Person(3L, "yyang", "male");
  }

  private StatefulRuleTemplate createStatefulRuleTemplate() {
    InputStream ruleSource = getClass().getResourceAsStream(ruleDrl);
    StatefulRuleTemplate result = new StatefulRuleTemplate(new RuleServiceProviderImpl()).ruleSource(ruleSource);
    return result;
  }
View Full Code Here

Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

  String ruleDrl = "/rule/Foo.drl";

  @Test
  public void item1() throws Exception {
        StatelessRuleService instance = StatelessRuleServiceJsr94.builder()
                .ruleServiceProvider(new RuleServiceProviderImpl())
                .ruleSource(getClass().getResourceAsStream(ruleDrl))
                .bulid();
    List<?> globalStatelessResults = instance.executeRules(createObjects());
    for (Object object : globalStatelessResults) {
      System.out.println(object);
View Full Code Here

Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

    // Execute rule
    List<Person> objects = new ArrayList<Person>();
    objects.add(new Person(1L, "chencao"));

        StatelessRuleService instance = StatelessRuleServiceJsr94.builder()
                .ruleServiceProvider(new RuleServiceProviderImpl())
                .ruleSource(getClass().getResourceAsStream(ruleDrl))
                .bulid();

        // Execute rule
        List statelessResults = instance.executeRules(Arrays.asList(new Person(1L, "chencao")));
View Full Code Here

Examples of org.drools.jsr94.rules.RuleServiceProviderImpl

    List globalList = new ArrayList();
    Map sessionProperties = new HashMap();
    sessionProperties.put("list", globalList);

        StatelessRuleService instance = StatelessRuleServiceJsr94.builder()
                .ruleServiceProvider(new RuleServiceProviderImpl())
                .ruleSource(getClass().getResourceAsStream(ruleDrl))
                .sessionProperties(sessionProperties)
                .bulid();

    // Execute rule
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.