Launch Subflow and Get Results from Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 11:48 AM
Hello,
I was wondering if there was a way to launch a subflow and get the output via script? I've launched subflows from scripts with usage of the .startFlow API but haven't dealt with getting the return variable from script. Any straight forward way of doing this? I believe the startFlow gives you a context ID of the workflow launched and maybe you could poll that context until complete but I'm not sure how you would pull out the return variable and polling is pretty hard to do in a scoped app without the ability to use gs.sleep().
Any help is appreciated!
-Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 12:08 PM
Not sure if this helps, but Steven Bell did a couple of blog posts about subflows:
Calling a Sub-Workflow, Part I
Link to the second article at the bottom of the first!
Cheers,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2021 02:28 AM
Unfortunately that blog refers to sub"workflows" not sub"flows". very similar naming but different solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2021 02:31 AM
Please check out this thread
https://community.servicenow.com/community?id=community_question&sys_id=398a6aecdb4398547d3e02d5ca961913