-
1. Re: how to get the actualOwner of a task by script in java code
salaboy21 May 2, 2014 6:16 AM (in response to merry0900)Hi there,
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?
-
2. Re: how to get the actualOwner of a task by script in java code
merry0900 May 8, 2014 9:38 PM (in response to salaboy21)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?
-
3. Re: how to get the actualOwner of a task by script in java code
bry May 10, 2014 7:25 AM (in response to merry0900)Hi,
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") );
-
4. Re: how to get the actualOwner of a task by script in java code
merry0900 May 16, 2014 4:06 AM (in response to salaboy21)thank you,i have resolved my problem