Pass custom header to service task


We are using Camunda community version 7.12 and are facing a certain challenge with custom headers.

We have a micro service (say M1) making a POST request to the Camunda REST end point to execute a certain WF (say WF1).

When M1 makes the call, it needs to pass a custom header (say H1) as part of the payload. The expectation is that H1 should show up in each of the connector tasks defined within WF1.

Is there a way to introduce a change in the Camunda engine so that the custom header can trickle down to downstream service tasks seamlessly, without having to modify each task?

Thanks in advance for you valuable time and attention.


Hi @thegeekcentaur,

you can add custom headers: and this example:

But, if you want more control during your service invokation, you should use the external task pattern or a java delegate and program the request with full support of your favorite client framework.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

Thanks for your kind response. I have already seen these examples, and my only concern/observation to that was it involves making changes to the WF definitions/BPMNs.

If we are looking at a more controlled implementation, I guess the right way is go external task.

I was also hoping that Java Delegates provides something similar too, but reading I feel that this also involves dabbling with the existing WF definitions.

Please advise.

Hi @thegeekcentaur,

if you want to change the functionality of the connector without changing the process models you could exchange the connector implementation with a custom one:

I’ve never done this and can’t foresee the pitfalls on this path.

On the long term you will gain more flexibility by moving from connector to external service implementation.

The required changes in the process models can be generated with the help of the model api, if you have a lot of process models to maintain. (

Hope this helps, Ingo

Thanks again @Ingo_Richtsmeier

One last question. Is there a place where I can see a sample project for custom connector, to get started?


Hi @thegeekcentaur,

I could not find a working example either.

But this is the original code: and it conatins a DummyConnector in the test package:

Maybe this can serve as an example?

Hope this helps, Ingo

1 Like

It does. Appreciate all your help. Danke schoen.