ftos.flow.changeBusinessState

(FintechOS v24.5.0 to later)

Updates the business state of the flow instance to the specified stateName (a user-defined BusinessState).

This is a business logic method for business service components.

Syntax

Copy
(method) Flow.getBusinessState(flowName: string, instanceId: string): string
 
Parameter Description
flowName The name of the flow.
instanceId The id of the flow instance.

Example

This example changes the business state of an existing LoanApplicationFlow instance to "Approved" by calling ftos.flow.changeBusinessState with the flow name, the instance id, and the target business state name.

Copy
var flowName = "LoanApplicationFlow";
var instanceId = "3f4a9a8c-12ab-4cde-9f01-234567890abc";
var stateName = "Approved";

ftos.flow.changeBusinessState(flowName, instanceId, stateName);