Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk firewall : Configuring risk firewall instances : Setting risk firewall query response callbacks
Setting risk firewall query response callbacks
When you send an order into a risk firewall, the risk firewall queries the registered rule classes to determine whether or not to approve the order. If you want, you can add one or more callbacks to be executed each time the query results for an order are available.
To set a query response callback, execute com.apama.firewall.RiskFirewall.addQueryResponseCallback(). This action registers the specified callback with the risk firewall instance it is executed on. The registered callback is executed for every order that enters the risk firewall. The addQueryResponseCallback() action returns a unique integer reference Id that you can use to remove the callback at a later date if required. This action is not asynchronous and is always available.
When a risk firewall instance executes a query response callback it provides the query request as well as the query results. By default, query results contain only failure and warning responses, and not approval responses. This is determined by the settings of these configuration parameters:
*CONFIG_ADD_QUERY_RESPONSE_FAIL — default is true.
*CONFIG_ADD_QUERY_RESPONSE_PASS — default is false.
*CONFIG_ADD_QUERY_RESPONSE_WARN — default is true.
You may want to modify these settings, for example, to record the results of all risk firewall queries for auditing purposes. To do this, you need to set the CONFIG_ADD_QUERY_RESPONSE_PASS parameter to true.
In a query response callback, you cannot override the result of the query. You can, however, publish DataViews that show the warnings or failures that have been issued by the risk firewall.
To remove a previously-added query response callback, execute RiskFirewall.removeQueryResponseCallback() and specify the integer reference Id that was returned when you added the callback. To remove all previously-added query response callbacks, execute the RiskFirewall.clearQueryResponseCallback() action.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback