Examples of Agenda


Examples of org.kie.api.runtime.rule.Agenda

        return (Map<String, Channel>) this.commandService.execute( new GetChannelsCommand() );
    }

    public Agenda getAgenda() {
        if ( agenda == null ) {
            agenda = new Agenda() {
                public void clear() {
                    ClearAgendaCommand command = new ClearAgendaCommand();
                    commandService.execute( command );
                }
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

                                                            0,
                                                            buildContext );

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Agenda agenda = ksession.getAgenda();

        final Consequence consequence = new Consequence() {
            private static final long serialVersionUID = 510l;

            public void evaluate(KnowledgeHelper knowledgeHelper,
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

                                                            0,
                                                            buildContext );

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Agenda agenda = ksession.getAgenda();

        final Consequence consequence = new Consequence() {
            private static final long serialVersionUID = 510l;

            public void evaluate(KnowledgeHelper knowledgeHelper,
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

                                                            rule1.getLhs(),
                                                            0,
                                                            buildContext );
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Agenda agenda = ksession.getAgenda();

        final Consequence consequence = new Consequence() {
            private static final long serialVersionUID = 510l;

            public void evaluate(KnowledgeHelper knowledgeHelper,
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

                                                            0,
                                                            buildContext );

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Agenda agenda = ksession.getAgenda();

        final Consequence consequence = new Consequence() {
            private static final long serialVersionUID = 510l;

            public void evaluate(KnowledgeHelper knowledgeHelper,
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

                                                            rule1.getLhs(),
                                                            0,
                                                            buildContext );
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Agenda agenda = ksession.getAgenda();

        final Consequence consequence = new Consequence() {
            private static final long serialVersionUID = 510l;

            public void evaluate(KnowledgeHelper knowledgeHelper,
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

        return (Map<String, Channel>) this.commandService.execute( new GetChannelsCommand() );
    }

    public Agenda getAgenda() {
        if ( agenda == null ) {
            agenda = new Agenda() {
                public void clear() {
                    ClearAgendaCommand command = new ClearAgendaCommand();
                    commandService.execute( command );
                }
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

        return (Map<String, Channel>) this.commandService.execute( new GetChannelsCommand() );
    }

    public Agenda getAgenda() {
        if ( agenda == null ) {
            agenda = new Agenda() {
                public void clear() {
                    ClearAgendaCommand command = new ClearAgendaCommand();
                    commandService.execute( command );
                }
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

        List<Integer> list = new ArrayList<Integer>();
        kieSession.setGlobal( "list", list );

        FactHandle handle = kieSession.insert( 42 );

        Agenda agenda = kieSession.getAgenda();
        agenda.getAgendaGroup("two").setFocus();
        agenda.getAgendaGroup("one").setFocus();

        kieSession.fireAllRules();
        assertEquals( Arrays.asList( 42 ), list );

        kieSession.delete( handle );

        kieSession.insert( 99 );

        agenda.getAgendaGroup("two").setFocus();
        agenda.getAgendaGroup("one").setFocus();

        kieSession.fireAllRules();
        assertEquals( Arrays.asList( 42, 99 ), list );
    }
View Full Code Here

Examples of org.kie.api.runtime.rule.Agenda

        kieSession.setGlobal( "list", list );

        FactHandle iFH = kieSession.insert( 42 );
        FactHandle sFH = kieSession.insert( "42" );

        Agenda agenda = kieSession.getAgenda();
        agenda.getAgendaGroup("three").setFocus();
        agenda.getAgendaGroup("two").setFocus();
        agenda.getAgendaGroup("one").setFocus();

        kieSession.fireAllRules();
        assertEquals( Arrays.asList( 42 ), list );

        //kieSession.delete( iFH );
        kieSession.delete( sFH );

        kieSession.insert( 99 );
        kieSession.insert( "99" );

        agenda.getAgendaGroup("three").setFocus();
        agenda.getAgendaGroup("two").setFocus();
        agenda.getAgendaGroup("one").setFocus();

        kieSession.fireAllRules();
        assertEquals( Arrays.asList( 42, 99 ), list );
    }
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.