Chain 2 or more HTTPTask call

How to chain 2 HTTPTask call together in 1 process instance call, how to pass from 1 HTTPTask (GET restful method call) response as request body of the 2nd HTTPTask (POST restful method call)?
This is for the bpmn20.xml.


You can put 2 HTTP Task in sequence. 1st once can be a GET call. The response of that task will be saved as string in a response variable of your choice. Now in 2nd HTTP Task with POST call, in request body you can use the variable as EL expression as mentioned here.

Hope this helps.

Note : Response of the 1st HTTP call is saved as string. So if you need to modify the response, you need to write a parser and again save it to the process variable otherwise i think you can directly use the response in 2nd call.

Thank You,

Thanks for the reply.

How can i do the following:

How to save response to response variable? Do you have a sample code snippet to show how this is done?


In the modeler itself, when you are defining the HTTP Task, their is an attribute by the name “Response Variable Name”. You can set the name of the variable.


Thank You,

FYI, in the current master branch (not yet released), there is improved support for storing the json response directly as an ObjectNode and storing it transiently. See