Package org.drools.agent

Examples of org.drools.agent.RuleAgent


        if (!executeRules) {
            return; //exit if we've not found the package in the brms to execute
        }

        RuleAgentFactory factory = new RuleAgentFactory(props);
        RuleAgent agent = factory.get(RuleAgentType.HTTP);
        RuleBase rb = agent.getRuleBase();

        StatelessSession s = rb.newStatelessSession();
        Collection<Object> facts = new LinkedList<Object>();
        facts.add(new String("ping"));
        System.out.print("ping...");
View Full Code Here


        Properties config = new Properties();
        config.setProperty(RuleAgent.FILES, target.getPath());



        RuleAgent ag = RuleAgent.newRuleAgent(config);
        RuleBase rb = ag.getRuleBase();
        assertNotNull(rb);
    }
View Full Code Here

        Properties config = new Properties();
        config.setProperty(RuleAgent.FILES, target.getPath());



    RuleAgent ag = RuleAgent.newRuleAgent(config);
    RuleBase rb = ag.getRuleBase();
    assertNotNull(rb);
  }
View Full Code Here

        Properties config = new Properties();
        config.setProperty( RuleAgent.FILES,
                            target.getPath() );

        RuleAgent ag = RuleAgent.newRuleAgent( config );

        assertNotNull( ag );

        RuleBase rb = ag.getRuleBase();
        assertNotNull( rb );
    }
View Full Code Here

      }

      if (!executeRules) return; //exit if we've not found the package in the brms to execute

      RuleAgentFactory factory=new RuleAgentFactory(props);
        RuleAgent agent=factory.get(RuleAgentType.HTTP);
        RuleBase rb=agent.getRuleBase();

        StatelessSession s=rb.newStatelessSession();
        Collection<Object> facts=new LinkedList<Object>();
        facts.add(new String("ping"));
        System.out.print("ping...");
View Full Code Here

        Properties config = new Properties();
        config.setProperty( RuleAgent.FILES,
                            target.getPath() );

        RuleAgent ag = RuleAgent.newRuleAgent( config );

        assertNotNull( ag );

        RuleBase rb = ag.getRuleBase();
        assertNotNull( rb );
    }
View Full Code Here

      return cachedAgents.get(configName).getRuleBase();
    } else {
      synchronized (cachedAgents) {
        if (!cachedAgents.containsKey(configName)) {
           try {
            RuleAgent ag = RuleAgent.newRuleAgent("/" + configName + ".properties");
            cachedAgents.put(configName, ag);
           } catch (NullPointerException npe) {
             npe.printStackTrace();
             return null;
           }
View Full Code Here

TOP

Related Classes of org.drools.agent.RuleAgent

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.