Well.. the issue is that if you are in a script node there is no actual owner, because it is a script. If you are inside a User Task Node, you should use the TaskService queries to get all the available tasks for that user.
Can you please elaborate a little bit more about why do you want to get that information from a script node?
i mean that when the process entry a user task,the entry script would know who are excuteing the process,then ,i can get the excutor informaion (actor id,group id for example) and assign to the globle process variable to do something for each specified user.
for example ,i want to give each actor a specified url whitch is related the actor's id to do something. don't you know my mean?
You can try the following code to get actual actor id of the User Task (enter it as "on exit" code"):
System.out.println("Actor ID: " + ((org.jbpm.workflow.instance.node.HumanTaskNodeInstance)(kcontext.getNodeInstance())).getWorkItem().getResult("ActorId") );
thank you，i have resolved my problem