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.
/r
. When you see an application URI with
/sua
, the application has been validated and the delegation REST service is
no longer involved. Delegate configuration example
<EXECUTION>
<PATH>$(res.path)</PATH>
<MODULE>myApp.42r</MODULE>
<DELEGATE service="MyGroup/MyDelegateService">
<anyparameter>MyFirstParameter</anyparameter>
<other>MySecondParameter</other>
</DELEGATE>
</EXECUTION>
DELEGATE
configuration, such as
anyparameter
and other
in this example, are transmitted to the
REST service using HTTP headers. See Pass parameters to the REST service for details on receiving the parameters in the REST service.AnyParameter
in the configuration, in
the header may
become:x-fourjs-environment-parameter-anyparameter
Therefore, it is not recommended to rely on case in the naming of parameters as there is no guarantee that it will be preserved. When working with HTTP headers in your Genero program code, make sure you allow for this by converting them to either upper or lower case.