ftos.flow.forceClose

(FintechOS v24.5.0 to later)

Force close a flow instance with a specific status. The status will be visible only in the database. The flow itself does not have a status, the status is assigned to the instance.

This is a business logic method for business service components.

Syntax

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

The status name.

Example

This example force‑closes an existing LoanApplicationFlow instance by setting its process status to"ClosedBySystem", so the instance is marked as closed in the database with that status name.

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

ftos.flow.forceClose(flowName, instanceId, statusName);