What are you trying to achieve? Usually that's not something that you want to do. The business process is defined by business analyst who assign people or groups to their tasks.
Do you really need to do that assignment using just one variable? I mean. you can.. but it sounds odd and not really representative for a real use case.
You can use on-entry and on-exit actions to change that variables from your nodes.. but once again.. I don't really recommend going in that direction, not because you can't but you probably don't want to do that in the long run.
if you do want to set a variable in the workflow use the following code
kcontext.setVariable("userId", "user"); //where userId is the variable name and user is the name of the user
this can be put in either a script task of its own, or in the on-entry or on-exit event of another task
<userTask id="_5" name="Human Task" >