How to initiate a MessageStartEvent Activity using Flowable APIRest

Hi,

I have an active process instance, but when an event happens, I want it to take another path. The way to change to the other path is by using MessageStartEvent.

This is my Process:


This event happens when I am standing on the “Envío a proveedores” task.

According to Flowable documentation, the way to send a message for a particular process is by sending the message and businessKey.

I set a business key for my active process and send the message like this:

POST /flowable-rest/service/runtime/process-instances HTTP/1.1
Content-Type: application/json
{
   "message":"Desistir",
   "businessKey":"TEST6"
}

Response:

{
    "message": "Internal server error",
    "exception": "couldn't instantiate class Desistir"
}

Also try doing this:

PUT flowable-rest/service/runtime/executions/{{ProcessId}}
Content-Type: application/json
{
  "action":"messageEventReceived",
  "messageName":"Desistir"
}

Response:

{
    "message": "Internal server error",
    "exception": "Execution with id '7057dc22-d265-11ee-83be-0242ac180002' does not have a subscription to a message event with name 'Desistir'"
}

Flowable Version : 6.5.1

Any help or suggestion would be greatly appreciated. Thanks in advance!

Hey @ericc,

That’s for starting a process instance based on a message, not about sending out a message event to an event sub process.

For this endpoint you need the execution id of the execution for the event sub process start event, not the process instance id.

Hope this helps,
Filip