Examples of BatchExecutionCommand


Examples of org.drools.command.BatchExecutionCommand

    @Test @Ignore("TODO FIXME bz771193, bz771203 and bz771209")
    public void testInsert() throws Exception {
        Person p = new Person("Alice", "spicy meals", 30);
        List<Command> commands = new ArrayList<Command>();
        commands.add(CommandFactory.newInsert(p, "tempPerson"));
        BatchExecutionCommand command = CommandFactory.newBatchExecution(commands);
        String xmlCommand = template.requestBody("direct:marshall", command, String.class);

        String xml = template.requestBody("direct:test-session", xmlCommand, String.class);
        ExecutionResults res = (ExecutionResults) template.requestBody("direct:unmarshall", xml);
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

       
       
        List<Command> commands = new ArrayList<Command>();
            commands.add( new ApplyChangeSetRemoteCommand( this.id, rsrc ) );
            commands.add( CommandFactory.newFireAllRules() );
        BatchExecutionCommand batch = CommandFactory.newBatchExecution( commands );

        Command c = new KnowledgeContextResolveFromContextCommand( batch,
                null,
                null,
                id,
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

    public void applyChangeSet( ChangeSet cs ) {
        List<Command> commands = new ArrayList<Command>();
            commands.add( new ApplyChangeSetRemoteCommand( this.id, cs ) );
            commands.add( CommandFactory.newFireAllRules() );
        BatchExecutionCommand batch = CommandFactory.newBatchExecution( commands );

        Command c = new KnowledgeContextResolveFromContextCommand( batch,
                        null,
                        null,
                        id,
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

    @Test
    public void testInsert() throws Exception {
        Person p = new Person("Alice", "spicy meals", 30);
        List<Command> commands = new ArrayList<Command>();
        commands.add(CommandFactory.newInsert(p, "tempPerson"));
        BatchExecutionCommand command = CommandFactory.newBatchExecution(commands);
        String xmlCommand = template.requestBody("direct:marshall", command, String.class);

        String xml = template.requestBody("direct:test-session", xmlCommand, String.class);
        ExecutionResults res = (ExecutionResults) template.requestBody("direct:unmarshall", xml);
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

        Person john = new Person();
        john.setName("John Smith");

        List<Command> commands = new ArrayList<Command>();
        commands.add(CommandFactory.newInsert(john, "john"));
        BatchExecutionCommand batchExecutionCommand = CommandFactory.newBatchExecution(commands);

        ExecutionResults response = (ExecutionResults) template.requestBody("direct:test-with-session",
                batchExecutionCommand);
        assertTrue( "Expected valid ExecutionResults object",
                response != null );
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

    public void applyChangeSet( Resource rsrc ) {
        List<Command> commands = new ArrayList<Command>();
            commands.add( new ApplyChangeSetRemoteCommand( this.id, rsrc ) );
            commands.add( CommandFactory.newFireAllRules() );
        BatchExecutionCommand batch = CommandFactory.newBatchExecution( commands );

        dispatch( batch );
    }
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

    public void applyChangeSet( ChangeSet cs ) {
        List<Command> commands = new ArrayList<Command>();
            commands.add( new ApplyChangeSetRemoteCommand( this.id, cs ) );
            commands.add( CommandFactory.newFireAllRules() );
        BatchExecutionCommand batch = CommandFactory.newBatchExecution( commands );

        dispatch( batch );
    }
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

        FluentBatchExecution f = new FluentBatchExecutionImpl();

        List list = new ArrayList();

        // @formatter:off         
        BatchExecutionCommand cmd = f.newBatchExecution()
                .setGlobal("list", list)
                .insert(new Person("yoda", 150)).set("y")
                .insert(new Person("salaboy", 28)).set("x")
                .fireAllRules()
                .getBatchExecution();
View Full Code Here

Examples of org.drools.command.BatchExecutionCommand

        FluentBatchExecution f = new FluentBatchExecutionImpl();

        List list = new ArrayList();

        // @formatter:off         
        BatchExecutionCommand cmd = f.newBatchExecution()
                .setGlobal("list", list).set("myGlobal")
                .insert(new Person("yoda", 150)).set("y")
                .insert(new Person("salaboy", 28)).set("x")
                .fireAllRules()
                .getBatchExecution();
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommand

        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            BatchExecutionCommand cmds = (BatchExecutionCommand) object;
            if ( cmds.getLookup() != null ) {
                writer.startNode( "lookup" );
                writer.setValue( cmds.getLookup() );
                writer.endNode();
            }
            List<GenericCommand< ? >> list = cmds.getCommands();

            for ( GenericCommand cmd : list ) {
                writeItem( new CommandsObjectContainer( cmd ),
                           context,
                           writer );
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.