cancel
Showing results for 
Search instead for 
Did you mean: 

Signal throwing event does not proceed/continue

iblanco
Confirmed Champ
Confirmed Champ
Hi,

I have a little process that has 2 execution paths. One of them arrives at a user task that has an exit transition as well as a boundary signal event. That way I can end the user task by completing it or by receiving a signal.Another parallel execution path in the same process calls a signal throwing intermediate event after some work. This event throws the signal that cancels the user task in the other execution path. The signal itself is set activiti:scope to processInstance, so that to make sure that no other process instances are cancelled, only mine.

When the signal is reached the user task is cancelled as expected and this execution path goes directly to the end event but the process itself does not end because the other execution path, the one that fired the event does not proceed is stuck in the intermediate signal throwing event. Shouldn't the execution proceed right after firing the event ?

I know boundary events can be configured to cancel or not the activity, but this does not seem to make sense on an intermediate throwing event. What is the use of making it "just stay there" ?

Those are the most significant excerpts from my process definition:


    <boundaryEvent id="catchAlreadyConfigured" name="Catch already configured" attachedToRef="provideConfigurationData">
      <outgoing>SequenceFlow_2</outgoing>
      <signalEventDefinition id="_MessageEventDefinition_3" signalRef="Signal_4"/>
    </boundaryEvent>

    <intermediateThrowEvent id="throwAlreadyConfiguredEvent" name="Throw already configured event">
      <incoming>SequenceFlow_10</incoming>
      <outgoing>SequenceFlow_4</outgoing>
      <signalEventDefinition id="_MessageEventDefinition_2" signalRef="Signal_4"/>
    </intermediateThrowEvent>

    <signal id="Signal_4" activiti:scope="processInstance" name="already-configured"/>

2 REPLIES 2

iblanco
Confirmed Champ
Confirmed Champ
The problem seems to be that once one of the execution paths reaches the 'non' end event all the execution of the remaining execution paths is halted. Might this be intended behaviour? In Activiti's documentation we can read:

<code>
A 'none' end event means that the result thrown when the event is reached is unspecified. As such, the engine will not do anything extra besides ending the current path of execution.
</code>

But BPMN 2.0 spec says:
<code>
The Flow MAY come from either alternative or parallel paths. For modeling convenience, each path MAY connect to a
separate End Event object. The End Event is used as a Sink for all tokens that arrive at the Event. All tokens that are
generated at the Start Event for that Process MUST eventually arrive at an End Event. The Process will be in a
running state until all tokens are consumed.
</code>

Well, Activiti does honour this because the process itself is still marked as active due to the fact that there are execution paths that did not arrive yet but how are they supposed to reach the end if their execution is halted ?

Meanwhile I solved the problem by using an "Inclusive gateway" to join the execution paths before proceeding to the end event.

trademak
Star Contributor
Star Contributor
I would need the full process definition to understand your issue.
Even better would be to create a unit test showing your issue.

Best regards,