Hokie dokie.

Alpha-3 is now out, and is the first announced version of the new Rete-OO
method of doing things.

Undocumented and virtually untested.

See test_data/Minimal.drl for an example rule.  It's the one we've
seen in the mail-list here recently.

Many things don't work (initialization upon declaration, instance fields,
etc), but many things *do* work, so maybe you'll be surpised.

I could really use folks banging on this, and letting me know if
it can model the types of things you might want to model.

Your API for working with this is pretty much just

        org.drools.KnowledgeBase

ferinstance...

        KnowledgeBase kb = new KnowledgeBase();

        File inFile = new File( "test_data/Minimal.drl" );

        try
        {
            // This works for java.io.File and java.net.URL resources

            kb.addRuleSet( inFile );
        }
        catch (ReteConstructionException e)
        {
            e.printStackTrace();
        }
        catch (ParseException e)
        {
            e.printStackTrace();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        
        MockObject bobSr = new MockObject( "bob",
                                           84 );
        
        MockObject bobJr = new MockObject( bobSr,
                                           "bob",
                                           42 );
        
        MockObject billSr = new MockObject( "bill",
                                            84 );
        
        MockObject billJr = new MockObject( billSr,
                                            "bill",
                                            42 );
        
        kb.assertObject( bobJr );
        kb.assertObject( billSr );
        kb.assertObject( bobSr );
        kb.assertObject( billJr );




_______________________________________________
drools-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/drools-interest

Reply via email to