AnsweredAssumed Answered

IntermediateCatchEvent :: not fired first time , but after re-running process it has been caught two times

Question asked by fahad1 on Feb 18, 2014
Latest reply on Feb 21, 2014 by fahad1
I am Experience a strange problem with IntermediateCatchEvent.

First run of process::  it is fired, but I am waiting so that it should be caught by task2. But it does not respond.

I again run the process to observe things

Second run of process: it is fired as in first run; and task2 get it twice ( runs twice) before termination.

Can anyone tel me what I am doing wrong.

<signal id="newMsg" name="newMsg"></signal>
  <process id="model5" isExecutable="true">
    <startEvent id="start" activiti:initiator="initiator"></startEvent>
    <userTask id="task1" name="task1" activiti:assignee="${initiator}">
       <extensionElements>
              <activiti:formProperty id="user" name="user" type="user" required="true"></activiti:formProperty>
              <activiti:formProperty id="name" name="name" type="string"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-16842953-EA94-42A2-B116-C68A98C85090" sourceRef="start" targetRef="task1"></sequenceFlow>
    <sequenceFlow id="sid-E2E35140-E272-4D5C-88A1-CD1039E6672B" sourceRef="task1" targetRef="serv1"></sequenceFlow>
    <sequenceFlow id="sid-9E02B791-B3C0-4B62-81BB-DA10424469DF" sourceRef="serv1" targetRef="s1"></sequenceFlow>
    <intermediateCatchEvent id="s1" name="s1">
      <signalEventDefinition signalRef="newMsg"></signalEventDefinition>
    </intermediateCatchEvent>
    <userTask id="task2" name="task2" activiti:assignee="${initiator}">
      <extensionElements>
        <activiti:formProperty id="prenom" name="prenom" type="string"></activiti:formProperty>
        <activiti:taskListener event="create" class="fitman.services.MyTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-BC7E1EC1-6839-4440-A123-4127C00FAAA3" sourceRef="s1" targetRef="task2"></sequenceFlow>
    <sequenceFlow id="sid-5A09EDC9-7B1F-4BAD-8D3B-DEB53A01768A" sourceRef="task2" targetRef="serv2"></sequenceFlow>
    <sequenceFlow id="sid-1DCF980A-AB99-4839-A5BA-8900A1AA0D51" sourceRef="serv2" targetRef="end"></sequenceFlow>
    <serviceTask id="serv1" name="serv1" activiti:class="com.services.MyService1"></serviceTask>
    <serviceTask id="serv2" name="serv2" activiti:class="com.services.MyService2"></serviceTask>
    <endEvent id="end" name="end"></endEvent>
  </process>

Outcomes