Examples of newFireAllRules()


Examples of org.kie.api.command.KieCommands.newFireAllRules()

       
        KieCommands cmds  = KieServices.Factory.get().getCommands();
       
        List<String> list = new ArrayList<String>();
        defaultClassPathSKSession.setGlobal( "list", list );
        defaultClassPathSKSession.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "2.0" ) );
        assertTrue( list.get(1).endsWith( "2.0" ) );       
    }
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

       
        KieCommands cmds  = KieServices.Factory.get().getCommands();
               
        List<String> list = new ArrayList<String>();
        defaultDynamicSKSession.setGlobal( "list", list );
        defaultDynamicSKSession.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );       
   
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

       
        KieCommands cmds  = KieServices.Factory.get().getCommands();
               
        List<String> list = new ArrayList<String>();
        kbase1ksession1v10.setGlobal( "list", list );
        kbase1ksession1v10.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );
       
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );
       
        list = new ArrayList<String>();
        kbase1ksession1v11.setGlobal( "list", list );
        kbase1ksession1v11.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "1.1" ) );
        assertTrue( list.get(1).endsWith( "1.1" ) );       
    }   
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

       
        KieCommands cmds  = KieServices.Factory.get().getCommands();
       
        List<String> list = new ArrayList<String>();
        kbase1ksession1sks1.setGlobal( "list", list );
        kbase1ksession1sks1.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );
       
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );
       
        list = new ArrayList<String>();
        kbase1ksession1sks2.setGlobal( "list", list );
        kbase1ksession1sks2.execute( cmds.newFireAllRules() );
       
        assertEquals( 2, list.size() );
        assertTrue( list.get(0).endsWith( "1.0" ) );
        assertTrue( list.get(1).endsWith( "1.0" ) );         
    }  
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

        Method getter = messageClass.getMethod("getText");
        setter.invoke( message, "HelloWorld");

        KieCommands kcmd = ks.getCommands();
        Command<?> insert = kcmd.newInsert(message, "message");
        Command<?> fire = kcmd.newFireAllRules();
        BatchExecutionCommand batch = kcmd.newBatchExecution(Arrays.asList(insert, fire), "defaultKieSession");

        String payload = BatchExecutionHelper.newXStreamMarshaller().toXML(batch);

        ServiceResponse<String> reply = client.executeCommands("kie1", payload);
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

        Method setter = messageClass.getMethod("setText", String.class);
        setter.invoke(message, "HelloWorld");

        KieCommands kcmd = ks.getCommands();
        Command<?> insert = kcmd.newInsert(message, "message");
        Command<?> fire = kcmd.newFireAllRules();
        BatchExecutionCommand batch = kcmd.newBatchExecution(Arrays.asList(insert, fire), "defaultKieSession");

        String payload = BatchExecutionHelper.newXStreamMarshaller().toXML(batch);

        String containerId = "command-script-container";
View Full Code Here

Examples of org.kie.api.command.KieCommands.newFireAllRules()

                    for (Entry<String, Object> inout : inouts.entrySet()) {
                        batch.add(cmds.newInsert(inout.getValue(), inout.getKey()));
                    }
                    List<Object> facts = getInputOnlyList(inputMessage, operation, session);
                    batch.add(cmds.newInsertElements(facts));
                    batch.add(cmds.newFireAllRules());
                    BatchExecutionCommand exec = cmds.newBatchExecution(batch, KnowledgeConstants.RESULT);
                    ExecutionResults results = session.getStateless().execute(exec);
                    for (String id : inouts.keySet()) {
                        expressionVariables.put(id, results.getValue(id));
                    }
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.