Rest connector configuration in service task

Hi Everyone,
I have service task and configured the taskDefinition type as io.camunda:http-json:1
with below input parameters but getting error that no variable found for name ‘bearer’.

failed to evaluate expression 
'{authentication:
  {type:bearer,token:authorization},method:post,
   url:baseUrl+"/api/pay/transaction",
   body:{
     "paymentType": obj1.obj2.value,
    "paymentTimestamp": obj1.obj2.value
   }
}': **no variable found for name 'bearer**'

BPMN configuration overview
image

do anyone know how to fix this issue?

TIA.

Hello @yadav1990 ,

as far as I can see it, bearer should be a string, not a variable ref.
This should work.

I hope this helps

Jonathan

Yes, but how can I configured it as I can see default expression format is feel. And it’s considering it as variable though not.

image

Hello @yadav1990 ,

this is because by default, you will map data from the Process.

However, you can define a static value by putting a string inside the expression:

Jonathan

1 Like