Set task Variable not proicess variable using script

Hi. Im using BRPOC… this will set the PROCESS variable
execution.setVariable(“variableName”, variableValue)

but I need to set a TASK variable
task.setVariable(“variableName”, variableValue)
or
task.execution.setVariable(“variableName”, variableValue)
dont exist.

How can I come by doing this?
Thank you !!

This does the trick
execution.setVariableLocal(“variableName”, variableValue)