The following discusses APIs for performing ruleset operations without using Viewpoint Workload Designer. More specifically:
- Create or replace a TASM rule.
- Delete a TASM rule.
- Manage a rule (for example, enable or disable).
- Activate a ruleset.
Currently, only system throttle, arrival rate meter, and filter rules are supported.
The APIs are external stored procedures (XSPs).
An entry is logged in the DBC.TDWMEventLog table when one of the XSPs is successfully completed.
To create a system throttle, arrival rate meter, or filter rule:
- If you are creating a TASM rule, the desired ruleset or config name can be retrieved from the TDWM.Configurations table. Use 'ALLRULESETS' as the ruleset name to create the rule in all existing rulesets.
- Call the XSP to create the rule without any classification criteria. The new rule in initially disabled.
- TDWM.TDWMCreateSystemThrottle to create a System Throttle rule.
- TDWM.TDWMCreateArrivalRateMeter to create an Arrival Rate Meter rule.
- TDWM.TDWMCreateFilter to create a Filter rule.
- Call XSP TDWM.TDWMAddClassificationForRule to add a classification criterion to the rule. This step is repeated for each additional classification criterion, if necessary.
- Optionally, call XSP TDWM.TDWMAddClassificationForTarget to add a sub-criterion for a Target group classification. This step is repeated for each sub-criterion, if necessary.
- Call XSP TDWM.TDWMAddLimitForRuleState to add the default limit or a query limit for a specific state. This step can be repeated for each state. At least one of these calls must specify the default limit.
- Call XSP TDWM.TDWMManageRule to enable the new rule.
- Optionally, call XSP TDWM.TDWMActivateRuleset to activate an updated ruleset with the new rule.
See Examples.
These APIs directly modify a ruleset or rulesets in the TDWM database so they are not immediately visible through Viewpoint Workload Designer. You need to copy the modified ruleset or rulesets from the Ready section to the Working section to make the changes visible.