2 Replies Latest reply on Mar 30, 2006 8:19 AM by Konstantin Kolev

    Bug in the deployment of membership making assignents to fai

    boerse scholz Newbie

      Hi, i use jBPM 3.1 und JBos 403SP1. My identity.db.xml is:

      <identity>
       <group name="admon_name" type="admon_type"/>
       <membership name="administration" role="administration" user="repsol" group="admon_name" />
       <membership name="other" role="other" user="ernie" group="admon_name" />
       <user name="cookie monster" email="cookie.monster@sesamestreet.tv" password="crunchcrunch" />
       <user name="ernie" email="ernie@sesamestreet.tv" password="canthereyoubert,theresabananainmyear" />
       <user name="bert" email="bert@sesamestreet.tv" password="ernie,theresabananainyourear" />
       <user name="grover" email="grover@sesamestreet.tv" password="mayday mayday" />
      </identity>
      

      when i query select * from jbpm_id_membership; both fields name_ are null (and they shouldn't). When i assign via expression:

      previous --> group(admon_type)--> member(other) it says member(other) could not be resolved. I updated the rows:

      update jbpm_id_membership SET name_='administration', role_='administration' where id_=1;
      update jbpm_id_membership SET name_='other', role_='other' where id_=2;

      and it does resolve the assignation ok, hope it helps.
      P.S. Anyway, although this so seems to work, i still only recover user "ernie" when the task should be assigned to previous (in my case war cookie) AND ernie. Please help...

        • 1. Re: Bug in the deployment of membership making assignents to
          boerse scholz Newbie

          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
            Konstantin Kolev Newbie

            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
            name
            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 the
            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