I need to end the flow ( in flow action ) with completion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2025 04:14 AM
In place of throw I need to end the flow with completion no with error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Jaiti Mohammed,
If you want to end the Action without throwing an error, you don’t need to use throw at all. In a Flow Action Script Step, throwing an error will always send the Flow to the Error path, but using a simple return will end the script and mark the Action as Completed.
(function execute(inputs, outputs) {
var needsRetry = inputs.needs_retry; // Mapped from $(Check for Retry Condition.needs retry)
if (needsRetry) {
// Wait 15 seconds only if retry is required
gs.sleep(15000);
}
// No retry needed just complete normally
return;
})(inputs, outputs);
If you need to send values back to the Flow, you can set output variables before returning.
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Jaiti Mohammed,
Did you get a chance to try this? Was it helpful?
If this solution helped, please consider marking it as the Accepted Solution ,it helps others in the community find the answer more easily.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.