Set access token in request header


I am trying to use http task. I want to send an Http request with an access token:

<serviceTask id="httpGet" name="HTTP Get" flowable:type="http">
    <flowable:field name="requestMethod">
    <flowable:field name="requestUrl">
    <flowable:field name="requestHeaders">

I want to set an access token in headers:

   Map<String, Object> variables = new HashMap<>();
    variables.put("headers", "Authorization:  Bearer 0d65dbfa-73y6-41y7-8eaa-29c4e3973f46");
    String procId = runtimeService.startProcessInstanceByKey("simpleGetOnly").getId();
    List<HistoricVariableInstance> variables2 = 

but it does not work.

org.flowable.common.engine.api.FlowableException: Unknown property used in expression: ${headers}

what is wrong in my code? how should I send access token in my http request?

You’re not passing the variables map to the startProcessInstanceByKey method.

thank you.

it works :slight_smile:

Is there any feature in flowable for oauth2? for calling http services in a http task?