cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.11 - Cannot set boundaryEvent on subprocess

pitagoras
Champ in-the-making
Champ in-the-making
Hi,
I have the following (fragment):

   
     <subProcess id="fulfillServices" name="Confirm Services">
        ….
        <boundaryEvent id="boundarysignal3" name="Signal" attachedToRef="fulfillServices" cancelActivity="true">
          <signalEventDefinition></signalEventDefinition>
        </boundaryEvent>

         ….

But when deploying I get

org.activiti.engine.ActivitiException: Invalid reference in boundary event. Make
sure that the referenced activity is defined in the same scope as the boundary
event | processes/ventaoffline.bpmn20.xml | line 197 | column 111

The same exception happens with an exception boundary event


     <boundaryEvent id="boundaryerror1" name="Error" attachedToRef="fulfillServices">
        <errorEventDefinition errorRef="SERVICE_KO"></errorEventDefinition>
      </boundaryEvent>
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Not sure about this, my guess: since the boundary-event is part of the MAIN process and attached to the subprocess, it should be declared in the main-process XML-element instead of the subprocess-element…

pitagoras
Champ in-the-making
Champ in-the-making
Not sure about this, my guess: since the boundary-event is part of the MAIN process and attached to the subprocess, it should be declared in the main-process XML-element instead of the subprocess-element…

Thank you for you answer, but I don´t quite follow you. The boundary event is part of the subprocess (seen as an activity). I attach a picture.
The error, as I understand it, complains about the activity referenced by the boundary event, in this case, the "fullfillServices" subprocess.

[img]http://i45.tinypic.com/11r50ts.png[/img]

frederikherema1
Star Contributor
Star Contributor
A boundary-event is attached TO a subprocess, but is not declare IN the subprocess. Move the <boundaryEvent ..> xml outside of the subprocess.

At least, from what I see in your fragment, the boundary-event is defined INSIDE the subprocess:


<subProcess id="fulfillServices" name="Confirm Services">
        ….
        <boundaryEvent id="boundarysignal3" name="Signal" attachedToRef="fulfillServices" cancelActivity="true">
          <signalEventDefinition></signalEventDefinition>
        </boundaryEvent>

         ….

pitagoras
Champ in-the-making
Champ in-the-making
The code is actually generated by the Designer… I will post this question in the other forum.

A boundary-event is attached TO a subprocess, but is not declare IN the subprocess. Move the <boundaryEvent ..> xml outside of the subprocess.

At least, from what I see in your fragment, the boundary-event is defined INSIDE the subprocess:


<subProcess id="fulfillServices" name="Confirm Services">
        ….
        <boundaryEvent id="boundarysignal3" name="Signal" attachedToRef="fulfillServices" cancelActivity="true">
          <signalEventDefinition></signalEventDefinition>
        </boundaryEvent>

         ….

frederikherema1
Star Contributor
Star Contributor
Great, potentially it went wrong when the boundary-event was initially dragged/created in the process, rather than on the edge. In that case, this is something that we need to avoid…