cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Process using message start event

sana
Champ in-the-making
Champ in-the-making
Friends,

Iam new to Activiti and not java expert.
To start with want to try design one process through activity modeler(web based)and trigger this process from REST which will create some task and then close the task.

I tried creating the process and added start message event,but not able to configure the properties(start message event) what exactly to give.
Also how i can trigger this start message event using REST.

Please help … thanks in advance
Sana
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
The rest-api does not support starting processes by an event, so it seems. Any reason why you need a message start-event and not using a none-start event (maybe you have 2 separate message-start-events?).

I'll make sure that functionality is in the 5.15 release…

An alternative workaround can be to use a none-start event, and have an event-based gateway with 2 intermediate message-events and start the process by key through rest and message it through rest, selecting the right message.

frederikherema1
Star Contributor
Star Contributor
Seems like it's already implemented in 5.14, but the docs have a bad example (my bad):


POST runtime/process-instances Request body (start by message):

{
   "message":"newOrderMessage",
   "businessKey":"myBusinessKey",
   "variables": [
      {
        "name":"myVar",
        "value":"This is a variable",
      },
     
      …
   \]
}
[code]

sana
Champ in-the-making
Champ in-the-making
Thanks for the reply.

What is the use of message start event?
Any alternate way that i can send message to message start event and trigger the process?

Rgds.
SANA

frederikherema1
Star Contributor
Star Contributor
What alternative way you want? You can use use REST-API or java-api. If you cant to send a message-event within a process, you can use a message-start event in an event-subprocess (see userguide).