Apama 10.3 | Apama Capital Markets Foundation Documentation | Capital Markets Foundation | Order Management | Risk firewall | Sending orders into a risk firewall | Cancelling orders
 
Cancelling orders
After you submit an order to a risk firewall, you can cancel the order while the risk firewall is processing it by calling the OrderSender.sendCancel() action. This action sends a cancellation request for an existing order to the risk firewall associated with this OrderSender object.
The OrderSender.sendCancel() action takes one argument, which is a com.apama.oms.CancelOrder 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 determines whether to allow the cancellation. The criteria used to determine whether to allow the cancellation is up to the rule class implementation. The default rule classes always approve cancellation requests. If the cancellation request is approved then it is forwarded to any order receivers that are associated with this risk firewall.
The risk firewall rejects a cancellation request 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 cancellation request for some other reason that is application-specific. If the risk firewall rejects the cancellation request, 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.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.