Python Job does not update variable

I have this python script:

print(HAIMENG)

context.updateVariable(HAIMENG, '123')

print(HAIMENG)

 

However in the terminal I get:

 

20230101

20230101

Script duration: 48.8s.

 

How can I debug this issue? Thank you.

Nevermind, the solution was to refer to the variable as a string:

print(HAIMENG)

context.updateVariable('HAIMENG', '123')

print(HAIMENG)