Package org.kie.runtime

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


        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


    public void testPersistenceWorkItemsUserTransaction() throws Exception {

        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

    public void testPersistenceSubProcess() {
        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

            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

    public void testPersistenceWorkItemsUserTransaction() throws Exception {

        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 = (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

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.