Examples of executeRules()


Examples of org.dayatang.rule.StatelessRuleService.executeRules()

  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.dayatang.rule.StatelessRuleService.executeRules()

                .ruleServiceProvider(new RuleServiceProviderImpl())
                .ruleSource(getClass().getResourceAsStream(ruleDrl))
                .bulid();

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

    // Validate
    assertEquals(1, statelessResults.size());

    Person p = (Person) statelessResults.get(0);
View Full Code Here

Examples of org.dayatang.rule.StatelessRuleService.executeRules()

                .sessionProperties(sessionProperties)
                .bulid();

    // Execute rule
    Person firstPerson = new Person(3L, "chencao");
        instance.executeRules(Arrays.asList(firstPerson));

    // FirstPerson hasn't been changed
    assertEquals(300, firstPerson.getId().longValue());

    // Validate global
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.