Package org.kie.api.runtime

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


        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


        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

    public void testPersistenceTimer2() throws Exception {
        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

        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();
View Full Code Here

            logger.info( "\n\tSession id: " + sessionId + "\n" );

            ksession.getWorkItemManager().registerWorkItemHandler( "testWorkItemHandler",
                                                                   workItemHandler );

            ksession.startProcess( "timer-flow",
                                   null );
            Thread.sleep( 4000 );
            ksession.dispose();
        } catch ( Exception ex ) {
            throw new IllegalStateException("The endTheProcess method has been interrupted", ex);
View Full Code Here

                         myEntityMethods );
        parameters.put( "f",
                        myEntityOnlyFields );
        parameters.put( "z",
                         myVariableSerializable );
        WorkflowProcessInstance processInstance = (WorkflowProcessInstance) service.startProcess( "com.sample.ruleflow",
                                                                                                  parameters );
        log.info( "Started process instance {}",
                  processInstance.getId() );

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

        if (data != null) {
            for (Object o: data) {
                ksession.insert(o);
            }
        }
        ProcessInstance processInstance = (ProcessInstance) ksession.startProcess(processId, parameters);
        if ( this.outIdentifier != null ) {
            ((ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults()).getResults().put(this.outIdentifier,
                                                                                                               processInstance.getId());
        }
        return processInstance;
View Full Code Here

        RuntimeEngine engine = getRuntimeEngine();
        assertNotNull(engine);
       
        KieSession ksession = engine.getKieSession();
       
        ProcessInstance processInstance = ksession.startProcess("ScriptTask");
       
        assertProcessInstanceCompleted(processInstance.getId(), ksession);
    }
   
   
View Full Code Here

        assertNotNull(engine);
       
        KieSession ksession = engine.getKieSession();
        assertNotNull(ksession);
       
        ksession.startProcess("customtask");       
    }
   
    @Test
    public void testStartUserTaskProcess() {
       
View Full Code Here

        assertNotNull(engine);
       
        KieSession ksession = engine.getKieSession();
        assertNotNull(ksession);
       
        ProcessInstance processInstance = ksession.startProcess("org.jbpm.writedocument");
       
        // check the state of process instance
        processInstance = ksession.getProcessInstance(processInstance.getId());
        assertNotNull(processInstance);
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
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.