Skip to main content
New Participant
April 29, 2021
Question

user function returns administrator

  • April 29, 2021
  • 5 replies
  • 0 views

Hi all,

I am attempting to use the following expressions user(loggedInUser(), "username") to retrieve the username of the currently logged in user. The expression is being used in a script task within a process model. When I run the process the expression returns Administrator instead of the actual username. When I test this expression as an expression rule however it returns my actual username. Any insight into the discrepancy would be greatly appreciated.

5 replies

stefanhelzle0001
Brainy
April 29, 2021

This is default behavior when you call this function in a process. Check the documentation.

csteward
Brainy
April 29, 2021

Yes as Stefan notes, this is expected.  Instead, you can simply use:

=loggedinuser()

New Participant
April 29, 2021

I have attempted this as well and I get the same functionality. The function simply returns "Administrator".

stefanhelzle0001
Brainy
April 29, 2021

In a process there is no logged in user. What is your goal? Know who executed the process? This is stored in pv!initiator.