Is there a way to bring the user name who requested a job run into the workspace as an attribute?
My current attempt uses a PythonCaller with the following code:
import fme, os
import fmeobjects
def processFeature(feature):
feature.setAttribute('Username', os.getenv('USERNAME'))
pass
...and passes Username on as an exposed attribute. This works fine in Desktop, but in Server it always results in the Service Account username populating the attribute.
So if I run this in Desktop, Username is populated with jpickles... if I run this in Server, Username is populated with serviceaccount even though I am logged into FME Server as jpickles.
Is there an easier way to accomplish this task that I am currently unaware of?