Logging from a flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 07:55 AM
Is there a workflow.info equivalent for a Flow Designer script?
I know that there is a log action, but I would like to update the flow log from a script step to help with debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 07:58 AM - edited 11-08-2022 08:00 AM
You can use the Log action
It will then show in the syslog table
instanceName.service-now.com/syslog_list.do?sysparm_query=sys_created_onONToday%40javascript%3Ags.daysAgoStart(0)%40javascript%3Ags.daysAgoEnd(0)&sysparm_view=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 08:02 AM
Hello Mike
As stated in my original post, I know I can use the log action. I am asking whether the flow / subflow log can be written from a script. I've tried gs.info and gs.warn but nothing is showing in the system or application log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 08:07 AM
Sorry I missed that.
Where are you writing this script? Is it in script step within a custom action, or are you using the inline script editor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 08:14 AM
Hi Mike_R
Inline script editor. I'm trying to set a subflow output variable based on the value returned from a previous step, and it is not working. I want to try debugging the script and gs.info etc. does not seem to be working. That's why I asked whether I can write to the flow log from a script.