Trigger REST Integration Services

The generated SDK provides functions to easily trigger integration services from other places in the service.

Input and output entity

When triggering an integration service, it might be necessary to provide an input entity. The Entity factory can be used to create new input entities, which could be set as input parameter for the service.

If there is an output defined for the integration service, it is returned as a result and can be used for further processing.

Trigger integration service

The following code shows how to trigger a integration service, for example from another service implementation.

// Initialize service input via factory and assign value to input properties
const input = this.factory.entity.nsacrnm.ServiceIdentifier_Input();
input.property1 = 'Some property value';

// Trigger a domain service 
const output = await this.services.nsacrnm.ServiceIdentifier(input);

// Access service output
const val = output.propIdentifier;