Package org.drools.command

Examples of org.drools.command.ExecuteCommand


       
        List cmds = new ArrayList();
        cmds.add(new InsertObjectCommand(new String("Hi!"), "handle"));
                                                                                                                
        BatchExecutionCommand batchCmd = CommandFactory.newBatchExecution(cmds, "kresults");
        ExecuteCommand execCmd = new ExecuteCommand(batchCmd,true);
        KnowledgeContextResolveFromContextCommand resolveFromContextCommand = new KnowledgeContextResolveFromContextCommand(execCmd,  
                                                                                        null,null,"ksession","localResults");
        ExecutionResults results = (ExecutionResults)commandService.execute(resolveFromContextCommand);
       
        assertNotNull(results);
       
        assertNotNull(results.getFactHandle("handle"));
       
        assertTrue(((DefaultFactHandle)results.getFactHandle("handle")).isDisconnected());
       
       
       
        cmds = new ArrayList();
        cmds.add(new InsertObjectCommand(new String("Hi!"), "handle"));
        batchCmd = CommandFactory.newBatchExecution(cmds, "kresults");
        execCmd = new ExecuteCommand(batchCmd);
        resolveFromContextCommand = new KnowledgeContextResolveFromContextCommand(execCmd,  
                                                                                        null,null,"ksession","localResults");
        results = (ExecutionResults)commandService.execute(resolveFromContextCommand);
       
        assertNotNull(results);
View Full Code Here


        QueryCommand queryCommand = new QueryCommand("out", "myQuery", new Object[]{});
        SetVariableCommandFromCommand setVariableCmd = new SetVariableCommandFromCommand("__TEMP__", "query123", queryCommand);
        cmds.add(setVariableCmd);
       
        BatchExecutionCommand batchCmd = CommandFactory.newBatchExecution(cmds, "kresults");
        ExecuteCommand execCmd = new ExecuteCommand(batchCmd,true);
       
       
        KnowledgeContextResolveFromContextCommand resolveFromContextCommand = new KnowledgeContextResolveFromContextCommand(execCmd,
                null, null, "ksession", "localResults");
        ExecutionResults results = (ExecutionResults) commandService.execute(resolveFromContextCommand);
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public <T> T execute(Command<T> command) {
        return (T) this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public ExecutionResults execute(Command command) {
        return this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

        String kresultsId = "kresults_" + messageSession.getSessionId();

        Message msg = new Message( messageSession.getSessionId(),
                                   messageSession.counter.incrementAndGet(),
                                   false,
                                   new KnowledgeContextResolveFromContextCommand( new ExecuteCommand( commandId,
                                                                                                      command ),
                                                                                  null,
                                                                                  null,
                                                                                  instanceId,
                                                                                  kresultsId ) );
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public <T> T execute(Command<T> command) {
        return (T) this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public <T> T execute(Command<T> command) {
        return (T) this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public <T> T execute(Command<T> command) {
        return (T) this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public <T> T execute(Command<T> command) {
        return (T) this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

    public Environment getEnvironment() {
        return commandService.execute( new GetEnvironmentCommand() );
    }

    public ExecutionResults execute(Command command) {
        return this.commandService.execute( new ExecuteCommand( command ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.command.ExecuteCommand

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.