Package org.kie.api.runtime

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


        kSession.getEntryPoint( "in_X" ).insert( 0.85 );
        kSession.fireAllRules();
        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "yes" );

        kSession.getEntryPoint( "in_Y" ).insert( -0.12 );
        kSession.fireAllRules();
        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "no" );

        kSession.getEntryPoint( "in_X" ).insert( 7.85 );
        kSession.fireAllRules();
        System.out.println( reportWMObjects( kSession ) );
View Full Code Here


        kSession.getEntryPoint( "in_Y" ).insert( -0.12 );
        kSession.fireAllRules();
        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "no" );

        kSession.getEntryPoint( "in_X" ).insert( 7.85 );
        kSession.fireAllRules();
        System.out.println( reportWMObjects( kSession ) );
        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "no" );
    }

View Full Code Here

    public void testSVM1vN() throws Exception {
        setKSession( getModelSession( source2, VERBOSE ) );
        setKbase( getKSession().getKieBase() );
        KieSession kSession = getKSession();

        kSession.fireAllRules()//init model

        FactType ztype = kSession.getKieBase().getFactType( packageName, "Z" );
        assertNotNull( ztype );

View Full Code Here

        assertNotNull( ztype );


        kSession.getEntryPoint( "in_X" ).insert( 0.0 );
        kSession.getEntryPoint( "in_Y" ).insert( 0.0 );
        kSession.fireAllRules();

        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "no" );

        checkFirstDataFieldOfTypeStatus( kSession.getKieBase().getFactType( packageName, "OutZ" ),
                                                true, false, "SVMXORMODEL", "no" );
View Full Code Here

    public void testSVM1v1() throws Exception {
        setKSession( getModelSession( source3, VERBOSE ) );
        setKbase( getKSession().getKieBase() );
        KieSession kSession = getKSession();

        kSession.fireAllRules()//init model

        FactType ztype = kSession.getKieBase().getFactType( packageName, "Z" );
        assertNotNull( ztype );

View Full Code Here

        assertNotNull( ztype );


        kSession.getEntryPoint( "in_X" ).insert( 0.63 );
        kSession.getEntryPoint( "in_Y" ).insert( 0.0 );
        kSession.fireAllRules();

        checkFirstDataFieldOfTypeStatus( ztype, true, false, "SVMXORMODEL", "yes" );

        checkFirstDataFieldOfTypeStatus( kSession.getKieBase().getFactType( packageName, "OutZ" ),
                                                true, false, "SVMXORMODEL", "yes" );
View Full Code Here

    public void testScorecard() throws Exception {
        setKSession( getModelSession( source1, VERBOSE ) );
        setKbase( getKSession().getKieBase() );
        KieSession kSession = getKSession();

        kSession.fireAllRules()//init model

        kSession.getEntryPoint( "in_Age" ).insert( 33.0 );
        kSession.getEntryPoint( "in_Occupation" ).insert( "SKYDIVER" );
        kSession.getEntryPoint( "in_ResidenceState" ).insert( "KN" );
        kSession.getEntryPoint( "in_ValidLicense" ).insert( true );
View Full Code Here

        kSession.getEntryPoint( "in_Age" ).insert( 33.0 );
        kSession.getEntryPoint( "in_Occupation" ).insert( "SKYDIVER" );
        kSession.getEntryPoint( "in_ResidenceState" ).insert( "KN" );
        kSession.getEntryPoint( "in_ValidLicense" ).insert( true );

        kSession.fireAllRules()//init model

        FactType scoreCardType = getKbase().getFactType( PMML4Helper.pmmlDefaultPackageName(), "ScoreCard" );
        assertNotNull( scoreCardType );

        assertEquals( 1, kSession.getObjects( new ClassObjectFilter( scoreCardType.getFactClass() ) ).size() );
View Full Code Here

    public void testScorecardOutputs() throws Exception {
        setKSession( getModelSession( source2, VERBOSE ) );
        setKbase( getKSession().getKieBase() );
        KieSession kSession = getKSession();

        kSession.fireAllRules()//init model

        kSession.getEntryPoint( "in_Cage" ).insert( "engineering" );
        kSession.getEntryPoint( "in_Age" ).insert( 25 );
        kSession.getEntryPoint( "in_Wage" ).insert( 500.0 );
View Full Code Here

        kSession.getEntryPoint( "in_Cage" ).insert( "engineering" );
        kSession.getEntryPoint( "in_Age" ).insert( 25 );
        kSession.getEntryPoint( "in_Wage" ).insert( 500.0 );

        kSession.fireAllRules()//init model

        checkFirstDataFieldOfTypeStatus(getKbase().getFactType(packageName,"OutRC1"),
                        true, false,"SampleScorecard", "RC2" );
        checkFirstDataFieldOfTypeStatus(getKbase().getFactType(packageName,"OutRC2"),
                        true, false,"SampleScorecard", "RC1" );
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.