AnsweredAssumed Answered

Issue in timer boundary event  inside subprocess

Question asked by smurfs on May 31, 2015
Latest reply on Jun 15, 2015 by smurfs
Hi

I have created a timer boundary event  inside subprocess. But it is throwing the below error: Can you please help me on this.
<blockcode>
Exception in thread "main" org.activiti.engine.ActivitiException: Invalid destination 'boundarytimer1' of sequence flow 'flow12'
   at org.activiti.engine.impl.bpmn.parser.handler.SequenceFlowParseHandler.executeParse(SequenceFlowParseHandler.java:54)
   at org.activiti.engine.impl.bpmn.parser.handler.SequenceFlowParseHandler.executeParse(SequenceFlowParseHandler.java:32)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:79)
</blockcode>


<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="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="myProcess" name="myProcess" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <serviceTask id="StartEvent" name="Start event" activiti:expression="${eventService.startEvent()}"></serviceTask>
    <sequenceFlow id="flow1" sourceRef="StartEvent" targetRef="subprocess1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="StartEvent"></sequenceFlow>
    <subProcess id="subprocess1" name="Sub Process">
      <multiInstanceLoopCharacteristics isSequential="true">
        <loopCardinality>500000</loopCardinality>
      </multiInstanceLoopCharacteristics>
      <serviceTask id="servicetask2" name="Schedule" activiti:expression="${eventService.startEvent()}"></serviceTask>
      <endEvent id="endevent4" name="End"></endEvent>
      <sequenceFlow id="flow10" sourceRef="servicetask2" targetRef="endevent4"></sequenceFlow>
      <startEvent id="startevent2" name="Start"></startEvent>
      <serviceTask id="servicetask3" name="Pre Process" activiti:expression="${eventService.preprocess()}"></serviceTask>
      <sequenceFlow id="flow11" sourceRef="startevent2" targetRef="servicetask3"></sequenceFlow>
      <sequenceFlow id="flow12" sourceRef="servicetask3" targetRef="boundarytimer1"></sequenceFlow>
    </subProcess>
    <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="subprocess1" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>PT1S</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="EndEvent" name="EndEvent" activiti:expression="${eventService.completeEvent()}"></serviceTask>
    <sequenceFlow id="flow5" sourceRef="subprocess1" targetRef="EndEvent"></sequenceFlow>
    <endEvent id="endevent3" name="End"></endEvent>
    <sequenceFlow id="flow6" sourceRef="EndEvent" targetRef="endevent3"></sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="boundarytimer1" targetRef="servicetask2"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="180.0" y="210.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="StartEvent" id="BPMNShape_StartEvent">
        <omgdc:Bounds height="55.0" width="105.0" x="300.0" y="210.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1">
        <omgdc:Bounds height="285.0" width="551.0" x="90.0" y="320.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2">
        <omgdc:Bounds height="55.0" width="105.0" x="390.0" y="380.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">
        <omgdc:Bounds height="35.0" width="35.0" x="540.0" y="390.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">
        <omgdc:Bounds height="35.0" width="35.0" x="110.0" y="390.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3">
        <omgdc:Bounds height="55.0" width="105.0" x="190.0" y="380.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer1" id="BPMNShape_boundarytimer1">
        <omgdc:Bounds height="30.0" width="30.0" x="320.0" y="393.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="EndEvent" id="BPMNShape_EndEvent">
        <omgdc:Bounds height="55.0" width="105.0" x="690.0" y="420.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">
        <omgdc:Bounds height="35.0" width="35.0" x="840.0" y="430.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="352.0" y="265.0"></omgdi:waypoint>
        <omgdi:waypoint x="365.0" y="320.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="215.0" y="227.0"></omgdi:waypoint>
        <omgdi:waypoint x="300.0" y="237.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="495.0" y="407.0"></omgdi:waypoint>
        <omgdi:waypoint x="540.0" y="407.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="145.0" y="407.0"></omgdi:waypoint>
        <omgdi:waypoint x="190.0" y="407.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="295.0" y="407.0"></omgdi:waypoint>
        <omgdi:waypoint x="320.0" y="408.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="641.0" y="462.0"></omgdi:waypoint>
        <omgdi:waypoint x="690.0" y="447.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="795.0" y="447.0"></omgdi:waypoint>
        <omgdi:waypoint x="840.0" y="447.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="350.0" y="408.0"></omgdi:waypoint>
        <omgdi:waypoint x="390.0" y="407.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Regards
Smurfs

Outcomes