Package org.kie.api.runtime

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


        }

        assertEquals( 1,
                      list.size() );

        ksession.halt();
    }

    @Test
    public void testDateEffective() throws Exception {
        // read in the source
View Full Code Here


        Thread.sleep(1000);

        assertEquals( 1,
                      list.size() );

        ksession.halt();
    }

    @Test
    public void testDateEffective() throws Exception {
        // read in the source
View Full Code Here

                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

            ksession.halt();

            if (deleteIndex % 10 == 0) {
                assertEquals(3, results.size());
                assertTrue(results.containsAll(asList("R1", "R2", "R3")));
            } else {
View Full Code Here

            }

            assertTrue(success);
        }

        ksession.halt();
    }

    public static class EPManipulator4 implements Callable<Boolean> {

        private static final Random RANDOM = new Random();
View Full Code Here

        }

        assertEquals( 1,
                      list.size() );

        ksession.halt();
    }

    @Test
    public void testDateEffective() throws Exception {
        // read in the source
View Full Code Here

        }

        assertEquals( 1,
                      list.size() );

        ksession.halt();
    }

    @Test
    public void testDateEffective() throws Exception {
        // read in the source
View Full Code Here

        SwitchYardServiceTaskHandler ssth = new SwitchYardServiceTaskHandler();
        ssth.setProcessRuntime(ksession);
        ssth.setInvoker(new SwitchYardServiceInvoker(serviceDomain));
        ksession.getWorkItemManager().registerWorkItemHandler(ssth.getName(), ssth);
        ksession.startProcess("CallService");
        ksession.halt();
        ksession.dispose();
        Assert.assertEquals("message handled", holder.getValue());
    }

    @BPM(processId="AccessAttachment", manifest=@Manifest(resources=@Resource(location=ACCESS_ATTACHMENT_BPMN, type="BPMN2")))
View Full Code Here

            Assert.assertNotNull(he);
            Assert.assertEquals("BOOM!", he.getMessage());
        } else {
            Assert.assertNull(he);
        }
        ksession.halt();
        ksession.dispose();
    }

    @Test
    public void testFaultEventProcessSuccess() throws Exception {
View Full Code Here

            Assert.assertNotNull(he);
            Assert.assertEquals("BOOM!", he.getMessage());
        } else {
            Assert.assertNull(he);
        }
        ksession.halt();
        ksession.dispose();
    }

    @Test
    public void testFaultBoundaryProcessSuccess() throws Exception {
View Full Code Here

        ssth.setInvoker(new SwitchYardServiceInvoker(serviceDomain));
        ksession.getWorkItemManager().registerWorkItemHandler(ssth.getName(), ssth);
        WorkflowProcessInstance wpi = (WorkflowProcessInstance)ksession.startProcess("FaultBoundaryProcess");
        String output = (String)wpi.getVariable("TestOutput");
        Assert.assertEquals(bomb ? "Failure" : "Success", output);
        ksession.halt();
        ksession.dispose();
    }

    @BPM(processId="ReuseHandler", manifest=@Manifest(resources=@Resource(location=REUSE_HANDLER_BPMN, type="BPMN2")),
            workItemHandlers=@WorkItemHandler(name="ReuseHandler", value=ReuseHandler.class))
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.