ftos.flow.initiate

(FintechOS v24.5.0 to later)

Initiates a new flow instance. It creates a flow and returns a GUID of the instance.

This is a business logic method for business service components.

Syntax

Copy
(method) Flow.initiate(flowName: string, objectToInitiate: any): string
 
Parameter Description
flowName The name of the flow.
objectToInitiate The object to initiate with.

Result

Returns a GUID of the instance.

Example

This example starts a new LoanApplicationFlow instance by passing initial data (loan amount and customer name) and stores the returned instance GUID in a variable.

Copy
var flowName = "LoanApplicationFlow";
var objectToInitiate = { amount: 1000, customerName: "John Doe" };
var instanceId = ftos.flow.initiate(flowName, objectToInitiate);