Cannot send REST API message

Hello!

I have a process with a user task followed by a catch message intermediate event. I'm trying to execute the process through REST API. The user task executes just fine, but when trying to send the message I get the following error on the log and the message event on the process is still on a waiting state:

2021-03-25 17:18:45.790 +0000 SEVERE: org.bonitasoft.engine.execution.work.InSessionBonitaWork THREAD_ID=137 | HOSTNAME=bizpof-front | TENANT_ID=1 | The work [ExecuteMessageCoupleWork: messageInstanceId: 11, waitingMessageId: 3] failed. The failure will be handled.
2021-03-25 17:18:45.847 +0000 WARNING: org.bonitasoft.engine.execution.work.ExecuteMessageCoupleWork THREAD_ID=137 | HOSTNAME=bizpof-front | TENANT_ID=1 | Unable to execute message couple with sent message 11 and waiting message 3, the waiting message was reset to allow other message to trigger it. This failure might come from a design issue, cause is: Some data were not found [1]
2021-03-25 17:18:45.847 +0000 SEVERE: org.bonitasoft.engine.execution.work.InSessionBonitaWork THREAD_ID=137 | HOSTNAME=bizpof-front | TENANT_ID=1 | org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeExecutionException : "PROCESS_DEFINITION_ID=6687925895206091954 | PROCESS_NAME=Registro de Usuarios | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=8 | ROOT_PROCESS_INSTANCE_ID=8 | FLOW_NODE_DEFINITION_ID=7460632722225870241 | FLOW_NODE_INSTANCE_ID=22 | FLOW_NODE_NAME=MensajeEvento | MESSAGE_INSTANCE_NAME=msjEv | MESSAGE_INSTANCE_TARGET_PROCESS_NAME=Registro de Usuarios | MESSAGE_INSTANCE_TARGET_FLOW_NODE_NAME=MensajeEvento | WAITING_MESSAGE_INSTANCE_TYPE=INTERMEDIATE_CATCH_EVENT | Unable to execute operation before executing flow node 22"
org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeExecutionException: PROCESS_DEFINITION_ID=6687925895206091954 | PROCESS_NAME=Registro de Usuarios | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=8 | ROOT_PROCESS_INSTANCE_ID=8 | FLOW_NODE_DEFINITION_ID=7460632722225870241 | FLOW_NODE_INSTANCE_ID=22 | FLOW_NODE_NAME=MensajeEvento | MESSAGE_INSTANCE_NAME=msjEv | MESSAGE_INSTANCE_TARGET_PROCESS_NAME=Registro de Usuarios | MESSAGE_INSTANCE_TARGET_FLOW_NODE_NAME=MensajeEvento | WAITING_MESSAGE_INSTANCE_TYPE=INTERMEDIATE_CATCH_EVENT | Unable to execute operation before executing flow node 22

On the process for testing purposes the event configuration is the following:

Event Name: MensajeEvento
Catch Message Name: msjEv
Message Content: "msjEvento" takes value of "1", an integer constant
Correlations: "processInstanceIdKey" takes value of "1", an integer constant

I'm sending the following JSON to the /bonita/API/bpm/message POST service, it gives a 204 response so no error on the API call:

{
  "messageName" : "msjEv" ,
  "targetProcess": "Registro de Usuarios",
  "targetFlowNode": "MensajeEvento",
  "messageContent" : {
      "msjEvento" : {
          "value" : 1,
          "type" : "java.lang.Integer"
       }
  },
  "correlations" : {
      "processInstanceIdKey" : {
          "value" : 1,
          "type" : "java.lang.Integer"
      }
  }
}

Thanks in advanced!

Hello,

1/ could you use the longboard page (available in the community) to verify if the key is the correct one (give the CASE ID in the longboard, and check the section "message)?

2/I've suspected here an error at the execution of the message. When you design the reception, you add some operation (to use the content of the message for example). Maybe one of these errors failed?

Could you use the Grumman page to get more information? If you sent the message, it should be store now in the database, but the execution failed. Grumman will find the message + the case, see the correlation matched, then execute step by step all the operations. If one failed, it will give you a better update.

Best,