executeRouteAsync
(FintechOS v24.3.2 to later)
Executes a business service component route.
IMPORTANT!
Starting with Platform v24.5.0, this method was renamed from executeRoute to executeRouteAsync.
Starting with Platform v24.5.0, this method was renamed from executeRoute to executeRouteAsync.
Syntax
Copy
function executeRouteAsync(businessServiceComponentName: string, routeName: string, data: any): any
| Parameter | Description |
|---|---|
businessServiceComponentName
|
The name of the business service component. |
routeName
|
The name of the route. |
data (optional) |
Input data for the route. |
Result
Returns the route output.
Examples
This example:
- Runs the createBankAccount route from the bankaccounts business service component using the parameters passed by the client process as input.
- Saves the route output in the result variable.
- Logs the result.
Copy
executeRouteAsync('bankaccounts', 'createBankAccount', ftos.context.data).then(result => ftos.logging.log(JSON.stringify(result)));