Package org.kie.api.runtime

Examples of org.kie.api.runtime.KieSession.fireAllRules()


    }

    @Test
    public void testCleanupClustering() {
        KieSession kSession = getModelSession( source4 );
        kSession.fireAllRules();
        assertTrue( kSession.getObjects().size() > 0 );

        Collection qres = getModelMarker( kSession, "CenterClustering" );
        assertEquals( 1, qres.size() );
View Full Code Here


        Collection qres = getModelMarker( kSession, "CenterClustering" );
        assertEquals( 1, qres.size() );

        kSession.getEntryPoint( "enable_CenterClustering" ).insert(Boolean.FALSE);
        kSession.fireAllRules();

        assertEquals( 1, kSession.getObjects().size() );

        kSession.dispose();
    }
View Full Code Here

    }

    @Test
    public void testCleanupSVM() {
        KieSession kSession = getModelSession( source5 );
        kSession.fireAllRules();
        assertTrue( kSession.getObjects().size() > 0 );

        Collection qres = getModelMarker( kSession, "SVMXORModel" );
        assertEquals( 1, qres.size() );
View Full Code Here

        Collection qres = getModelMarker( kSession, "SVMXORModel" );
        assertEquals( 1, qres.size() );

        kSession.getEntryPoint( "enable_SVMXORModel" ).insert(Boolean.FALSE);
        kSession.fireAllRules();

        assertEquals( 1, kSession.getObjects().size() );

        kSession.dispose();
    }
View Full Code Here

    }

    @Test
    public void testCleanupScorecard() {
        KieSession kSession = getModelSession( source6 );
        kSession.fireAllRules();
        assertTrue( kSession.getObjects().size() > 0 );

        Collection qres = getModelMarker( kSession, "SampleScore" );
        assertEquals( 1, qres.size() );
View Full Code Here

        Collection qres = getModelMarker( kSession, "SampleScore" );
        assertEquals( 1, qres.size() );

        kSession.getEntryPoint( "enable_SampleScore" ).insert(Boolean.FALSE);
        kSession.fireAllRules();

        assertEquals( 1, kSession.getObjects().size() );

        kSession.dispose();
    }
View Full Code Here

        KieBuilder kb = ks.newKieBuilder( kfs );
        kb.buildAll();

        KieSession kSession = ks.newKieContainer( ks.getRepository().getDefaultReleaseId() ).newKieSession();

        kSession.fireAllRules();

        assertEquals( 2, kSession.getObjects( new ClassObjectFilter( ModelMarker.class ) ).size() );
        assertEquals( 11, kSession.getObjects( new ClassObjectFilter( kSession.getKieBase().getFactType( packageName, "Synapse" ).getFactClass() ) ).size() );

        kSession.dispose();
View Full Code Here

        kfs.write( ResourceFactory.newClassPathResource( source1 ).setResourceType( ResourceType.PMML ) );
        kb.buildAll();

        KieContainer kc = ks.newKieContainer( releaseId1 );
        KieSession kSession = kc.newKieSession();
        kSession.fireAllRules();


        kfs.write( ResourceFactory.newClassPathResource( source2 ).setResourceType( ResourceType.PMML ) );
        IncrementalResults results = (( InternalKieBuilder ) kb ).incrementalBuild();
        kc.updateToVersion( releaseId1 );
View Full Code Here

        kfs.write( ResourceFactory.newClassPathResource( source2 ).setResourceType( ResourceType.PMML ) );
        IncrementalResults results = (( InternalKieBuilder ) kb ).incrementalBuild();
        kc.updateToVersion( releaseId1 );

        kSession.fireAllRules();

        assertEquals( 2, kSession.getObjects( new ClassObjectFilter( ModelMarker.class ) ).size() );
        assertEquals( 11, kSession.getObjects( new ClassObjectFilter( kSession.getKieBase().getFactType( packageName, "Synapse" ).getFactClass() ) ).size() );

        kSession.dispose();
View Full Code Here

        setKbase( getKSession().getKieBase() );
        KieSession kSession = getKSession();

//        kSession.addEventListener( new org.drools.event.rule.DebugAgendaEventListener() );

        kSession.fireAllRules()//init model

        FactType tgt = kSession.getKieBase().getFactType( packageName, "Fld5" );
       
        kSession.getEntryPoint( "in_Fld1" ).insert( 30.0 );
        kSession.getEntryPoint( "in_Fld2" ).insert( 60.0 );
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.