cancel
Showing results for 
Search instead for 
Did you mean: 

Main process not getting ended after sub process ends

maulee17
Champ in-the-making
Champ in-the-making
Hi,

I have a process definition having 3 sub processes, in a main process. When the last sub process ends, it has a sequence flow to from that sub process to end event of main process, which should terminate the flow, which is not happening right now.
The sub process ends but main process is not getting terminated.


Thanks & Regards,
Maulee.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
It should terminate the process then. Can you post your xml, or even better post a failing unit test?

maulee17
Champ in-the-making
Champ in-the-making
I debugged and found that it reaches to end event of the main process,but not deleting that instance. (not deleting I means I can still  see that process instance in activiti explorer Process -> MyInstances ) .
In general scenarios, instance get deleted, after retries.

The Main process end event also has 2 other in coming sequence flows.

Please let me know if I am doing something wrong. Process def xml cant be shared due to organization policies.

Thanks & Regards,
Maulee.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Please let me know if I am doing something wrong.
That is an option, or you have the wrong expectations.

Process def xml cant be shared due to organization policies.
Then either create a minimal testcase that does not expose company secrets or you are out of luck with getting any help… Sorry… We are not clairvoyant or Harry Potter

maulee17
Champ in-the-making
Champ in-the-making
Here is the process definition xml and png file.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="process1" name="process1">
    <startEvent id="startevent1" name="Start"></startEvent>
    <serviceTask id="servicetask1" name="Service Task" activiti:delegateExpression="${TestDelegate}"></serviceTask>
    <subProcess id="subprocess1" name="Sub Process">
      <startEvent id="startevent2" name="Start"></startEvent>
      <serviceTask id="servicetask2" name="Service Task" activiti:delegateExpression="${TestDelegate}"></serviceTask>
      <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
      <endEvent id="endevent1" name="ErrorEnd">
        <errorEventDefinition errorRef="projectSubProcessExceptions"></errorEventDefinition>
      </endEvent>
      <endEvent id="endevent2" name="End"></endEvent>
      <sequenceFlow id="flow3" name="" sourceRef="startevent2" targetRef="servicetask2"></sequenceFlow>
      <sequenceFlow id="flow4" name="" sourceRef="servicetask2" targetRef="exclusivegateway1"></sequenceFlow>
      <sequenceFlow id="flow5" name="" sourceRef="exclusivegateway1" targetRef="endevent1"></sequenceFlow>
      <sequenceFlow id="flow6" name="" sourceRef="exclusivegateway1" targetRef="endevent2"></sequenceFlow>
    </subProcess>
    <boundaryEvent id="boundaryerror1" name="" cancelActivity="false" attachedToRef="subprocess1">
      <errorEventDefinition errorRef="projectSubProcessExceptions"></errorEventDefinition>
    </boundaryEvent>
    <boundaryEvent id="boundarytimer1" cancelActivity="false" attachedToRef="subprocess1">
      <timerEventDefinition>
        <timeDuration>PT1M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="servicetask3" name="Service Task" activiti:delegateExpression="${TestDelegate}"></serviceTask>
    <endEvent id="endevent3" name="End"></endEvent>
    <serviceTask id="servicetask4" name="Handle Exception" activiti:delegateExpression="${TestDelegate}"></serviceTask>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <serviceTask id="mailtask1" name="Mail Task" activiti:type="mail">
      <extensionElements></extensionElements>
    </serviceTask>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="servicetask1" targetRef="subprocess1"></sequenceFlow>
    <sequenceFlow id="flow8" name="" sourceRef="subprocess1" targetRef="servicetask3"></sequenceFlow>
    <sequenceFlow id="flow9" name="" sourceRef="servicetask3" targetRef="endevent3"></sequenceFlow>
    <sequenceFlow id="flow10" name="" sourceRef="boundaryerror1" targetRef="servicetask4"></sequenceFlow>
    <sequenceFlow id="flow12" name="check no. retry" sourceRef="servicetask4" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow13" name="" sourceRef="exclusivegateway2" targetRef="boundarytimer1"></sequenceFlow>
    <sequenceFlow id="flow14" name="" sourceRef="boundarytimer1" targetRef="startevent2"></sequenceFlow>
    <sequenceFlow id="flow15" name="reached max retry" sourceRef="exclusivegateway2" targetRef="mailtask1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_process1">
    <bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="90" y="90"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1">
        <omgdc:Bounds height="55" width="105" x="55" y="180"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1" isExpanded="true">
        <omgdc:Bounds height="205" width="401" x="270" y="105"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">
        <omgdc:Bounds height="35" width="35" x="290" y="195"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2">
        <omgdc:Bounds height="55" width="105" x="390" y="185"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40" width="40" x="520" y="192"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="590" y="140"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35" width="35" x="590" y="245"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="325" y="212"></omgdi:waypoint>
        <omgdi:waypoint x="390" y="212"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="495" y="212"></omgdi:waypoint>
        <omgdi:waypoint x="520" y="212"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="540" y="192"></omgdi:waypoint>
        <omgdi:waypoint x="540" y="157"></omgdi:waypoint>
        <omgdi:waypoint x="590" y="157"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="540" y="232"></omgdi:waypoint>
        <omgdi:waypoint x="540" y="262"></omgdi:waypoint>
        <omgdi:waypoint x="590" y="262"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape bpmnElement="boundaryerror1" id="BPMNShape_boundaryerror1">
        <omgdc:Bounds height="30" width="30" x="450" y="90"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer1" id="BPMNShape_boundarytimer1">
        <omgdc:Bounds height="30" width="30" x="293" y="130"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3">
        <omgdc:Bounds height="55" width="105" x="412" y="370"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">
        <omgdc:Bounds height="35" width="35" x="447" y="460"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask4" id="BPMNShape_servicetask4">
        <omgdc:Bounds height="55" width="105" x="412" y="11"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40" width="40" x="287" y="18"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mailtask1" id="BPMNShape_mailtask1">
        <omgdc:Bounds height="55" width="105" x="124" y="11"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="107" y="125"></omgdi:waypoint>
        <omgdi:waypoint x="107" y="180"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="160" y="207"></omgdi:waypoint>
        <omgdi:waypoint x="270" y="207"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="671" y="207"></omgdi:waypoint>
        <omgdi:waypoint x="464" y="310"></omgdi:waypoint>
        <omgdi:waypoint x="464" y="370"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="464" y="425"></omgdi:waypoint>
        <omgdi:waypoint x="464" y="460"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="465" y="120"></omgdi:waypoint>
        <omgdi:waypoint x="464" y="68"></omgdi:waypoint>
        <omgdi:waypoint x="517" y="38"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="412" y="38"></omgdi:waypoint>
        <omgdi:waypoint x="327" y="38"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="-47" y="-20"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="307" y="58"></omgdi:waypoint>
        <omgdi:waypoint x="308" y="130"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="308" y="160"></omgdi:waypoint>
        <omgdi:waypoint x="307" y="195"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="287" y="38"></omgdi:waypoint>
        <omgdi:waypoint x="229" y="38"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="-48" y="-27"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Please read http://forums.activiti.org/en/viewtopic.php?f=6&t=4645 and act accordingly (creating an issue mighht not be needed, but the testcase itself is)
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.