Package org.drools.guvnor.shared.simulation.command

Examples of org.drools.guvnor.shared.simulation.command.InsertBulkDataCommandModel


        simulationFluent.runSimulation();
    }

    private void addCommand(StatefulKnowledgeSessionSimFluent session, AbstractCommandModel abstractCommand) {
        if (abstractCommand instanceof InsertBulkDataCommandModel) {
            InsertBulkDataCommandModel command = (InsertBulkDataCommandModel) abstractCommand;
            session.insert("Hello world"); // TODO
        } if (abstractCommand instanceof FireAllRulesCommandModel) {
            FireAllRulesCommandModel command = (FireAllRulesCommandModel) abstractCommand;
            session.fireAllRules();
            for (AssertRuleFiredCommandModel assertRuleFiredCommand
                    : command.getAssertRuleFiredCommands()) {
                session.assertRuleFired(assertRuleFiredCommand.getRuleName(),
                        assertRuleFiredCommand.getFireCount());
            }
        } else {
            throw new IllegalStateException("The AbstractCommandModel class ("
View Full Code Here


        initWidget(uiBinder.createAndBindUi(this));
    }

    @UiHandler("addInsertBulkDataButton")
    protected void addInsertBulkData(ClickEvent event) {
        addCommand(new InsertBulkDataCommandModel(step));
    }
View Full Code Here

        simulationFluent.runSimulation();
    }

    private void addCommand(StatefulKnowledgeSessionSimFluent session, AbstractCommandModel abstractCommand) {
        if (abstractCommand instanceof InsertBulkDataCommandModel) {
            InsertBulkDataCommandModel command = (InsertBulkDataCommandModel) abstractCommand;
            session.insert("Hello world"); // TODO
        } if (abstractCommand instanceof FireAllRulesCommandModel) {
            FireAllRulesCommandModel command = (FireAllRulesCommandModel) abstractCommand;
            session.fireAllRules();
            for (AssertRuleFiredCommandModel assertRuleFiredCommand
                    : command.getAssertRuleFiredCommands()) {
                session.assertRuleFired(assertRuleFiredCommand.getRuleName(),
                        assertRuleFiredCommand.getFireCount());
            }
        } else {
            throw new IllegalStateException("The AbstractCommandModel class ("
View Full Code Here

TOP

Related Classes of org.drools.guvnor.shared.simulation.command.InsertBulkDataCommandModel

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.