HP Operations Manager for Windows

OV_PropagationRule::Create()
OV_PropagationRule::Create_Trans()


OV_PropagationRule Create(
[in] string Caption,
[in, optional] sint16 DefaultRule,
[in, optional] sint16 NormalRule,
[in, optional] sint16 WarningRule,
[in, optional] sint16 MinorRule,
[in, optional] sint16 MajorRule,
[in, optional] sint16 CriticalRule,
[in, optional] string SettingID,
[in, optional] string Description)
OV_PropagationRule Create_Trans(
[in] string TransId,
[in] string Caption,
[in, optional] sint16 DefaultRule,
[in, optional] sint16 NormalRule,
[in, optional] sint16 WarningRule,
[in, optional] sint16 MinorRule,
[in, optional] sint16 MajorRule,
[in, optional] sint16 CriticalRule,
[in, optional] string SettingID,
[in, optional] string Description)

Parameters

TransId
Transaction ID returned from OV_Transaction::Start().
Caption
The Caption property of the instance of OV_PropagationRule to be created. If a propagation rule with the same Caption already exists, nothing happens, and the method fails with MDLAPI_E_PROPRULE_CAPTION_EXIST. If the Caption parameter is an empty string, contains invalid characters, or has more then 1024 characters, the method fails with MDLAPI_E_INVALID_CAPTION.
DefaultRule
The DefaultRule property value of this service. Optional parameter. Default is 0.
NormalRule
The NormalRule property value of this service. Optional parameter. Default is -98.
WarningRule
The WarningRule property value of this service. Optional parameter. Default is -98.
MinorRule
The MinorRule property value of this service. Optional parameter. Default is -98.
MajorRule
The MajorRule property value of this service. Optional parameter. Default is -98.
CriticalRule
The CriticalRule property value of this service. Optional parameter. Default is -98.
SettingID
The SettingID property of an instance of the OV_PropagationRule to be created. Optional parameter. If you do not specify this parameter, or if it is equal to an empty string, it is created as a new GUID. If a propagation rule with the same SettingID already exists, nothing happens, and the method fails with MDLAPI_E_PROPRULE_SETTINGID_EXISTS.
Description
The Description property of the instance of OV_PropagationRule to be created. Optional parameter.

Calling Convention

These methods can be called from a WMI class or instance object.

Description

Creates a propagation rule (new instance of OV_PropagationRule).

If any propagation rule parameter is not valid, the method fails with MDLAPI_E_INVALID_PARAMETER.

Return Value

Instance of the newly created OV_PropagationRule.

Extended Status Codes

MDLAPI_E_INVALID_CAPTION
Specified object Caption parameter is not valid.
MDLAPI_E_PROPRULE_CAPTION_EXIST
Propagation rule with the same Caption already exists.
MDLAPI_E_PROPRULE_SETTINGID_EXISTS
Propagation rule with the same SettingId already exists.
MDLAPI_E_INVALID_PARAMETER
Parameter is not valid.
MDLAPI_E_TRANSACTION_NOT_EXIST
Transaction with the specified ID does not exist.