Flow actions not executing from transform script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi all,
I am trying to execute flow actions from transform scripts using the code snippet that we get. The same snippet is working as expected in other server side scripts, but from transform scripts (onAfter, onComplete), the action is not even executing, and the code is getting stuck at a particular point.
What can be the possible reasons for this?
Thanks,
SD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
share screenshots on how you are doing that?
Which other scripts are able to call those flow actions?
Make sure your Flow Action is Configured to Run as -> System User
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi @Ankur Bawiskar ,
This is the code snippet I am running. And the same code snippet is working as expected in business rules, ui actions, script includes.
But as I said, that in transform scripts, the action is not executing at all.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
you should run the code in background and not foreground if you want to make it run async
are you sure the action is configured to Run as -> System User?
Also did you check the action might have executed but it threw error as soon as it started?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday - last edited yesterday
Hi @Ankur Bawiskar ,
Similar result while running the flow in the background.
Also, we don't have the option to specify the 'Run As' in flow actions. That option is there in flows and subflows.
Thanks,
