Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Order Management : Risk firewall : Setting up risk firewall evaluation rules : Obtaining information about registered rule classes and rule instances
Obtaining information about registered rule classes and rule instances
A risk firewall provides actions to obtain information for registered rule classes and added rule class instances. You can call these actions on a local risk firewall or a remotely connected risk firewall. For each action, you specify (at least) a callback that returns the requested information.
You can use these interfaces to get the state of a rule class or rule class instance. For example, if you register the position limit rule class provided with the CMF, you can query the current positions accrued by a position limit rule class instance. This can be useful to monitor the current state of the rule class, and perhaps publish the information to a user interface.
You can obtain information for
*A registered rule class
*All registered rule classes
*An added rule class instance
*All added instances for a particular rule class
*All added instances for all registered rule class
To obtain information about registered rule classes:
*RiskFirewall.getRuleClassInfo()
Specify the name of the rule class you want information for and specify a callback.
The callback returns a com.apama.firewall.RuleClassInfo object, which contains the following information for the specified rule class:
*Name
*Description
*Evaluation priority setting
*Configuration schema associated with this rule class. The content of the configuration schema depends on the rule class implementation.
*Any state information, if this rule class publishes state information.
*RiskFirewall.getAllRuleClassInfo()
Specify a callback.
The callback returns the information listed above for each rule class that is registered with this risk firewall. The information is in a dictionary of RuleClassInfo objects, one for each registered rule class.
To obtain information about added rule class instances:
*RiskFirewall.getRuleInstanceInfo()
Specify the instance Id of the rule class instance you want information for and specify a callback. The rule class instance Id is the unique, integer identifier that was returned when the rule class instance was added to the risk firewall.
The callback returns a com.apama.firewall.RuleInstanceInfo object, which contains the following information for the specified rule class instance:
*Rule class name that this object is an instance of
*Rule class instance Id
*A com.apama.firewall.InstanceInfo object, which contains two com.apama.utils.Params objects:
*Configuration schema that was used to create this rule class instance. The content of the configuration schema depends on the rule class implementation.
*Any state information for this rule class instance, if its rule class publishes state information.
*RiskFirewall.getAllRuleInstanceInfo()
Specify the name of a rule class to obtain information for each instance that has been added. Also specify a callback.
The callback returns a com.apama.firewall.AllRuleInstanceInfo object, which contains the following information for the specified rule class:
*Name of the rule class this information is for.
*A dictionary of com.apama.firewall.InstanceInfo objects. There is an InstanceInfo object for each rule class instance. Each InstanceInfo object contains two com.apama.utils.Params objects:
*Configuration schema that was used to create this rule class instance. The content of the configuration schema depends on the rule class implementation.
*Any state information for this rule class instance, if this rule class publishes state information.
*RiskFirewall.getAllRuleClassInstanceInfo()
Specify a callback.
The callback returns a com.apama.firewall.AllRuleClassInstanceInfo object, which is a dictionary:
*The key field values are the names of the registered rule classes.
*The data field values are also dictionaries. There is a dictionary for each registered rule class. In this dictionary, the key field values are the instance Ids of the added rule class instances. The data field values are com.apama.firewall.InstanceInfo objects, which contain the schema and state for that rule class instance.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback