Package org.drools.runtime.pipeline

Examples of org.drools.runtime.pipeline.Callable.call()


        Expression expr = PipelineFactory.newMvelExpression( "this.values" );
        action.setReceiver( expr );
        expr.setReceiver( callable );         
       
        assertNull( mock.getValues() );
        List<Integer> list = ( List<Integer> ) callable.call( mock, new BasePipelineContext( Thread.currentThread().getContextClassLoader() ) );

       
        System.out.println( list.get( 0 ));
        assertEquals( 5, list.size());
        assertEquals( 0,list.get( 0 ).intValue() );
View Full Code Here


        Callable callable = new CallableImpl();
        Action action = PipelineFactory.newMvelAction( "this.set = true" );
        callable.setReceiver( action );
        action.setReceiver( callable );
        assertFalse( mock.isSet() );
        callable.call( mock,
                       new BasePipelineContext( Thread.currentThread().getContextClassLoader() ) );
        assertTrue( mock.isSet() );
    }

    public static class MockClass {
View Full Code Here

        callable.setReceiver( transformer );
        transformer.setReceiver( callable );
        BasePipelineContext context = new BasePipelineContext( Thread.currentThread().getContextClassLoader() );
       
        Map<String, Object> beans = ( Map<String, Object> ) callable.call( inputXLS, context );

        assertEquals( Company.class.getName(), beans.get( "company" ).getClass().getName());
        assertEquals( ArrayList.class.getName(), beans.get( "departments" ).getClass().getName());
       
        Company company = ( Company beans.get( "company" );
View Full Code Here

        callable.setReceiver( transformer );
        transformer.setReceiver( callable );
        BasePipelineContext context = new BasePipelineContext( Thread.currentThread().getContextClassLoader() );
       
        Map<String, Object> beans = ( Map<String, Object> ) callable.call( inputXLS, context );

        assertEquals( Company.class.getName(), beans.get( "company" ).getClass().getName());
        assertEquals( ArrayList.class.getName(), beans.get( "departments" ).getClass().getName());
       
        Company company = ( Company beans.get( "company" );
View Full Code Here

        Callable callable = new CallableImpl();
        Action action = PipelineFactory.newMvelAction( "this.set = true" );
        callable.setReceiver( action );
        action.setReceiver( callable );
        assertFalse( mock.isSet() );
        callable.call( mock,
                       new BasePipelineContext( Thread.currentThread().getContextClassLoader() ) );
        assertTrue( mock.isSet() );
    }

    public static class MockClass {
View Full Code Here

        Expression expr = PipelineFactory.newMvelExpression( "this.values" );
        action.setReceiver( expr );
        expr.setReceiver( callable );
       
        assertNull( mock.getValues() );
        List<Integer> list = ( List<Integer> ) callable.call( mock, new BasePipelineContext( Thread.currentThread().getContextClassLoader() ) );

       
        System.out.println( list.get( 0 ));
        assertEquals( 5, list.size());
        assertEquals( 0,list.get( 0 ).intValue() );
View Full Code Here

        callable.setReceiver( transformer );
        transformer.setReceiver( callable );       
        BasePipelineContext context = new BasePipelineContext( Thread.currentThread().getContextClassLoader() );
       
        Map<String, Object> beans = ( Map<String, Object> ) callable.call( inputXLS, context );

        assertEquals( Company.class.getName(), beans.get( "company" ).getClass().getName());
        assertEquals( ArrayList.class.getName(), beans.get( "departments" ).getClass().getName());
       
        Company company = ( Company beans.get( "company" );
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.