Using Freemarker for dynamic header in camunda connect

I have found the best way is to import your ini file/password as a input-variable/input-mapping on the specific task, create the Basic f9w8fw9e8fuwe98fuwe98... string, and then create a local variable with that string. Then in your Auth header you do ${myBasicString}

same concept was applied here: Send SMS through Service Task (http-connector) and Twilio (Script Based)

The reason for the input mapping is so you dont pollute the global scope of variables with your specific var. Each time you need the password it would be retrieved by the input mapping of the specific task using the password.

Edit: @Rajiv_Cj if you need more flexibility on your http-connector usage, see: Replacing Http-Connector with Jsoup usage as a alternative.

2 Likes