Is there any way to decrypt inline passwords within code? When I query I just get the asterics returned.
Yes, I believe that it's a security feature. I remember having seen the DQL being translated to
select all '****************' from dm_user
Regarding passwords, I normally use the com.documentum.fc.tools.RegistryPasswordUtils tool available in dfc.jar. Nevertheless you still need to have access to the encrypted password, for instance, in an aliasset.
Just a final note (after seeing you had just commented), in a server method you can do what you want. The installation owner is always a superuser and with that you can create a session for any other user. It's a lot of work but you definitly can do it. Unless the superuser comes from an LDAP and the password changes periodically, hardcoding it is always easier.
That's the problem, the superuser comes from LDAP and the password will have to change every so often.
Superusers with passwords that expire are always a big problem. The only way I know of not needing a password uses the method server, like you said, and a login ticket for the desired user.