-
1. Re: jbpm Identity and assignments : Using _name_ to assign
gwittwer Nov 14, 2005 10:57 AM (in response to sandhuks)Hello
I'm using an extended identity module which is based on the jbpm identity module.
My users / roles / groups couldn't change their names. But I've got problems with the assignment: It always assign the new task to a 'null'... I don't know why! The ExpressionAssignmentHandler gets the right entity and set ActorId or pooledActorIds (name of user/group/roles).
If you got the same problem, it would be nice if you could help me with this (Why are they assigned to null??).
I don't know if jbpm is working with the names or the id's of the actors. It's a question mark for me too...
Regards
Gerhard -
2. Re: jbpm Identity and assignments : Using _name_ to assign
kukeltje Nov 14, 2005 7:20 PM (in response to sandhuks)always? or jsut the second time a swimlane is used on a task? meaning assigment to the first tast is ok, the second task not.
-
3. Re: jbpm Identity and assignments : Using _name_ to assign
gwittwer Nov 15, 2005 5:57 AM (in response to sandhuks)Hello
First the assignment was always null. Then I added the following code to the "start new process" method://create swimlane instances // this is necessary because its a bug in jbpm log.debug("create swimlane instances"); Map swimlanes = ti.getTaskMgmtInstance().getProcessInstance().getProcessDefinition().getTaskMgmtDefinition().getSwimlanes(); Iterator itr = swimlanes.keySet().iterator(); while(itr.hasNext()) { Swimlane swimlane = (Swimlane)swimlanes.get(itr.next()); log.debug("swimlane id="+swimlane.getId()+ " name="+swimlane.getName()); SwimlaneInstance swi = ti.getTaskMgmtInstance().getProcessInstance().getTaskMgmtInstance().getInitializedSwimlaneInstance(new ExecutionContext(getTaskInstance().getTaskMgmtInstance().getProcessInstance().getRootToken()), swimlane); if(swi != null) { log.debug("swi.setActorId: "+swimlane.getName()); swi.setActorId(swimlane.getName()); } else log.warn("swimlane instance is null!"); }
After this it works for the first assignment, the second assignment for the same user was null.
For example:
1. User a creates new process (all SwimlaneInstances are generated)
2. User a saves and closes the task
3. Assignment for User b
4. User b edits, saves and closes the task
5. Assignment is null, should be User a
I solved this problem:
Always if a save and close action is executed for a task, the "save & close" method will execute the code (see top) and initializes the swimlaneInstances. This is a very bad workaround, but with this it is working (also the second assignment) and the metadata in the database looks fine.
I saw, that in JIRA there are several open bug-taks for the assignement.
Whats your point of view for the solution I'm using?
Regards
Gerhard