Cannot send variables (process, business or local) in REST API connector payload
Hello!
I'm trying to send variables from the process to a REST API on the payload.
When I put the data as a constant it all works fine, I get a response.
Bu if I use a variable, business, process or local, it won't work. I get the following message:
"Unsupported expression type for testing: Input parameter 'body' uses an unreachable Expression"
I tried using a groovy script but the same happens: when using the constanta data it works fine, if I change it to a variable I get the same error.
Hope somebody can help me!
Solange Silva
"Unsupported expression type for testing: Input parameter 'body' uses an unreachable Expression"
Only happens when using the `Test connector` feature. When using Test connector (outside of a process execution) using variable references is not possible and the above message is displayed.
Your expression should work when executing the process.
HTH
Romain
Comments
Hi Solange,
Can you share the groovy expression used to generate your dynamic payload ?
Hello romain.bioteau!
Of course:
"destinatarios": ["ssilva1","ssilva2"]
}
"destinatarios": ${registro.destinatarios()}
}
"destinatarios": ${registro.getDestinatarios()}
}
import groovy.json.JsonOutput
JsonOutput.toJson([tipoMensaje: 1, destinatarios: ["ssilva","vmondragon"]])
But when changing the constat values to the business variables as it follows I get the same message as before:
import groovy.json.JsonOutput
JsonOutput.toJson([tipoMensaje: registro.tipoMensaje, destinatarios: registro.destinatarios])
Thanks in advanced!