Package org.drools.runtime

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


                           processInstance.getState() );
        ksession.getWorkItemManager().registerWorkItemHandler( workName,
                                                               null );

        try {
            ksession.abortProcessInstance( processInstanceId );
            Assert.fail( "should fail if WorkItemHandler for" + workName + "is not registered" );
        } catch ( WorkItemHandlerNotFoundException wihnfe ) {

        }
View Full Code Here


        assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
        Thread.sleep(1000);
    assertProcessInstanceActive(processInstance.getId(), ksession);
        Thread.sleep(1000);
    assertProcessInstanceActive(processInstance.getId(), ksession);
    ksession.abortProcessInstance(processInstance.getId());
        Thread.sleep(1000);
    }

    public void testTimerBoundaryEventInterrupting() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-TimerBoundaryEventInterrupting.bpmn2");
View Full Code Here

        // now wait for 1 second for timer to trigger
        Thread.sleep(1000);
    assertProcessInstanceActive(processInstance.getId(), ksession);
        Thread.sleep(1000);
    assertProcessInstanceActive(processInstance.getId(), ksession);
    ksession.abortProcessInstance(processInstance.getId());
        Thread.sleep(1000);
    }

    public void testIntermediateCatchEventCondition() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-IntermediateCatchEventCondition.bpmn2");
View Full Code Here

    public Object execute(Context context) {
        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
    if (processInstanceId == null) {
      return null;
    }
    ksession.abortProcessInstance(processInstanceId);
    return null;
  }

  public String toString() {
    return "session.abortProcessInstance(" + processInstanceId + ");";
View Full Code Here

    public Object execute(Context context) {
        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
        if (processInstanceId == null) {
            return null;
        }
        ksession.abortProcessInstance(processInstanceId);
        return null;
    }

    public String toString() {
        return "session.abortProcessInstance(" + processInstanceId + ");";
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.