Configure delegation for application or service

To delegate the start of an application or service to a Genero REST service, specify a DELEGATE element in the EXECUTION component of your application or service.

The DELEGATE element requires an attribute called service. For the service attribute, specify the Genero REST service that will be in charge of all delegated requests for the application or service. The REST service must be correctly configured in the Genero Application Server.

You can define optional parameters for the REST service to be sent each time a starting request is received. No validation is made for these optional parameters, the REST service must check them and return an error when necessary.

Note: A starting request is a URL with /r. When you see an application URI with /sua, the application has been validated and the delegation REST service is no longer involved. For more information see Application URIs

Delegate configuration example

<EXECUTION>
  <PATH>$(res.path)</PATH>
  <MODULE>myApp.42r</MODULE>
  <DELEGATE service="MyGroup/MyDelegateService">
    <AnyParameter>MyFirstParameter</AnyParameter>
    <Other>MySecondParameter</Other>
  </DELEGATE>
</EXECUTION>

Parameters defined in the DELEGATE configuration, such as AnyParameter and Other in this example, are transmitted to the REST service. See Passing parameters to the REST service for details on receiving the parameters in the REST service.