• Role Resolver

    By Andrew Lukas 1 decade ago

    Hi,

    Could you please briefly describe usage of roles? I had added additional field to Employee form (testID) which has same settings as ManagerID. I had added new entry in SimpleWorkflow control - RoleResolver with property testID and role test. Now on WebEditReview xpage I'm adding field binding to testID and computed field - both use same script as is used for computedField5 and ManagerID field with slight changes ManagerID -> testID and role from [manager] is changed to [test]. Unfortunetelly test field doesen't display testID content instead of ManagerID field. I assume I missed something but I'm not sure what...

    Any tips apreciated,

    Regards

    Andrew

    • About role resolver

      By Qian Liang 1 decade ago

      In the SimpleWorkflow control, we implemented a role resolver called wkSocialRoleResolver. For this role resolver, it just gets field information from user's profile document(In XPage server, it is a Person Java bean). In our sample db, we get the managerId field. If you want to use other field, you need to make sure that field is available in the Person Java bean.

      The profile mechanism is supplied by XPages extension library. If you want to add new field into profile, we need to follow these steps:

      1.Add one file called com.ibm.xsp.extlib.social.PersonDataProvider in Java\META-INF\services folder in your db and put a class name(with package name) in it. This class should inherit com.ibm.xsp.extlib.social.impl.AbstractPeopleDataProvider. In our sample db, this class called er.ProfilesProvider

      2.In the PeopleDataProvider class, you should supply the new field information. You can refer to er.ProfilesProvider. And the getName() method should return a name represent your PeopleDataProvider name. This name will be used in next step.

      3.In WebContent\WEB-INF\xsp.properties, add your PeopleDataProvider name at the beginning of property extlib.people.provider like below:

      extlib.people.provider=EOYDBProvider;profiles;Domino;DominoDB

       

      Hope this can help!