Package org.drools

Examples of org.drools.StatelessSession.executeWithResults()


        data.add( r3 );
        data.add( r4 );
        data.add( r5 );
        data.add( r6 );

        StatelessSessionResult sessionResult = session.executeWithResults( data );

        Map<Cause, Set<Cause>> map = createOppositesMap( VerifierComponentType.RESTRICTION,
                                                         sessionResult.iterateObjects() );

        assertTrue( (TestBaseOld.causeMapContains(map,
View Full Code Here


        data.add( r8 );
        data.add( o4 );
        data.add( pp3 );
        data.add( pp4 );

        StatelessSessionResult sessionResult = session.executeWithResults( data );
        Iterator iter = sessionResult.iterateObjects();

        boolean pp1true = false;
        boolean pp2true = false;
        boolean pp3true = false;
View Full Code Here

        data.add( pattern2 );
        data.add( pp3 );
        data.add( pp4 );
        data.add( alwaysTrue4 );

        session.executeWithResults( data );

        Iterator<VerifierMessageBase> iter = result.getBySeverity( Severity.NOTE ).iterator();

        boolean works = false;
        while ( iter.hasNext() ) {
View Full Code Here

        StatelessSession session = getSession();

        // notice I don't export Cheessery
        session.setGlobalExporter( new CopyIdentifiersGlobalExporter( new String[]{"list"} ) );

        StatelessSessionResult result = session.executeWithResults( (Object) null );

        assertSame( this.list,
                    result.getGlobal( "list" ) );

        // cheesery should be null
View Full Code Here

    public void testCopyIdentifierGlobalExporterTwoValues() throws Exception {
        StatelessSession session = getSession();

        session.setGlobalExporter( new CopyIdentifiersGlobalExporter( new String[]{"list", "cheesery"} ) );

        StatelessSessionResult result = session.executeWithResults( (Object) null );

        assertSame( this.list,
                    result.getGlobal( "list" ) );

        // cheesery should be null
View Full Code Here

        StatelessSession session = getSession();

        // I've not specified any identifiers, so it should do them alll
        session.setGlobalExporter( new CopyIdentifiersGlobalExporter() );

        StatelessSessionResult result = session.executeWithResults( (Object) null );

        assertSame( this.list,
                    result.getGlobal( "list" ) );

        // cheesery should be null
View Full Code Here

        StatelessSession session = getSession();

        // I've not specified any identifiers, so it should do them alll
        session.setGlobalExporter( new ReferenceOriginalGlobalExporter() );

        StatelessSessionResult result = session.executeWithResults( (Object) null );

        assertSame( this.list,
                    result.getGlobal( "list" ) );

        // cheesery should be null
View Full Code Here

        session.setGlobalExporter( new CopyIdentifiersGlobalExporter( new String[]{"list"} ) );

        final Cheese stilton = new Cheese( "stilton",
                                           5 );

        StatelessSessionResult result = session.executeWithResults( stilton );

        assertSame( stilton,
                    result.iterateObjects().next() );

        assertEquals( "stilton",
View Full Code Here

        session.setGlobalExporter( new CopyIdentifiersGlobalExporter( new String[]{"list"} ) );

        final Cheese stilton = new Cheese( "stilton",
                                           5 );

        StatelessSessionResult result = session.executeWithResults( new Object[]{stilton} );

        assertSame( stilton,
                    result.iterateObjects().next() );

        assertEquals( "stilton",
View Full Code Here

        final Cheese stilton = new Cheese( "stilton",
                                           5 );

        List collection = new ArrayList();
        collection.add( stilton );
        StatelessSessionResult result = session.executeWithResults( collection );

        assertSame( stilton,
                    result.iterateObjects().next() );

        assertEquals( "stilton",
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.