ebs.callRouteAsync

(FintechOS Studio 24.3.2 and later)

Executes via POST a business service component route asynchronously and returns a promise with a JSON result or an error.

Syntax

Copy
ebs.callRouteAsync(businessServiceComponentName: string, routeName: string, data: any): Promise<any>

 

Parameter Description
businessServiceComponentName The name of the business service component.
routeName The name of the route.
data The called data in JSON format.

Result

It returns the called data in JSON format, as well as promise state, which can be:

Example

Get parameters from a route part of a business service component

In this example:

Copy
ebs.callRouteAsync('bsc-endpoint-01','bsc-route').then((result) => console.log(result));

Return result:

Copy
{prop1: 123, prop2: 1234, prop3: 555}
    prop1: 123
    prop2: 1234
    prop3: 555