i want to set variable camunda 8 in rest api

i want to set variable camunda 8 in rest api example.
send method get api —> http://localhost:8080/api/with-param?approve=false or http://localhost:8080/api/with-param?approve=true

i want to set variable without using form of camunda 8
Should I use the service task or user task(not form) set variable

Hi @Kornnz_Valentine,

I understand from your question that you need to set the variables as per the condition that is satisfied in the process.

If you can define the variables during the service task itself, the you can programmatically complete the job worker in the Job Worker method definition ( I have used Spring Client and we can have an optional chaining of method .variables(variables) where the argument variables is a Map<String,Object> ) inorder to send the variables into the process.

Or, you can define variables in the Output Mapping of an activity inside the activity itself.

Hope this helps.

i want to example rest api set varibles because i not have idea ,and i try erors