cancel
Showing results for 
Search instead for 
Did you mean: 

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

fahad1
Champ in-the-making
Champ in-the-making
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>

12 REPLIES 12

fahad1
Champ in-the-making
Champ in-the-making
thanks so simple, can you tel me why we need intermediate signals/msgs between pools??

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I did not notice pools in your process design.
I personally do not use signal/msgs to manage process flow between pools.

Regards
Martin

fahad1
Champ in-the-making
Champ in-the-making
by your solution do you mean that if we have 5 persons involved each for different task then:
start>task1 by person A>task2 by personB>task3 by personC>task4 by personD>task5 by personE > end.