Workflow switching to run as 'System' user if adding a Timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 04:01 AM
Hi,
I initiate a workflow by having a scheduled job running as a user named 'uCMDB_Integration'.
In the workflow I have 2 scripts where I split the transformation of 10 import sets (5 transformations started in each script):
Both are run as the user 'uCMDB_Integration as seen here in the system log:
However, if I add a Timer between the 2 scripts in the workflow:
The 2nd script switches to run as the 'System' user:
How do I avoid this?
Regards,
Kristian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 11:23 AM
Hi Klautrup,
You need to debug this by adding some log statements
How are you triggering the data transformation.
Is it through Scheduled Data Import? If yes then what is the Run as User field value.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 11:07 PM
Hi,
It is a scheduled job with 'Run as User' set to my "uCMDB_Integration" user and the workflow as you see fine starts out running under this user. But as soon as I add a timer to the workflow that seems to cause a switch to the "System" user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2018 01:07 AM
Anybody having a solution to this?
Can't I expect a workflow to keep running as the user starting the workflow if a timer is added in the workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2018 06:42 AM
That is an expected behavior and everything running after the Timer would be under system user. I would suggest you try "Wait for condition" if possible as far as I remember it runs on user context:
https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/workflow-activities/reference/r_WaitForCondition.html
Regards,
Sergiu