runtimeService.setVariable not persisting data in database

I am trying to set few variables in the Task Listener (On Complete Event) which is getting executed when the user clicks on Complete in the User Task.

runtimeService.setVariable(processInstanceId, “caseStatus”,“INPROGRESS”);
runtimeService.setVariable(processInstanceId, “claimedBy”,“James”);

I have a service Task that follows this User Task, where i need all the case variables. unfortunately, im unable to see the varaibles that are set in the User Task.

Am i missing something?

@startrek you need to configure transaction boundaries (savepoint) for the service task by enabling this property for the service task asyncBefore=true