Connector Freemarker Template as Process Variable


I often use freemarker templates to build the payload for a connector HTTP request.

Is there a way to save the output of the template as a process variable? My use case is in cockpit I may want to see the actual request to diagnose faults etc.

I could use a script task to build the payload followed by a service task, and thus the script task creates the process variable, but this adds a technical implementation details into the process model which is an anti-pattern.

Hence any way to easily persist connector freemarker payload as process variable?



Hi Rob,

not sure if this is easy. But you could generate the payload in an input mapping for the service task and not the connector. Then use the generated input variable as payload for the connector. And an output mapping on the service task to export the generated payload as process variable after the task.


1 Like

Thanks for that. That works.

I don’t need to use the payload outside of the connector - it just needs to be available for the support team if they want to see the request and response messages. Because of that I don’t need to map it into a process variable. If you don’t map it into a process variable it is still visible in the history of the process as a local variable in the scope of the connector.