Examples of ExecutionResultImpl


Examples of org.drools.core.runtime.impl.ExecutionResultImpl

                                                                                 null,
                                                                                 ksession,
                                                                                 null );

        try {
            ((StatefulKnowledgeSessionImpl) ksession).startBatchExecution( new ExecutionResultImpl() );

            Object o = ((GenericCommand) command).execute( context );
            // did the user take control of fireAllRules, if not we will auto execute
            boolean autoFireAllRules = true;
            if ( command instanceof FireAllRulesCommand ) {
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

            writer.endNode();
        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            ExecutionResultImpl result = new ExecutionResultImpl();
            Map results = result.getResults();
            Map facts = result.getFactHandles();

            reader.moveDown();
            if ( "results".equals( reader.getNodeName() ) ) {
                while ( reader.hasMoreChildren() ) {
                    reader.moveDown();
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

                                                                                 null,
                                                                                 ksession,
                                                                                 null );

        try {
            ((StatefulKnowledgeSessionImpl) ksession).startBatchExecution( new ExecutionResultImpl() );

            Object o = ((GenericCommand) command).execute( context );
            // did the user take control of fireAllRules, if not we will auto execute
            boolean autoFireAllRules = true;
            if ( command instanceof FireAllRulesCommand ) {
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

            }
        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            ExecutionResultImpl result = new ExecutionResultImpl();
            Map results = result.getResults();
            Map facts = result.getFactHandles();

            while ( reader.hasMoreChildren() ) {
                reader.moveDown();
                if ( reader.getNodeName().equals( "result" ) ) {
                    String identifier = reader.getAttribute( "identifier" );
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

            writer.endNode();
        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            ExecutionResultImpl result = new ExecutionResultImpl();
            Map results = result.getResults();
            Map facts = result.getFactHandles();

            reader.moveDown();
            if ( "results".equals( reader.getNodeName() ) ) {
                while ( reader.hasMoreChildren() ) {
                    reader.moveDown();
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

    }

    public <T> T execute(Context context,
                         Command<T> command) {

        ExecutionResultImpl results = null;
        if ( context != null ) {
            results = (ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults();
        }

        if ( results == null ) {
            results = new ExecutionResultImpl();
        }

        if ( !(command instanceof BatchExecutionCommandImpl) ) {
            return (T) ((GenericCommand) command).execute( new FixedKnowledgeCommandContext( context,
                                                                                             null,
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

        } else {
            fired = ksession.fireAllRules();
        }

        if ( this.outIdentifier != null ) {
            ExecutionResultImpl results = ((StatefulKnowledgeSessionImpl)ksession).getExecutionResult();
            results.getResults().put(this.outIdentifier, fired);
        }
        return fired;
    }
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

    public Object execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();

        Object object = ksession.getGlobal( identifier );
        ExecutionResultImpl results = ((StatefulKnowledgeSessionImpl) ksession).getExecutionResult();
        if ( results != null ) {
            results.getResults().put( (this.outIdentifier != null) ? this.outIdentifier : this.identifier,
                                      object );
        }
        return object;
    }
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
       

        ksession = kbase.newStatefulKnowledgeSession();
        ExecutionResultImpl localKresults = new ExecutionResultImpl();
       
        ResolvingKnowledgeCommandContext kContext
            = new ResolvingKnowledgeCommandContext( new ContextImpl( "ksession", null ) );
        kContext.set("localResults", localKresults);
        kContext.set("ksession", ksession);
View Full Code Here

Examples of org.drools.core.runtime.impl.ExecutionResultImpl

    @Test @Ignore("phreak")
    public void executeCmdContextPropagationCastTest() {
         KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

        ksession = kbase.newStatefulKnowledgeSession();
        ExecutionResultImpl localKresults = new ExecutionResultImpl();
        WorldImpl worldImpl = new WorldImpl();
        worldImpl.createContext("__TEMP__");
        worldImpl.getContext("__TEMP__").set("__TEMP__", new ContextImpl("__TEMP__", null));
        ResolvingKnowledgeCommandContext kContext = new ResolvingKnowledgeCommandContext(worldImpl);
        kContext.set("localResults", localKresults);
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.