-
1. Re: Assignment mechanism
kukeltje Aug 6, 2007 7:20 AM (in response to tinico)I think this is not the good way to do that... Can you say how do that properly ??
I would do it this way to.
I do not get your second question -
2. Re: Assignment mechanism
vtysh Aug 6, 2007 8:41 AM (in response to tinico)1 related: You can specify variable in model which will contain name of task from where to get an actor id in your assignment handler.
<assignment class="your.handler"> <taskName>myTask</taskName> </assignment>
Then in assign method you should process all previous task instances with name equals to taskName variable value.executionContext.getTaskMgmtInstance().getTaskInstances(); //iterate though task instances ... if(taskInstance.getName().equals(taskName) { //check whether it is a newer task instance than previous one //and store actor to some variable if it is ... }
In case of usage of this method you will not need any additional contextInstance variables, and imho you will get more flexible handler which can be used for different nodes of various models. -
3. Re: Assignment mechanism
tinico Aug 6, 2007 9:33 AM (in response to tinico)Thank you for your answer !!
vtysh, your solution is good but we have to process all taskInstance, I'm affraid it take to much time !! But the idea is good I've test it !!
Is someone have another idea or can answered to my second question ??
Thanks !! :) -
4. Re: Assignment mechanism
vtysh Aug 6, 2007 9:39 AM (in response to tinico)If you afraid about time of performance you can write your own hql query and retrieve only tasks with name equals to taskName for current process instance. But i think performance will be enough for not very large databases.
-
5. Re: Assignment mechanism
tinico Aug 6, 2007 9:59 AM (in response to tinico)if their is 500 tasks created before, it process all this instance, it can be too long... But I try it, and, it work !! :)
I've now two solution to do that, is there others ??
Thank you very much vtysh !! If there isn't other idea, I think this is yours that I'll used !! :)