cancel
Showing results for 
Search instead for 
Did you mean: 

execution has not subscribed to a signal event

r3dge
Champ in-the-making
Champ in-the-making
Hello,

I'm trying to throw and catch a signal event but i get the following error : " Execution 690046 has not subscribed to a signal event with name "flushBatchList".

Here is the subprocess that catch the signal with a boundary signal event :

<subProcess id="BatchSelectSubProcess" name="BatchSelectSubProcess">
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="lotids" activiti:elementVariable="AvailableLotId"></multiInstanceLoopCharacteristics>
      <userTask id="SelectBatchList" name="SelectBatchList">
        <extensionElements>
          <activiti:formProperty id="taskLotId" variable="AvailableLotId"></activiti:formProperty>
          <activiti:taskListener event="create" class="numen.cpe.assign.task.SelectBatchListListener"></activiti:taskListener>
        </extensionElements>
      </userTask>
      <startEvent id="startevent2" name="Start">
        <extensionElements>
          <activiti:formProperty id="AvailableLotId" required="true"></activiti:formProperty>
        </extensionElements>
      </startEvent>
      <sequenceFlow id="flow10" sourceRef="startevent2" targetRef="SelectBatchList"></sequenceFlow>
      <serviceTask id="FlushBasket" name="FlushBasket" activiti:class="numen.cpe.assign.task.FlushBasket"></serviceTask>
      <sequenceFlow id="flow11" sourceRef="SelectBatchList" targetRef="FlushBasket"></sequenceFlow>
      <endEvent id="endevent1" name="End"></endEvent>
      <sequenceFlow id="flow22" sourceRef="FlushBasket" targetRef="endevent1"></sequenceFlow>
    </subProcess>
    <boundaryEvent id="boundarysignal2" name="Signal" attachedToRef="BatchSelectSubProcess" cancelActivity="true">
      <signalEventDefinition signalRef="flushBatchList"></signalEventDefinition>
    </boundaryEvent>

the signal is declared like this : <signal id="flushBatchList" name="flushBatchList"></signal>

The signal is throwed from the service task :

List<Execution> executions = runtimeService.createExecutionQuery().activityId("BatchSelectSubProcess").list();
for(Execution execution : executions){
      if(execution.getProcessInstanceId().equals(arg0.getProcessInstanceId())){
      runtimeService.signalEventReceived("flushBatchList", execution.getId());
                }
}


I don't understand what's wrong. Anyone has an idea ?

Thank you !
9 REPLIES 9

r3dge
Champ in-the-making
Champ in-the-making
problem with previous post.. sorry !

Hello,

I'm trying to throw and catch a signal event but i get the following error : " Execution 690046 has not subscribed to a signal event with name "flushBatchList".

Here is the subprocess that catch the signal with a boundary signal event :
<code>
<subProcess id="BatchSelectSubProcess" name="BatchSelectSubProcess">
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="lotids" activiti:elementVariable="AvailableLotId"></multiInstanceLoopCharacteristics>
      <userTask id="SelectBatchList" name="SelectBatchList">
        <extensionElements>
          <activiti:formProperty id="taskLotId" variable="AvailableLotId"></activiti:formProperty>
          <activiti:taskListener event="create" class="numen.cpe.assign.task.SelectBatchListListener"></activiti:taskListener>
        </extensionElements>
      </userTask>
      <startEvent id="startevent2" name="Start">
        <extensionElements>
          <activiti:formProperty id="AvailableLotId" required="true"></activiti:formProperty>
        </extensionElements>
      </startEvent>
      <sequenceFlow id="flow10" sourceRef="startevent2" targetRef="SelectBatchList"></sequenceFlow>
      <serviceTask id="FlushBasket" name="FlushBasket" activiti:class="numen.cpe.assign.task.FlushBasket"></serviceTask>
      <sequenceFlow id="flow11" sourceRef="SelectBatchList" targetRef="FlushBasket"></sequenceFlow>
      <endEvent id="endevent1" name="End"></endEvent>
      <sequenceFlow id="flow22" sourceRef="FlushBasket" targetRef="endevent1"></sequenceFlow>
    </subProcess>
    <boundaryEvent id="boundarysignal2" name="Signal" attachedToRef="BatchSelectSubProcess" cancelActivity="true">
      <signalEventDefinition signalRef="flushBatchList"></signalEventDefinition>
    </boundaryEvent>
</code>
the signal is declared like this : <code><signal id="flushBatchList" name="flushBatchList"></signal></code>

The signal is throwed from the service task :
<code>
List<Execution> executions = runtimeService.createExecutionQuery().activityId("BatchSelectSubProcess").list();
for(Execution execution : executions){
  if(execution.getProcessInstanceId().equals(arg0.getProcessInstanceId())){
  runtimeService.signalEventReceived("flushBatchList", execution.getId());
                }
}
</code>

I don't understand what's wrong. Anyone has an idea ?

Thank you !

rallen1
Confirmed Champ
Confirmed Champ
You may want to try:

<java>
List<Execution> executions = runtimeService.createExecutionQuery()
.processInstanceId(arg0.getProcessInstanceId())
.signalEventSubscriptionName("flushBatchList")
.list();
</java>

Hope that helps.

r3dge
Champ in-the-making
Champ in-the-making
thank you but it produces the same error  " Execution 690046 has not subscribed to a signal event with name "flushBatchList".

r3dge
Champ in-the-making
Champ in-the-making
Some news : i put the boundary event on the user task instead of the subprocess :

<code>
<userTask id="SelectBatchList" name="SelectBatchList">
        <extensionElements>
          <activiti:formProperty id="taskLotId" variable="AvailableLotId"></activiti:formProperty>
          <activiti:taskListener event="create" class="numen.cpe.assign.task.SelectBatchListListener"></activiti:taskListener>
        </extensionElements>
      </userTask>
<boundaryEvent id="flushBatchListSignal" name="flushBatchListSignal" attachedToRef="SelectBatchList" cancelActivity="true">
        <signalEventDefinition signalRef="flushBatchList"></signalEventDefinition>
      </boundaryEvent>
</code>

Now there is no error but nothing happens. I guessed the signal will cancel all task. Anyone could explain ?

trademak
Star Contributor
Star Contributor
What do you mean with all tasks?
You can fire a signal globally or for a specific process instance.

Best regards,

r3dge
Champ in-the-making
Champ in-the-making
I guess it's not possible to throw a signal from a subprocess instance task that cancel all user tasks in the same subprocess. isn't it ?

trademak
Star Contributor
Star Contributor
It is possible when you define a signal boundary event on the sub process and use an intermediate signal throw event to trigger it.

Best regards,

r3dge
Champ in-the-making
Champ in-the-making
I tried that but with a SignalBoundaryEvent and it does not work. I will try with an intermediate signal throw.

Thank you for your answer.

jbarrez
Star Contributor
Star Contributor
boundary event = receiving, intermediate = throwing