Apama Capital Markets Foundation 10.11 | Capital Markets Foundation | Order Management | Risk firewall | Sending orders into a risk firewall | Modifying orders
 
Modifying orders
After you submit an order to a risk firewall, you can change the order while the risk firewall is processing it by calling the OrderSender.sendAmend() action. This action sends an amendment to an existing order to the risk firewall associated with this OrderSender object.
The OrderSender.sendAmend() action takes one argument, which is a com.apama.oms.AmendOrder object. The order Id in this object must match the order Id of an order that the risk firewall is handling. If there is a match, the risk firewall queries all registered rule classes and added rule class instances to determine whether to approve the amended order. If the amended order is approved then it is forwarded to any order receivers that are associated with this risk firewall.
The risk firewall rejects the amended order if its order Id does not match the order Id of an order that the risk firewall is handling. The risk firewall might also reject the order based on the query results. If the risk firewall rejects the amended order, the risk firewall generates an OrderUpdate event that contains information about the rejection. If you added any order update callbacks to the originating OrderSender, the risk firewall executes them, which sends the OrderUpdate to the originating OrderSender.
The risk firewall then executes any query response callbacks that you added to the risk firewall.