This content has been marked as final.
Show 2 replies
-
1. Re: Bug in the deployment of membership making assignents to
boerse Feb 17, 2006 8:20 AM (in response to boerse)i forgot: BTW: all i want to do is to assign a task not only the user that started it but also his boss, is that too much? :(((((((((
-
2. Re: Bug in the deployment of membership making assignents to
saviola Mar 30, 2006 8:19 AM (in response to boerse)Hi, boerse!
I have the very same problem like you do.
In my opinion the problem resides in the method for parsing identity XML.
Here is the method implementation:private void readMemberships(List membershipElements) { Iterator iter = membershipElements.iterator(); while (iter.hasNext()) { Element membershipElement = (Element) iter.next(); String role = membershipElement.attributeValue("role"); String userName = membershipElement.attributeValue("user"); User user = (User) users.get(userName); if (user==null) throw new RuntimeException("unexisting membership user '"+userName+"'"); String groupName = membershipElement.attributeValue("group"); Group group = (Group) groups.get(groupName); if (group==null) throw new RuntimeException("unexisting membership group '"+groupName+"'"); Membership membership = new Membership(); membership.setRole(role); group.addMembership(membership); user.addMembership(membership); entities.add(membership); } }
As you can see the name of the membership is never addressed. That's why I think it is not present in the database.
IMHO this should be considered a bug and JIRA issue must be raised.
However I would prefer waiting for the jBPM guys official blessing.
I would like to ask a question too (in case jBPM team reads this posting). What is the meaning of thename
attribute in the membership? Here is what I've read from the docs:member(role-name) gets the user that performs a given role for a group. The previous terms must have resulted in a Group. This term searches for the user with a membership to the group for which the name of the membership matches the given role-name.
This is part of the syntax for thenext term
element in assignment expressions. What is the sense of actually mapping the name attribute to the role value of the membership? Don't they overlap?
Saviola
P.S. I am using jBPM 3.1