1 Reply Latest reply on Dec 13, 2006 6:32 AM by bnsbr

    ExpressionAssignmentHandlerTest.testNextTermMember error

    bnsbr

      Hi all,

      I'm trying to build one app with jBPM and use it's Identity component or integrating it to Tomcat security.

      To learn how to do it, I tried to run jBPM unit tests (the one's bundled with version 3.1.3) and get one error at the test at the subject.

      The error is that jBPM didn't found a membership where the role = 'leaderofthegang'. Debugging the app I found that the field 'role' isn't set, and is the membership name that have that value (leaderofthegang). So I think it's one bug. Can anyone confirm, running the same test? Should I fill one bug report at Jira?

      Thanks!

        • 1. Re: ExpressionAssignmentHandlerTest.testNextTermMember error
          bnsbr

          I think the error is in the factory of Membership.

          The 'name' field shouldn't be the 'role' of the user?
          It's actually implemented as:

           public static Membership create(User user, String name, Group group) {
           Membership membership = create(user, group);
           membership.name = name;
           return membership;
           }
          


          I think that it should be:

           public static Membership create(User user, String role, Group group) {
           Membership membership = create(user, group);
           membership.role = role;
           return membership;
           }
          


          Or should we have 3 factories? Is there any reason to be using the 'name' field instead of the 'role' field?
          Can anyone comment on this?