Package org.jboss.soa.esb.services.rules

Examples of org.jboss.soa.esb.services.rules.RuleInfo


   
    @Test
    public void fact()
    {
        final RuleInfoBuilder builder = new RuleInfoBuilder("dummy.drl");
        final RuleInfo info = builder.fact("one", "first").build();;
        Map<String, List<Object>> facts = info.getFacts();
        assertTrue(facts.get("one").contains("first"));
    }
View Full Code Here


    }
   
    @Test
    public void factEmpty()
    {
        RuleInfo info = new RuleInfoBuilder("dummy.drl").build();
        Map<String, List<Object>> facts = info.getFacts();
        assertTrue(facts.isEmpty());
    }
View Full Code Here

        final RuleInfoBuilder builder = new RuleInfoBuilder("dummy.drl");
        Map<String, List<Object>> facts = new HashMap<String, List<Object>>();
        facts.put("one", Arrays.asList(new Object[] {"first"}));
        builder.facts(facts);
       
        final RuleInfo info = builder.build();
        facts = info.getFacts();
        assertTrue(facts.get("one").contains("first"));
    }
View Full Code Here

        final RuleInfoBuilder builder = new RuleInfoBuilder("dummy.drl");
        Map<String, Object> globals = new HashMap<String, Object>();
        globals.put("message", "msgObject");
        builder.globals(globals);
       
        final RuleInfo info = builder.build();
        globals = info.getGlobals();
        assertTrue(globals.containsKey("message"));
        assertTrue(globals.containsValue("msgObject"));
    }
View Full Code Here

    }
   
    @Test
    public void audit()
    {
      final RuleInfo ruleInfo = new RuleInfoBuilder("dummy.drl")
        .auditType(THREADED_FILE.name())
        .auditFile("tracker")
        .auditInterval(5000)
        .build();
      assertEquals(THREADED_FILE.name(), ruleInfo.getAuditType());
      assertEquals("tracker", ruleInfo.getAuditFile());
      assertEquals(5000, ruleInfo.getAuditInterval());
    }
View Full Code Here

    }
   
    @Test
    public void cep()
    {
      final RuleInfo ruleInfo = new RuleInfoBuilder("dummy.drl")
        .clockType(REALTIME.name())
        .eventProcessingType(STREAM.name())
        .multithreadEvaluation(Boolean.TRUE)
        .maxThreads(Integer.valueOf(14))
        .ruleFireMethod(FIRE_UNTIL_HALT.name())
        .build();
      assertEquals(REALTIME.name(), ruleInfo.getClockType());
      assertEquals(STREAM.name(), ruleInfo.getEventProcessingType());
      assertEquals(Boolean.TRUE, ruleInfo.getMultithreadEvaluation());
      assertEquals(Integer.valueOf(14), ruleInfo.getMaxThreads());
      assertEquals(FIRE_UNTIL_HALT.name(), ruleInfo.getRuleFireMethod());
    }
View Full Code Here

  {
    final RuleInfoBuilder builder =  ruleServiceCallHelper.getRuleInfoBuilder();
    builder.global("message", message);
    builder.facts(RuleConfigUtil.extractObjectsFromMessage(entryPointMap, message));
    builder.defaultFacts(objectList);
    final RuleInfo ruleInfo = builder.build();
    return ruleServiceCallHelper.executeRulesService(ruleInfo, message);
  }
View Full Code Here

            globals.put("destinations", destinations);
           
            RuleInfoBuilder builder =  ruleServiceCallHelper.getRuleInfoBuilder();
            builder.globals(globals);
            builder.defaultFacts(objectList);
            final RuleInfo ruleInfo = builder.build();
            ruleServiceCallHelper.executeRulesService(ruleInfo, message);
       
            return destinations;
        }
        catch (final RuleServiceException e)
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.services.rules.RuleInfo

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.