AnsweredAssumed Answered

Duplicate message reception in message catching event

Question asked by waldo on Oct 2, 2013
Latest reply on Oct 3, 2013 by trademak
We have a cronjob that periodically (every 5s) tries to send a message to an arbitrary process execution waiting on an intermediate message catching event. In each run, the cronjob determines waiting process executions via

and sends the message via

We experience the odd behaviour that two subsequent cronjob runs (5s apart) sometimes deliver the message to the same process execution (i.e. the execution query yields identical execution IDs), leading to an SQL exception during insert into ACT_RU_EXECUTION (ORA-02291: integrity constraint (ACT_FK_EXE_PROCINST) violated - parent key not found). There are no loops in our process, every execution expects only a single message.

I would expect that the process execution that received a message immediately gets removed from the message event listener list, so duplicate message reception is impossible. Can someone explain to me at which point in time the RuntimeService.messageEventReceived persists the information that the message was successfully delivered? Is this only done when the receiving process execution yields its thread?

Many thanks!