What exactly are you trying to achieve? why do you need to modify the process variables after a wait state?
I mean, if you reach a wait state it means that you are waiting for some external executions, that external service will return some that that will be feed into the process engine that will be in charge of mapping those results with the process variables. I don't see any case where you need to update externally the process variables.
Cheers