I have a service which creates a work object, which is routed to work list of operator defined in a property "AssignTo".When the router executes, a history-add happens based on decision tree (filter-History) and writes in the audit table " Created by <User>".
The issue is I am getting "Created by ServiceUser" , where "ServiceUser" is the operator created for service authentication and not the "AssignTo" operator name.
On tracing, I found out that the in pxFlow , pxRouteTo = "AssignTo" user id. But pxRouteToUserName is still "serviceUser".
pxRouteToUserName property is being set as the value of newAssignPage.pxAssignedUserName in the Reassign activity. I think if you update this property then you will see the correct user name in the history. You can update newAssignPage through NewDefault/PerformDefaults activity customization.
I have tried updating the AssignPage properties during creation. But it gets overriden whenever AddWork activity runs again.All Pega activites used during AddWork are Final, hence we cannot update there directly.