Package org.drools.command

Examples of org.drools.command.NewKnowledgeBaseCommand


                                                                 null,
                                                                 null, null ) );

        cmds.add( new SetVariableCommand( "ROOT",
                                          "kbase",
                                          new NewKnowledgeBaseCommand( null ) ) );

        cmds.add( new KnowledgeContextResolveFromContextCommand( new KnowledgeBaseAddKnowledgePackagesCommand(),
                                                                 "kbuilder",
                                                                 "kbase",
                                                                 null, null ) );
View Full Code Here


                                                                 null,
                                                                 null, null ) );

        cmds.add( new SetVariableCommand( "path1",
                                          "kbase",
                                          new NewKnowledgeBaseCommand( null ) ) );

        cmds.add( new KnowledgeContextResolveFromContextCommand( new KnowledgeBaseAddKnowledgePackagesCommand(),
                                                                 "kbuilder",
                                                                 "kbase",
                                                                 null, null ) );
View Full Code Here

        return new FluentStandardKnowledgeBuilderImpl( getSim(),
                                                       this );
    }

    public FluentStandardKnowledgeBase newKnowledgeBase() {
        getSim().addCommand( new NewKnowledgeBaseCommand( null ) );
        getSim().addCommand( new SetVariableCommandFromLastReturn( KnowledgeBase.class.getName() ) );

        return new FluentStandardKnowledgeBaseImpl( getSim(),
                                                    this );
    }
View Full Code Here

        ((PathImpl)path).setSteps( steps );       
       
        newStep( 0l );


        addCommand( new NewKnowledgeBaseCommand(null) );       
        addCommand( new SetVariableCommandFromLastReturn( KnowledgeBase.class.getName() ));
       
       
        addCommand( new NewKnowledgeBuilderCommand( null, KnowledgeBase.class.getName() ) );
        addCommand( new SetVariableCommandFromLastReturn( KnowledgeBuilder.class.getName() ));
View Full Code Here

        Message msg = new Message( messageSession.getSessionId(),
                                   messageSession.counter.incrementAndGet(),
                                   false,
                                   new SetVariableCommand( "__TEMP__",
                                                           localId,
                                                           new NewKnowledgeBaseCommand( null ) ) );
        try {
            Object object = client.write( msg ).getPayload();

            if ( !(object instanceof FinishedCommand) ) {
                throw new RuntimeException( "Response was not correctly ended" );
View Full Code Here

        }

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBaseCommand( conf ) )} ) );
        ConversationManager connm = this.grid.get( ConversationManager.class );
        ConversationUtil.sendMessage( connm,
                                      (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        }

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommandFromCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBaseCommand( conf ) )} ) );
        ConversationManager connm = this.grid.get( ConversationManager.class );
        ConversationUtil.sendMessage( connm,
                                      (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        }

        CommandImpl cmd = new CommandImpl( "execute",
                                           Arrays.asList( new Object[]{new SetVariableCommand( "__TEMP__",
                                                                                                localId,
                                                                                                new NewKnowledgeBaseCommand( conf ) )} ) );
        ConversationManager connm = this.grid.get( ConversationManager.class );
        ConversationUtil.sendMessage( connm,
                                      (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
                                      this.gsd.getId(),
                                      cmd );
View Full Code Here

        cmds1.add(new KnowledgeBuilderAddCommand(ResourceFactory.newByteArrayResource(str.getBytes()),
                ResourceType.DRL,
                null));

        cmds1.add(new NewKnowledgeBaseCommand(null));
        cmds1.add(new SetVariableCommandFromLastReturn("path1",
                KnowledgeBase.class.getName()));

        cmds1.add(new KnowledgeBaseAddKnowledgePackagesCommand());
View Full Code Here

        cmds11.add(new KnowledgeBuilderAddCommand(ResourceFactory.newByteArrayResource(str.getBytes()),
                ResourceType.DRL,
                null));

        cmds11.add(new NewKnowledgeBaseCommand(null));

        cmds11.add(new SetVariableCommandFromLastReturn(World.ROOT,
                KnowledgeBase.class.getName()));

        cmds11.add(new KnowledgeBaseAddKnowledgePackagesCommand());
View Full Code Here

TOP

Related Classes of org.drools.command.NewKnowledgeBaseCommand

Copyright © 2018 www.massapicom. 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.