cancel
Showing results for 
Search instead for 
Did you mean: 

Execution id has changed when from service task to IntermediateCatchEvent

hoangds121
Champ in-the-making
Champ in-the-making
Hi all,

I've a process which confirm item available. But when I get execution id from service task createPurchaseItemServiceTask and query execution id that subscribed to signal purchaseItemComfirmedSignal, I get 2 different execution id. It make me confused. How can I get right execution id from service task to put it in the item, so that I can signal purchaseItemComfirmedSignal from another processes.

<subProcess id="confirmItemSP" name="Confirm item subprocess">
         <multiInstanceLoopCharacteristics isSequential="false"
               activiti:collection="${order.getItemList()}"
               activiti:elementVariable="item" />
……….
                         <serviceTask id="createPurchaseItemServiceTask" name="Create purchase item"
               activiti:expression="#{createPurchaseItemServiceTask.execute(execution)}"/>
         
         <sequenceFlow targetRef="waitingConfirmSignal" sourceRef="createPurchaseItemServiceTask" />
         
         <intermediateCatchEvent id="waitingConfirmSignal">
            <signalEventDefinition signalRef="purchaseItemComfirmedSignal" />
         </intermediateCatchEvent>
………..
</subProcess>

Thanks,
Hoang.
2 REPLIES 2

trademak
Star Contributor
Star Contributor
I see a multi instance sub process so if there are 2 instances of that sub process then I would think it's logical that there are two execution ids returned. Is that the case? Don't you want to trigger both signal events?

Best regards,

hoangds121
Champ in-the-making
Champ in-the-making
Yes, I want signal events on each sub process instance. So I need execution id signal the right one.