When working with "Workflows and Documents" (W&D) trigger beans, the imServerBean.getUserBean(java.lang.String user) and imServerBean.getGroupBean(java.lang.String group) method will take return beans for the W&D users and groups. The string to give is the user or group name.
To retrieve beans for the MKS Domain, or whichever authentication realm you are using, you need to use the siEnvironmentBean.getRealmBean().getRealmUserBean(java.lang.String loginID) method.
The W&D users and groups are imported from the authentication realm you are using. This could be the MKS Domain, or it could be LDAP. In either case, the information that you are getting from the imUserBean and imGroupBean will be what shows for the Users and Groups in the W&D administration. That is, the data you will see when running "im viewuser" and "im viewgroup".
The Full Name and Email Address are taken from the authentication realm if defined. If they are not defined in the authentication realm, then they may be defined in the W&D admin. If there is a difference between what is in the realm and what is in W&D, then the next time the user and group cache is refreshed, the realm data is copied over (and overwrites) the W&D data.
For MKS Domain, you can test this by setting a having a user with no Full Name in the MKS Domain. Try setting the Full Name by editing the user under the W&D node. Then edit the same user to have a different name in the MKS Domain. Right-click on Workflows and Documents node, and select Refresh User and Group Cache. You should see the W&D user update to have the MKS Domain name. The Full Name and Email Address cannot be modified through the W&D trigger beans.
The group memberships are also maintained in the authentication realm and cannot be changed through the W&D administration or trigger beans.
When you are retrieving the values for a user field using the imDeltaBean.getfieldValue method, if the user field is single-value, you should get the loginID, which will match what you see in the W&D user list. If the user field is multi-value, you will get an array with the loginIDs.
If you are using MKS Domain as the authentication realm, then you can make changes to the users and groups using the integrity editmksdomainuser and integrity editmksdomaingroup commands.
I've done all my testing with Integrity 11.1. If you are seeing different results in another release, please let me know which release, and which beans/methods are not returning the expected data. I can rerun my tests and also check to see if there's any changes between the releases that would affect what you are seeing.