Hi @rezza72,
I tried a variant which works on my machine. Maybe the first line of the tasklistener is wrong as it initialized the edit
variable as empty. Process variables get injected in the scripts automatically: Scripting | docs.camunda.org
Hope this helps, Ingo