Hi, I’m creating an eCommerce B2B ordering process where the details of a product are looked up in a catalogue using a service task with the HTTP connector. The product is then ordered from the supplier using another service task with the HTTP connector. In the 1st task I’m retrieving some JSON for the product. This differs for each product and is the payload that the supplier’s API requires to place the order. The supplier will differ depending upon the product. I want to substitute the values in that payload with values from process variables. This is an example of the JSON: {
“data”:{
“transactionId”:“${orderRefId}”,
“tenantId”: “${tenantId}”,
“term”: ${term},
“licences”: ${licences},
“email”: “${email}”,
“firstName”: “${firstName}”,
“lastName”: “${lastName}”,
“tenantName”: “${tenantName}”,
“address”: “${address}”,
“website”: “${website}”,
“phone”: “${phone}”}
}
This works perfectly when I add this directly to the payload variable of the http-connector input parameters. However, when I swap this to be dynamic using a variable containing the above JSON (parsed to a string) - eg. ${productPayload}, Camunda isn’t substituting the variables in the string. Is there another way to have Camunda parse the variable and replace the variable placeholders with the corresponding process variables’ values? Any advice greatly appreciated!