-
1. Re: Unassign Task
norman.richards Jul 27, 2007 2:21 PM (in response to damianharvey)Have you tried the new extended EL in Seam 2? I'd be quite surprised if you couldn't call the method you want.
-
2. Re: Unassign Task
gavin.king Jul 27, 2007 3:20 PM (in response to damianharvey)#{pooledTask.assign(null)} should work I guess.
But even better, let's add a PooledTask.unassign() method. -
3. Re: Unassign Task
damianharvey Jul 28, 2007 7:35 AM (in response to damianharvey)I had tried #{pooledTask.assign(null)} but the task just disappeared from both lists as it sets the ACTORID column in the JBPM_TASKINSTANCE table to blank rather than NULL.
I've noticed that you can't pass null using EL. It gets sent to the Bean as an empty string. -
4. Re: Unassign Task
gavin.king Jul 28, 2007 10:09 PM (in response to damianharvey)Then please report that EL issue in Seam JIRA so that we can fix it. null!="" ;-)
-
5. Re: Unassign Task
torsty Jul 29, 2007 2:56 AM (in response to damianharvey)Don't know if I got you, but you said you did want
to return a task to the pooled tasks
I am assigning a task back to a (named) pool like this. (this is reassigning a task to a pool - but not unassigning the task completly):public void reassignToPool() { Long taskIdLong = new Long( this.taskId); // Your taskId PooledActor myPoolActor = new PooledActor("myPoolActorName"); Set<PooledActor> pool = new HashSet<PooledActor>(); pool.add(myPoolActor); if ( taskId != null ) { jbpmContext.getTaskMgmtSession().loadTaskInstance(taskIdLong.longValue()).setPooledActors( pool ) ; jbpmContext.getTaskMgmtSession().loadTaskInstance(taskIdLong.longValue()).setActorId( null ) ; } else { // } }
-
6. Re: Unassign Task
damianharvey Jul 29, 2007 11:14 AM (in response to damianharvey)If you had assigned the task to the 'myPoolActorName' in the first place you only need set the actorId to null to return it.
Issue raised over the EL null thing : http://jira.jboss.com/jira/browse/JBSEAM-1737
Thanks,
Damian.