- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 08:43 AM
I am calling Sub-Flows within a Flow. The Sub-Flows return [status] which is a True/False variable. The Sub-Flow tests correctly, but when it is called from the Flow the Sub-Flow completes, returns the appropriate output when looking at the subflow execution details, but the Flow execution details show an error for the Sub-Flow task.
It is as if the Sub-Flow output variable is not being passed back to the Flow. I have ensured that the variable types are the same, and the Sub-Flow is set to 'Wait for Completion). Any advice or guidance is appreciated. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 10:43 AM
Alright... Support figured out what the issue was.
Even though the error was being shown on the Sub-Flow call, the issue was actually failing on the Update Record Action. Specifically, updating the 'Actual Start' field. I was updating to " return ( new Date() ); "; however, that field requires a String, for some reason, and was not giving a good Error Code. The workaround is to update to " return ( new Date().toString() ); ". Not ideal, but it works...
Thanks everyone for helping!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 01:02 PM
I would try to end your subflow with an
if (condition)
--> assign subflow output (true)
else
--> assign subflow output (false)
Just to make sure that the variable is Always set.
Generally I avoid setting the output within an if statement, because you risk ending the subflow without setting a required/expected value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 01:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 02:14 PM
Just a hunch and maybe worth a try to rule something out regarding the true/false type.
Can you maybe flip the sub flow output type to a string. And just try passing back a string value. At least to see if it processes without error.
Geoff

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 12:00 AM
Good call Geoff, that would have been my next advice.
Create an additional output, a string, and assign it a value at the end of the subflow, just to make sure that something is returned at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 06:51 AM
I added an additional output variable as a string, and set the value to "0" or "1" depending on the outcome. It still failed; however, I noticed something. The Error ocurrs just a few seconds after the Sub-Flow is called from the Flow. The Sub-Flow is still running when the Error is thrown in the Flow. In fact, the Sub-Flow runs for an additional 3 minutes or so to finish it's tasks and sets the output variable. But by that time the Flow is already dead, so it can't receive the output variables.