Hello,
I’m trying to setup a task on Camunda that would make a REST call using http-connector.
I’m using Spring Boot 3.1.4, JDK 17, Camunda bpm 7.20.0.
URL construct is: http://:/endpoint?param1=xxx¶m2=yyy
I’m using an http-connector and I’m able to load the placeholder using ${environment.getProperty(‘bookByAuthorPublisherUrl’)}. After this is where I’m stuck.
How do I go about replacing the placeholders with the actual author and publisher values from process variables?
Is this possible using http-connector at all? Or should I switch to a Groovy script/Java task?
Hi @Ingo_Richtsmeier,
Yes, this is possible. But I wish to load the URL with placeholders from a yml configuration. In that case, is it possible to write the expression with replace() method?
If not and I have to use a script, how do I access spring boot yml configuration on inline Javascript?
I haven’t used these mix of configuration with yaml and JavaScript. It could be possible.
If the expressions ${environment.getProperty(‘bookByAuthorPublisherUrl’)} get evaluated correctly, you could use input mappings to store these values in local variables and use the variables (with another expression) to compose your URL string.
Hi @Ingo_Richtsmeier ,
Yes. That is my last resort where I’m forced to duplicate the spring boot configurations onto Camunda process variable. Was just checking if there is a way around it.
I’ve seen one post where @Niall suggested to move the entire logic onto a Java Delegate. I might just do that as an alternative.