cancel
Showing results for 
Search instead for 
Did you mean: 

intermediate-event throw/catch-mechanism

cavdar
Champ in-the-making
Champ in-the-making
Hi,
I am trying to understand the intermediate-event throw/catch-mechanism. Belov is my process definition. Why the task "UserTask #2" is never reached?
Thanks for any help.

<?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" 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">
  <signal id="testSignal1" name="testSignal1" activiti:scope="global"></signal>
  <signal id="testSignal2" name="testSignal2" activiti:scope="global"></signal>
  <signal id="testSignal3" name="testSignal3" activiti:scope="global"></signal>
  <process id="JUNITTest" name="JUNITTest" isExecutable="true">
    <startEvent id="startEvent" name="Start" activiti:initiator="initiator"></startEvent>
    <sequenceFlow id="flowToTaskCopyRefFilesToSoll" sourceRef="startEvent" targetRef="XXX-JUNITUserTask1"></sequenceFlow>
    <userTask id="XXX-JUNITUserTask2" name="UserTask #2" activiti:candidateGroups="cte-tester"></userTask>
    <userTask id="XXX-JUNITUserTask1" name="UserTask #1" activiti:candidateGroups="cte-tester">
      <extensionElements>
        <activiti:formProperty id="signalType" name="Signal Type" type="enum" variable="signalType" required="true">
          <activiti:value id="signalType0" name="Signal Type 0"></activiti:value>
          <activiti:value id="signalType1" name="Signal Type 1"></activiti:value>
          <activiti:value id="signalType2" name="Signal Type 2"></activiti:value>
          <activiti:value id="signalType3" name="Signal Type 3"></activiti:value>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" sourceRef="XXX-JUNITUserTask2" targetRef="endevent1"></sequenceFlow>
    <intermediateThrowEvent id="signalintermediatethrowevent1" name="SignalThrowEvent">
      <signalEventDefinition signalRef="testSignal1"></signalEventDefinition>
    </intermediateThrowEvent>
    <sequenceFlow id="flow2" sourceRef="XXX-JUNITUserTask1" targetRef="signalintermediatethrowevent1"></sequenceFlow>
    <intermediateCatchEvent id="signalintermediatecatchevent1" name="SignalCatchEvent">
      <signalEventDefinition signalRef="testSignal1"></signalEventDefinition>
    </intermediateCatchEvent>
    <sequenceFlow id="flow3" sourceRef="signalintermediatecatchevent1" targetRef="XXX-JUNITUserTask2"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_JUNITTest">
    <bpmndi:BPMNPlane bpmnElement="JUNITTest" id="BPMNPlane_JUNITTest">
      <bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent">
        <omgdc:Bounds height="35.0" width="35.0" x="20.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="XXX-JUNITUserTask2" id="BPMNShape_XXX-JUNITUserTask2">
        <omgdc:Bounds height="55.0" width="105.0" x="440.0" y="153.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="XXX-JUNITUserTask1" id="BPMNShape_XXX-JUNITUserTask1">
        <omgdc:Bounds height="55.0" width="105.0" x="130.0" y="153.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="600.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="signalintermediatethrowevent1" id="BPMNShape_signalintermediatethrowevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="280.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="signalintermediatecatchevent1" id="BPMNShape_signalintermediatecatchevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="360.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flowToTaskCopyRefFilesToSoll" id="BPMNEdge_flowToTaskCopyRefFilesToSoll">
        <omgdi:waypoint x="55.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="130.0" y="180.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="545.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="600.0" y="180.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="235.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="280.0" y="180.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="395.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="440.0" y="180.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Cavdar,

I do not see your process definition. The best way to communicate an issue (or to learn something in Activiti) is jUnit test (from my point of view).
https://forums.activiti.org/content/sticky-how-write-unit-test

jUnit tests more related to your topic:
org.activiti.engine.test.bpmn.event.timer.IntermediateTimerEventTest

in activiti6 source.

Regards
Martin

cavdar
Champ in-the-making
Champ in-the-making
sorry. process definition is attached now.

cavdar
Champ in-the-making
Champ in-the-making
Problem solved:
the process throwing the event must not be the same as the one catching it.

mariocmp
Champ in-the-making
Champ in-the-making
Cavdar, show us how did you solve the problem.

cavdar
Champ in-the-making
Champ in-the-making
I splittet my UserTasks in two process definitions. See attached files.
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.