cancel
Showing results for 
Search instead for 
Did you mean: 

Recieve Task is not blocking execution

piyush_kaizen
Champ in-the-making
Champ in-the-making
Consider the following process definition

<process id="Timer1" name="Timer1" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <scriptTask id="scripttask1" name="Script Task" scriptFormat="javascript" activiti:autoStoreVariables="false">
      <script>java.lang.System.out.println("Testing");</script>
    </scriptTask>
    <sequenceFlow id="flow1003" sourceRef="scripttask1" targetRef="endevent1"></sequenceFlow>
    <receiveTask id="waitState" name="wait"></receiveTask>
    <sequenceFlow id="flow1004" sourceRef="startevent1" targetRef="waitState"></sequenceFlow>
    <sequenceFlow id="flow1005" sourceRef="waitState" targetRef="scripttask1"></sequenceFlow>
</process>

Why the receive task is not blocking execution ?
Script Task is getting executed immediately.
2 REPLIES 2

piyush_kaizen
Champ in-the-making
Champ in-the-making
  <process id="Timer1" name="Timer1" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <scriptTask id="scripttask1" name="Script Task" scriptFormat="javascript" activiti:autoStoreVariables="false">
      <script>java.lang.System.out.println("Testing");</script>
    </scriptTask>
    <sequenceFlow id="flow1003" sourceRef="scripttask1" targetRef="endevent1"></sequenceFlow>
    <receiveTask id="waitState" name="wait"></receiveTask>
    <sequenceFlow id="flow1004" sourceRef="startevent1" targetRef="waitState"></sequenceFlow>
    <sequenceFlow id="flow1005" sourceRef="waitState" targetRef="scripttask1"></sequenceFlow>
  </process>

cjose
Elite Collaborator
Elite Collaborator
It is working fine for me and the process is correctly waiting at receive task when I test using activiti-engine-5.21.0
Could you please create a unit test and upload it here if it is still happening for you?

Cheers,
Ciju