Package org.drools.core.reteoo

Examples of org.drools.core.reteoo.ReteooRuleBase


    public BuildContext createContext() {

        RuleBaseConfiguration conf = new RuleBaseConfiguration();

        ReteooRuleBase rbase = new ReteooRuleBase( "ID",
                                                   conf );
        BuildContext buildContext = new BuildContext( rbase,
                                                      rbase.getReteooBuilder().getIdGenerator() );

        Rule rule = new Rule( "rule1", "org.pkg1", null );
        org.drools.core.rule.Package pkg = new org.drools.core.rule.Package( "org.pkg1" );
        pkg.getDialectRuntimeRegistry().setDialectData( "mvel", new MVELDialectRuntimeData() );
        pkg.addRule( rule );
View Full Code Here


   
    public BuildContext createContext() {
       
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
   
        ReteooRuleBase rbase = new ReteooRuleBase( "ID",
                                                   conf );
        BuildContext buildContext = new BuildContext( rbase,
                                                      rbase.getReteooBuilder().getIdGenerator() );
   
        Rule rule = new Rule( "rule1", "org.pkg1", null );
        org.drools.core.rule.Package pkg = new org.drools.core.rule.Package( "org.pkg1" );
        pkg.getDialectRuntimeRegistry().setDialectData( "mvel", new MVELDialectRuntimeData() );
        pkg.addRule( rule );
View Full Code Here

    public BuildContext createContext() {
   
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
   
        ReteooRuleBase rbase = new ReteooRuleBase( "ID",
                                                   conf );
        BuildContext buildContext = new BuildContext( rbase,
                                                      rbase.getReteooBuilder().getIdGenerator() );
   
        Rule rule = new Rule( "rule1", "org.pkg1", null );
        org.drools.core.rule.Package pkg = new org.drools.core.rule.Package( "org.pkg1" );
        pkg.getDialectRuntimeRegistry().setDialectData( "mvel", new MVELDialectRuntimeData() );
        pkg.addRule( rule );
View Full Code Here

    public BuildContext createContext() {

        RuleBaseConfiguration conf = new RuleBaseConfiguration();

        ReteooRuleBase rbase = new ReteooRuleBase( "ID",
                                                   conf );
        BuildContext buildContext = new BuildContext( rbase,
                                                      rbase.getReteooBuilder().getIdGenerator() );

        Rule rule = new Rule( "rule1", "org.pkg1", null );
        org.drools.core.rule.Package pkg = new org.drools.core.rule.Package( "org.pkg1" );
        pkg.getDialectRuntimeRegistry().setDialectData( "mvel", new MVELDialectRuntimeData() );
        pkg.addRule( rule );
View Full Code Here

    }

    @Test
    public void testNoLoopScheduledActivation() throws Exception {
        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        IdGenerator idGenerator = ruleBase.getReteooBuilder().getIdGenerator();

        final AbstractWorkingMemory workingMemory = (AbstractWorkingMemory) ruleBase.newStatefulSession();
        final Agenda agenda = workingMemory.getAgenda();

        final Rule rule = new Rule("test-rule");
        final List data = new ArrayList();
View Full Code Here

    @Test
    public void testAddition() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        ReteooRuleBase rbase = ( ReteooRuleBase ) RuleBaseFactory.newRuleBase(conf);
        StatefulSession wm = rbase.newStatefulSession();

        InternalAgenda agenda = ( InternalAgenda ) wm.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

    @Test
    public void testRemoval() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        ReteooRuleBase rbase = ( ReteooRuleBase ) RuleBaseFactory.newRuleBase(conf);
        StatefulSession wm = rbase.newStatefulSession();

        InternalAgenda agenda = ( InternalAgenda ) wm.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

    @Test
    public void testUnblockAll() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        ReteooRuleBase rbase = ( ReteooRuleBase ) RuleBaseFactory.newRuleBase(conf);
        StatefulSession wm = rbase.newStatefulSession();

        InternalAgenda agenda = ( InternalAgenda ) wm.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

    @Test
    public void testKnowledgeHelperUpdate() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        ReteooRuleBase rbase = ( ReteooRuleBase ) RuleBaseFactory.newRuleBase(conf);
        StatefulSession wm = rbase.newStatefulSession();

        InternalAgenda agenda = ( InternalAgenda ) wm.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

                                                                                PropagationContext.INSERTION,
                                                                                null,
                                                                                null,
                                                                                null);

        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        IdGenerator idGenerator = ruleBase.getReteooBuilder().getIdGenerator();

        final AbstractWorkingMemory workingMemory = (AbstractWorkingMemory) ruleBase.newStatefulSession();

        final Rete source = ruleBase.getRete();

        final EntryPointNode entryPoint = new EntryPointNode(0,
                                                             source,
                                                             buildContext);
        entryPoint.attach(buildContext);
View Full Code Here

TOP

Related Classes of org.drools.core.reteoo.ReteooRuleBase

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.