Package org.drools.runtime

Examples of org.drools.runtime.StatefulKnowledgeSession.dispose()


       
        StatefulKnowledgeSession crmPersistentSession = createSession(kbase);

        crmPersistentSession.startProcess(processId);

        crmPersistentSession.dispose();
    }

    @Test
    public void createProcessStartItDisposeAndLoadItAgain() {
        String processId = "minimalProcess";
View Full Code Here


                session.setGlobal("mavenSession", mavenSession);
                session.setGlobal("mavenProject", project);
                session.insert(bundleList);
                session.fireAllRules();
            } finally {
                session.dispose();
            }
        }
    }

    private KnowledgeBase createKnowledgeBase(File[] files) throws MojoExecutionException {
View Full Code Here

            s.fireAllRules();
            System.out.println(fact1.toString());
//      for (Object x : facts) {
//        System.out.println(x);
//      }
            s.dispose();
        }
        ResourceFactory.getResourceChangeNotifierService().stop();
        ResourceFactory.getResourceChangeScannerService().stop();
    }
View Full Code Here

                  processInstance.getId() );

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
        assertNotNull( workItem );
        service.dispose();

        Environment env = KnowledgeBaseFactory.newEnvironment();
        env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,
                 ctx.getBean( "myEmf" ) );
        env.set( EnvironmentName.TRANSACTION_MANAGER,
View Full Code Here

                                                       kbase1,
                                                       null,
                                                       env );
        processInstance = service.getProcessInstance( processInstance.getId() );
        assertNotNull( processInstance );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
View Full Code Here

        service.getWorkItemManager().completeWorkItem( workItem.getId(),
                                                       null );

        workItem = handler.getWorkItem();
        assertNotNull( workItem );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
View Full Code Here

                                                       kbase1,
                                                       null,
                                                       env );
        processInstance = service.getProcessInstance( processInstance.getId() );
        assertNotNull( processInstance );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
View Full Code Here

        service.getWorkItemManager().completeWorkItem( workItem.getId(),
                                                       null );

        workItem = handler.getWorkItem();
        assertNotNull( workItem );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
View Full Code Here

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
        processInstance = service.getProcessInstance( processInstance.getId() );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
View Full Code Here

        service.getWorkItemManager().completeWorkItem( workItem.getId(),
                                                       null );

        workItem = handler.getWorkItem();
        assertNull( workItem );
        service.dispose();

        service = kstore.loadStatefulKnowledgeSession( sessionId,
                                                       kbase1,
                                                       null,
                                                       env );
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.