Examples of newKnowledgeBuilder()


Examples of org.drools.fluent.simulation.impl.DefaultSimulationFluent.newKnowledgeBuilder()

        String str = "package org.drools.simulation.test\n" +
                     "import " + Person.class.getName() + "\n" +
                     "rule updateAge no-loop when  $p : Person() then modify( $p ) { setAge( $p.getAge() + 10 ) }; end\n";

        // @formatter:off       
        f.newKnowledgeBuilder()
            .add( ResourceFactory.newByteArrayResource( str.getBytes() ),
                                   ResourceType.DRL )
            .end()
        .newStatefulKnowledgeSession()
            .insert( new Person( "yoda", 150 ) ).set( "y" )
View Full Code Here

Examples of org.drools.fluent.simulation.impl.DefaultSimulationFluent.newKnowledgeBuilder()

        String str = "package org.drools.simulation.test\n" +
                     "import " + Person.class.getName() + "\n" +
                     "rule updateAge no-loop when  $p : Person() then modify( $p ) { setAge( $p.getAge() + 10 ) }; end\n";

        // @formatter:off       
        f.newKnowledgeBuilder()
            .add( ResourceFactory.newByteArrayResource( str.getBytes() ),
                                   ResourceType.DRL )
            .end()
        .newStatefulKnowledgeSession()
            .insert( new Person( "yoda", 150 ) ).set( "y" )
View Full Code Here

Examples of org.drools.fluent.simulation.impl.DefaultSimulationFluent.newKnowledgeBuilder()

        assertTrue( "Assertion should have failed",
                    fail );

        f = new DefaultSimulationFluent();
        // @formatter:off       
        f.newKnowledgeBuilder()
            .add( ResourceFactory.newByteArrayResource( str.getBytes() ),
                                    ResourceType.DRL )
            .end()
        .newStatefulKnowledgeSession()
             .insert( new Person( "yoda", 150 ) ).set( "y" )
View Full Code Here

Examples of org.drools.fluent.simulation.impl.DefaultSimulationFluent.newKnowledgeBuilder()

        String str2 = "package org.drools.simulation.test\n" +
                      "import " + Person.class.getName() + "\n" +
                      "rule updateAge2 no-loop when  $p : Person() then modify( $p ) { setAge( $p.getAge() + 20 ) }; end\n";

        // @formatter:off
        f.newKnowledgeBuilder()
            .add( ResourceFactory.newByteArrayResource( str1.getBytes() ),
                                   ResourceType.DRL )
            .end()
        .newRelativeStep( 100 )
        .newStatefulKnowledgeSession()
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.