ftos.data.getFlowData
(FintechOS v8.0 to later)
Reads the data for a given flow instance and returns the flow name and instanceId.
Syntax
(method) Data.getFlowData(flowName: string, instanceId: string): any
| Parameter | Description |
|---|---|
flowName
|
The name of the flow. |
instanceId
|
The id of the flow instance. |
Result
It returns the flow name and instanceId.
Example
You have a running flow instance and you want to read the data and log a field from it.
var flowName = "LoanApplicationFlow";
var instanceId = "3f4a9a8c-12ab-4cde-9f01-234567890abc";
var instanceObject = ftos.data.getFlowData(flowName, instanceId);
var amount = instanceObject.amount;
console.log("Amount for this instance is:", amount);
Intellisense
IntelliSense support is available for the ftos.data.getFlowData server SDK method, enabling digital developers to discover and navigate workflow data domain entities, attributes, and relations (both one-to-one and one-to-many) directly through code suggestions as they type. It works consistently across server-side scripts, business service components, and frontend code, dynamically reflecting each workflow's configured data domain to speed up development and reduce runtime errors from mistyped paths.
Scenarios:
-
You write
const flowInstance = ftos.data.getFlowData(flowName, instanceId), and IntelliSense suggests the available first-level entities from the data domain (e.g., flowInstance.application). -
You type flowInstance.application. and IntelliSense suggests that entity's attributes (e.g., code, createdOn).
-
You drill into a 1:1 relation with
flowInstance.application.applicant.and IntelliSense suggests the child entity's attributes (e.g., firstName, lastName) along with any further nested relations. -
You drill into a 1:many relation with
flowInstance.application.applicant.addresses[0]and IntelliSense suggests the collection plus item-level attributes (e.g., countryId, streetName). -
You author server-side scripts or business service components using
ftos.data.getFlowData(flowName, instanceId)and get IntelliSense that mirrors the configured workflow data domain. -
You author frontend code using
formData.modeland get the same IntelliSense behavior as on the server side.