ftos.data.patchFlowData
(FintechOS v8.0 to later)
Partially updates the data model of a specific flow instance. The supplied object is deep-merged into the existing flow model. Only the properties included in the object are changed; all other properties keep their existing values.
Syntax
Copy
(method) ftos.data.patchFlowData(flowName: string, instanceId: any, objectToChange: any): void
| Parameter | Type | Description |
|---|---|---|
flowName
|
string | The name of the flow. |
instanceId
|
string / GUID | ID of the flow instance you want to update. Can be a string or a unique identifier (GUID). |
objectToChange
|
object | A partial object that follows the structure of the flow's data model (for example, technicalVariable, application). Only the properties in this object are updated. |
Return value
None (void).
Merge rules
-
Nested objects are merged recursively.
-
Primitive values (string, boolean, number) overwrite the existing value.
-
Properties missing from
objectToChangeare kept unchanged.
Example
Given the following flow model:
Copy
{
technicalVariable: {
testBool: true
},
application: {
applicationNo: 'abc100',
applicant: {
firstName: 'test'
}
}
}
To update only the applicant's firstName:
Copy
ftos.data.patchFlowData(
'flowName',
'instanceId',
{
application: {
applicant: {
firstName: 'doe'
}
}
}
);
The resulting model is:
Copy
{
technicalVariable: {
testBool: true
},
application: {
applicationNo: 'abc100',
applicant: {
firstName: 'doe'
}
}
}