How to get Execution ID of the current flow in the flow designer Servicenow
This content was last updated in 2023. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 09:25 PM
I have a requirement to get and utilize the execution id of the current flow with trigger being REST-API asynchronous in flow designer. Please let me know some method to get the execution id of the current flow in the same flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 10:34 PM
Hi @Parvathy B1,
I think you might get your answer here - ScriptableFlowRunnerResult | ServiceNow Developers
Please take a look at the getContextId() method.
Let me know if this was helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 09:45 PM
Hey @Parvathy B1
var sysID = FlowScriptAPI.getContextID();
Try above code in script step of action & call the action from flow, which will return the execution ID of current flow.
Result:
Regards,
Vishal