AnsweredAssumed Answered

execution has not subscribed to a signal event ?

Question asked by r3dge on Jun 4, 2015
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 !

Outcomes