Examples of BatchExecutionCommandImpl


Examples of org.drools.command.runtime.BatchExecutionCommandImpl

                } else {
                    throw new IllegalArgumentException( "batch-execution does not support the child element name=''" + reader.getNodeName() + "' value=" + reader.getValue() + "'" );
                }
                reader.moveUp();
            }
            return new BatchExecutionCommandImpl( list,
                                              lookup );
        }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

    final Message in = exchange.getIn();
    final Object body = in.getBody();

    // TODO: add type checking to handle arrays of objects

    BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
    final List<GenericCommand<?>> commands = command.getCommands();
    commands.add(new InsertObjectCommand(body, "obj1"));
    commands.add(new FireAllRulesCommand());

    in.setBody(command);
  }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

    public Command newQuery(String identifier, String name, Object[] arguments) {
        return new QueryCommand(identifier, name, arguments);
    }

    public BatchExecutionCommand newBatchExecution(List<? extends Command> commands, String lookup) {
        return new BatchExecutionCommandImpl((List<GenericCommand<?>>) commands, lookup);
    }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            BatchExecutionCommandImpl cmds = (BatchExecutionCommandImpl) 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

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

                } else {
                    throw new IllegalArgumentException( "batch-execution does not support the child element name=''" + reader.getNodeName() + "' value=" + reader.getValue() + "'" );
                }
                reader.moveUp();
            }
            return new BatchExecutionCommandImpl( list,
                                              lookup );
        }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

    public Command newQuery(String identifier, String name, Object[] arguments) {
        return new QueryCommand(identifier, name, arguments);
    }

    public BatchExecutionCommand newBatchExecution(List<? extends Command> commands, String lookup) {
        return new BatchExecutionCommandImpl((List<GenericCommand<?>>) commands, lookup);
    }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

  public Command newQuery(String identifier, String name, Object[] arguments) {
    return new QueryCommand(identifier, name, arguments);
  }

  public BatchExecutionCommand newBatchExecution(List<? extends Command> commands, String lookup) {
    return new BatchExecutionCommandImpl((List<GenericCommand<?>>) commands, lookup);
  }
View Full Code Here

Examples of org.drools.command.runtime.BatchExecutionCommandImpl

        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            BatchExecutionCommandImpl cmds = (BatchExecutionCommandImpl) 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

Examples of org.drools.core.command.runtime.BatchExecutionCommandImpl

    }

    @Test
    public void testSessionInsert() throws Exception {

        BatchExecutionCommandImpl cmd = new BatchExecutionCommandImpl();
        cmd.setLookup( "ksession1" );
        cmd.getCommands().add( new InsertObjectCommand( new Person( "lucaz",
                                                                    25 ),
                                                        "person1" ) );
        cmd.getCommands().add( new InsertObjectCommand( new Person( "hadrian",
                                                                    25 ),
                                                        "person2" ) );
        cmd.getCommands().add( new InsertObjectCommand( new Person( "baunax",
                                                                    21 ),
                                                        "person3" ) );
        cmd.getCommands().add( new FireAllRulesCommand() );

        StringWriter xmlReq = new StringWriter();
        Marshaller marshaller = getJaxbContext().createMarshaller();
        marshaller.setProperty( "jaxb.formatted.output",
                                true );
View Full Code Here

Examples of org.drools.core.command.runtime.BatchExecutionCommandImpl

    }

    @Test
    public void testSessionGetObject() throws Exception {

        BatchExecutionCommandImpl cmd = new BatchExecutionCommandImpl();
        cmd.setLookup( "ksession1" );
        cmd.getCommands().add( new GetObjectCommand( new DefaultFactHandle( handle ),
                                                     "hadrian" ) );

        StringWriter xmlReq = new StringWriter();
        Marshaller marshaller = getJaxbContext().createMarshaller();
        marshaller.setProperty( "jaxb.formatted.output",
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.