Package org.kie.api.runtime

Examples of org.kie.api.runtime.KieSession.startProcess()


    public void testPersistenceWorkItemsUserTransaction() throws Exception {

        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService2");

        int sessionId = service.getId();
        ProcessInstance processInstance = service.startProcess("org.drools.test.TestProcess");
        log.info("Started process instance {}",
                processInstance.getId());

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
View Full Code Here


    public void testPersistenceSubProcess() {
        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService2");

        int sessionId = service.getId();

        RuleFlowProcessInstance processInstance = (RuleFlowProcessInstance) service.startProcess("org.drools.test.ProcessSubProcess");
        log.info("Started process instance {}",
                processInstance.getId());
        long processInstanceId = processInstance.getId();

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
View Full Code Here

        log.info("---> create new SingleSessionCommandService");

        int sessionId = service.getId();
        log.info("---> created SingleSessionCommandService id: " + sessionId);

        ProcessInstance processInstance = service.startProcess("org.drools.test.TestProcess");
        log.info("Started process instance {}", processInstance.getId());

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
        assertNotNull(workItem);
View Full Code Here

        KieBase kbase = (KieBase) ctx.getBean("kb_persistence");
        //KieSession service = kbase.newKieSession();//(KieSession) ctx.getBean("jpaSingleSessionCommandService");
        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService");

        int sessionId = service.getId();
        ProcessInstance processInstance = service.startProcess("org.drools.test.TestProcess");
        log.info("Started process instance {}",
                processInstance.getId());

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
View Full Code Here

        //KieSession service = kbase.newKieSession();//(KieSession) ctx.getBean("jpaSingleSessionCommandService");
        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService");

        int sessionId = service.getId();

        RuleFlowProcessInstance processInstance = (RuleFlowProcessInstance) service.startProcess("org.drools.test.ProcessSubProcess");
        log.info("Started process instance {}",
                processInstance.getId());
        long processInstanceId = processInstance.getId();

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
View Full Code Here

        // create REST request
        KieSession ksession = engine.getKieSession();
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("employee", taskUserId);
        ProcessInstance processInstance = ksession.startProcess("evaluation", params);
        assertNotNull( processInstance );

        logger.debug("Started process instance: " + processInstance + " "
                + (processInstance == null ? "" : processInstance.getId()));
View Full Code Here

        // create JMS request
        KieSession ksession = engine.getKieSession();
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("employee", taskUserId);
        ProcessInstance processInstance = ksession.startProcess("evaluation", params);
        assertNotNull( processInstance );

        logger.debug("Started process instance: " + processInstance + " "
                + (processInstance == null ? "" : processInstance.getId()));
View Full Code Here

        assertEquals(3, listenersA.size());

        Collection<RuleRuntimeEventListener> listenersR = service.getRuleRuntimeEventListeners();
        assertEquals(1, listenersR.size());

        RuleFlowProcessInstance processInstance = (RuleFlowProcessInstance) service.startProcess("org.drools.test.ProcessSubProcess");
        log.info("Started process instance {}",
                processInstance.getId());
        long processInstanceId = processInstance.getId();

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
View Full Code Here

        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService");

        int sessionId = service.getId();
        log.info("---> created SingleSessionCommandService id: " + sessionId);

        ProcessInstance processInstance = service.startProcess("org.drools.test.ProcessTimer");
        long procId = processInstance.getId();
        log.info("---> Started ProcessTimer id: {}",
                procId);

        service.dispose();
View Full Code Here

        //KieSession service = kBase.newKieSession();//(KieSession) ctx.getBean("jpaSingleSessionCommandService");
        KieSession service = (KieSession) ctx.getBean("jpaSingleSessionCommandService");

        int sessionId = service.getId();

        ProcessInstance processInstance = service.startProcess("org.drools.test.ProcessTimer2");
        log.info("Started process instance {}",
                processInstance.getId());

        Thread.sleep(2000);
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.