AnsweredAssumed Answered

Receive Task does not subscribe and receive message event

Question asked by andrey.nikolov on Sep 20, 2016
Latest reply on Dec 15, 2016 by gdharley
I have a process which defines a 'message' event

<message id="Task_Message" name="Task Message"/>

and includes a ReceiveTask to receive that particular message

<receiveTask id="Receive_Balance_Message" name="Receive Balance Message" messageRef="Task_Message"/>


When the process starts and eventually reaches the ReceiveTask node, with new entry created in ACT_RU_EXECUTION table as expected.

However, the event subscription (correlation to message name) is not established, with ACT_RU_EVENT_SUBSCR table remaining empty.

When we we try to post the message, the event subscription query returns no active subscribers for that message, and the process ever advances past the receive task.

List<Execution> executions = runtimeService.createExecutionQuery().messageEventSubscriptionName("Task Message").list();
for (Execution execution : executions) {
   runtimeService.messageEventReceived("Task Message", execution.getId()));
}


Does Activiti 5.21 fully implement ReceiveTask functionality? What could be the reason that the message correlation is not established?

The user guide mentions "currently we have only implemented Java semantics for this task" but suggests messages can be received nevertheless. If that is still the case, could we expect message events are implemented in Activiti 6.0?

Please advise!

Outcomes