Package org.drools.command

Examples of org.drools.command.SetVariableCommandFromLastReturn


        return step;
    }
   
    public FluentStandardStep end(String name) {
        getSim().addCommand( new GetVariableCommand( KnowledgeBase.class.getName() ) );
        getSim().addCommand( new SetVariableCommandFromLastReturn( name ) );
        return step;
    }
View Full Code Here


    public FluentStandardStatefulKnowledgeSession newStatefulKnowledgeSession() {
        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption( ClockTypeOption.get( "pseudo" ) );
        getSim().addCommand( new NewStatefulKnowledgeSessionCommand( ksessionConf ) );            
        getSim().addCommand( new SetVariableCommandFromLastReturn( ContextManager.ROOT, StatefulKnowledgeSession.class.getName() ));       

        return new FluentStandardStatefulKnowledgeSessionImpl(getSim(), step);
    }
View Full Code Here

        return simulationFluent.getActiveKnowledgeSessionId();
    }
   
    public SimulationFluent end(String context, String name) {
        addCommand(new GetVariableCommand(StatefulKnowledgeSession.class.getName()));
        addCommand(new SetVariableCommandFromLastReturn(context, name));
        return simulationFluent;
    }
View Full Code Here

        return simulationFluent;
    }
   
    public SimulationFluent end(String name) {
        addCommand(new GetVariableCommand(StatefulKnowledgeSession.class.getName()));
        addCommand(new SetVariableCommandFromLastReturn(name));
        return simulationFluent;
    }
View Full Code Here

    public SimulationFluent end() {
        return simulationFluent;
    }

    public StatefulKnowledgeSessionSimFluent set(String name) {
        addCommand(new SetVariableCommandFromLastReturn(null, name));
        return this;
    }
View Full Code Here

        SimulationStepImpl step1 = new SimulationStepImpl(path, 0);
        List<Command> cmds1 = step1.getCommands();

        cmds1.add(new NewKnowledgeBuilderCommand( ) );
        cmds1.add(new SetVariableCommandFromLastReturn("path1",
                KnowledgeBuilder.class.getName()));

        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());

        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption(ClockTypeOption.get("pseudo"));

        cmds1.add(new NewStatefulKnowledgeSessionCommand(ksessionConf));
        cmds1.add( new SetVariableCommandFromLastReturn( "path1",
                                          StatefulKnowledgeSession.class.getName() ) );

        List list = new ArrayList();

        cmds1.add(new SetGlobalCommand("list",
View Full Code Here

        SimulationStepImpl step11 = new SimulationStepImpl(path1,
                0);
        List<Command> cmds11 = step11.getCommands();

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

        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());

        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption(ClockTypeOption.get("pseudo"));

        cmds11.add(new NewStatefulKnowledgeSessionCommand(ksessionConf));
        cmds11.add(new SetVariableCommandFromLastReturn(World.ROOT,
                StatefulKnowledgeSession.class.getName()));

        List list = new ArrayList();
        cmds11.add(new SetGlobalCommand("list",
                list));
View Full Code Here

        List<Step> steps = new ArrayList<Step>();

        List<Command> cmds = new ArrayList<Command>();

        cmds.add( new NewKnowledgeBuilderCommand( null ) );
        cmds.add( new SetVariableCommandFromLastReturn( "path1",
                                          KnowledgeBuilder.class.getName() ) );

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

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

        cmds.add( new KnowledgeBaseAddKnowledgePackagesCommand() );

        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption( ClockTypeOption.get( "pseudo" ) );

        cmds.add( new NewStatefulKnowledgeSessionCommand( ksessionConf ) );
        cmds.add( new SetVariableCommandFromLastReturn( "path1",
                                          StatefulKnowledgeSession.class.getName() ) );

        List list = new ArrayList();

        cmds.add( new SetGlobalCommand( "list",
View Full Code Here

        List<Step> steps = new ArrayList<Step>();

        List<Command> cmds = new ArrayList<Command>();

        cmds.add( new NewKnowledgeBuilderCommand( null ) );
        cmds.add( new SetVariableCommandFromLastReturn( ContextManager.ROOT,
                                          KnowledgeBuilder.class.getName() ) );

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

        cmds.add( new NewKnowledgeBaseCommand( null ) );

        cmds.add( new SetVariableCommandFromLastReturn( ContextManager.ROOT,
                                          KnowledgeBase.class.getName() ) );

        cmds.add( new KnowledgeBaseAddKnowledgePackagesCommand() );

        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption( ClockTypeOption.get( "pseudo" ) );

        cmds.add( new NewStatefulKnowledgeSessionCommand( ksessionConf ) );
        cmds.add( new SetVariableCommandFromLastReturn( ContextManager.ROOT,
                                          StatefulKnowledgeSession.class.getName() ) );

        List list = new ArrayList();

        cmds.add( new SetGlobalCommand( "list",
View Full Code Here

TOP

Related Classes of org.drools.command.SetVariableCommandFromLastReturn

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.