Calling flow from workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2024 10:42 AM
Hi All,
I am using below script to call a flow from workflow which is working as expected. How can add a wait for condition in workflow till flow is completed?
(function() {
try {
var inputs = {};
inputs['table_name'] = 'sc_req_item';
inputs['request_item'] = current; // GlideRecord of table: sc_req_item
// Start Asynchronously: Uncomment to run in background.
// sn_fd.FlowAPI.getRunner().flow('global.test').inBackground().withInputs(inputs).run();
// Execute Synchronously: Run in foreground.
sn_fd.FlowAPI.getRunner().flow('global.test').inForeground().withInputs(inputs).run();
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
Thanks!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2024 11:08 PM
Hi @pramodkumar ,
Does using Execute Synchronously does not wait till the entire flow is completed.
I thought Execute Asynchronously will start the flow in Background and continue to next and Execute Synchronously will wait till the flow is completed.
No ?
Regards,
Najmuddin.