KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
Action executeResultHandler = PipelineFactory.newExecuteResultHandler();
KnowledgeRuntimeCommand execute = PipelineFactory.newStatelessKnowledgeSessionExecute();
execute.setReceiver( executeResultHandler );
Action assignParameters = PipelineFactory.newMvelAction( "context.parameters.globalParams.setInOut( ['list' : new java.util.ArrayList()] )");
assignParameters.setReceiver( execute );
Action assignIterable = PipelineFactory.newMvelAction( "context.setIterable( this )");
assignIterable.setReceiver( assignParameters );
Pipeline pipeline = PipelineFactory.newStatelessKnowledgeSessionPipeline(ksession);
pipeline.setReceiver( assignIterable );
ResultHandlerImpl handler = new ResultHandlerImpl();