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 the anonymous wrote : name attribute in the membership? Here 
is what I've read from the docs:
anonymous wrote : 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 the anonymous wrote : next 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

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933695#3933695

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933695


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to