Examples of RuleInfo


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

  }
 
  @Test
  public void getSpreadSheetRules() throws RuleServiceException
  {
    RuleInfo ruleInfo = new RuleInfoBuilder("RuleBaseHelper.xls").build();
    KnowledgeBase spreadSheetRuleBase = helper.createRuleBaseFromDecisionTable( ruleInfo );
    assertNotNull( spreadSheetRuleBase );
  }
View Full Code Here

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

      file = File.createTempFile(clazz.getSimpleName() + "-", ".properties");
      Properties properties = new Properties();
      properties.setProperty(RuleAgent.URLS, clazz.getResource("/testrules.pkg").toString());
      os = new FileOutputStream(file);
      properties.store(os, clazz.getSimpleName());
      RuleInfo ruleInfo = new RuleInfoBuilder(file.getAbsolutePath()).build();
      KnowledgeAgent ka = helper.createRuleAgent(ruleInfo);
        kpkg = ka.getKnowledgeBase().getKnowledgePackage("org.jboss.internal.soa.esb.rules");

    }
    finally
View Full Code Here

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

  @Test
  public void executeStatelessRules()
  {
    Map<String,Object> globals = getGlobalsWithDestAndMessage();
    RuleInfo ruleInfo = new RuleInfoBuilder().globals(globals).build();
    message = ruleBaseState.executeStatelessRules( ruleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

 
  @Test
    public void executeStatefulRulesWithFireUntilHalt() throws InterruptedException, RuleServiceException
    {
    Map<String,Object> globals = getGlobalsWithDestAndMessage();
    final RuleInfo ruleInfo = new RuleInfoBuilder("JBossESBRules.drl")
      .globals(globals).ruleFireMethod(FIRE_UNTIL_HALT.name()).build();
   
    StatefulRuleInfoImpl waitRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    // this kicks off a new thread because of FIRE_UNTIL_HALT
    ruleService.executeStatefulRules(waitRuleInfo, message);
View Full Code Here

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

  @Test
  public void executeStatelessRulesFromDecisionTableReload() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDest();
    final String decisionTable = "RuleBaseHelper.xls";
    RuleInfo ruleInfo = new RuleInfoBuilder(decisionTable).reload(true).globals(globals).build();
    message = ruleService.executeStatelessRulesFromDecisionTable( ruleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

  @Test
  public void executeStatelessRulesFromDecisionTable() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDest();
    final String decisionTable = "RuleBaseHelper.xls";
    RuleInfo ruleInfo = new RuleInfoBuilder(decisionTable).reload(false).globals(globals).build();
    StatefulRuleInfo statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    message = ruleService.executeStatelessRulesFromDecisionTable( statefulRuleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

  @Test
  public void executeStatefulRulesFromDecisionTableReload() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDest();
    final String decisionTable = "RuleBaseHelper.xls";
    final RuleInfo ruleInfo = new RuleInfoBuilder(decisionTable).reload(true).globals(globals).build();
    final StatefulRuleInfoImpl statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    message = ruleService.executeStatefulRulesFromDecisionTable( statefulRuleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

  @Test
  public void executeStatefulRulesFromDecisionTable() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDest();
    final String decisionTable = "RuleBaseHelper.xls";
    final RuleInfo ruleInfo = new RuleInfoBuilder(decisionTable).reload(false).globals(globals).build();
    final StatefulRuleInfoImpl statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    message = ruleService.executeStatefulRulesFromDecisionTable( statefulRuleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

  @Test
  public void executeStatefulRules() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDestAndMessage();
    final RuleInfo ruleInfo = new RuleInfoBuilder("JBossESBRules.drl").reload(true).globals(globals).build();
    final StatefulRuleInfoImpl statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    message = ruleService.executeStatefulRules( statefulRuleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
View Full Code Here

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

  @Test
  public void executeStatefulRulesDrl() throws RuleServiceException
  {
    Map<String,Object> globals = getGlobalsWithDestAndMessage();
    RuleInfo ruleInfo = new RuleInfoBuilder("JBossESBRules.drl").reload(true).globals(globals).build();
    StatefulRuleInfoImpl statefulRuleInfo = new StatefulRuleInfoImpl(ruleInfo, false, false);
    message = ruleService.executeStatefulRules( statefulRuleInfo, message );
    ArrayList<String> destinations = getDestinations( globals );
    assertTrue( destinations.size() == 1 );
  }
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.