Flow - Scoped (deprecated)
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- API reference
The Flow API provides methods to run activated Workflow Studio flows.
This API is deprecated and replaced by the ScriptableFlowRunner - Scoped and ScriptableFlowRunnerResult - ScopedAPIs.
The Flow API can only be used in server scripts.
Use the sn_fd
namespace to access the Flow API.
Before interacting with a flow using the Flow API, you must first create and activate the flow in the Workflow Studio interface. Because the Flow API only interacts with pre-built flows, there is no constructor for the class.
Flow - startAsync(String scopeName.flowName, Map flowInputs)
Ignores the trigger and runs an activated flow asynchronously.
Asynchronous calls are non-blocking, allowing the client to execute other code in the script without having to wait for the flow to complete.
Name | Type | Description |
---|---|---|
scopeName.flowName | String | The application scope for the flow and the internal name of the flow to run. If scopeName is not included, the scope of the user currently logged in is used. Retrieve the internal name of the flow using the Internal name column on the Workflow Studio landing page. |
flowInputs | Map | Name-value pairs in <String, Object> format that define
record-based flow inputs.To call a flow with a record-based trigger, use the
format:
The GlideRecord object must be named 'current'. To call a flow with a Service Catalog
trigger, use the
format:
The GlideRecord object must be named 'request_item'. |
Type | Description |
---|---|
Object | PlanResponse object containing the following properties:
An exception occurs when the flow:
|