ServiceNow Executing a Flow Action via Script (Async and Sync) Diff between asynch v synch //-- Start Asynchronously: Uncomment to run in background. Code snippet will not have access to outputs. //-- sn_fd.FlowAPI.getRunner().action('global.glidepath__create_sso'). inBackground ().withInputs(inputs).run(); //-- Execute Synchronously: Run in foreground. Code snippet has access to outputs. var result = sn_fd. FlowAPI .getRunner().action( 'global.glidepath__create_action' ). inForeground ().withInputs(inputs).run(); var outputs = result.getOutputs(); ...
All things ServiceNow... take a look at my channel: https://www.youtube.com/@cloudminus89