Hit external API with message event

Hi All,

I want to ask, do you have sample for calling external API with message event. Specifically I want to use message intermediate throw event to hit external API with 2 variable. I attach my bpmn files
id-eclaim.bpmn (3.2 KB) . Currently will use Java with delegate expression. I appreciate for any your help. Thank you

@dimasrij ,

You can pass those two variables as input parameters of the message throw event task and call java delegate. Inside the Java Delegate you could access those variables as execution.getVariable(“variableName”). To invoke the api you could use any rest api framework of your choice. For trivial case you could you Apache HttpClient. Add that dependency to your pom.xml.

Thanks
Prasad

hi @prasadps can you give me snippet code of the execute class for that?