Package wt.businessRules
Class BusinessRule
java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.enterprise._Simple
wt.enterprise.Simple
wt.businessRules._BusinessRuleObject
wt.businessRules.BusinessRuleObject
wt.businessRules._BusinessRule
wt.businessRules.BusinessRule
- All Implemented Interfaces:
com.ptc.windchill.bac._BACManaged,com.ptc.windchill.bac.BACManaged,Externalizable,Serializable,wt.access._AccessControlled,wt.access._PolicyAccessControlled,wt.access._SecurityLabeled,AccessControlled,wt.access.PolicyAccessControlled,SecurityLabeled,wt.admin._DomainAdministered,DomainAdministered,wt.businessRules.BusinessRuleObjectIfc,wt.fc._NetFactor,wt.fc._ObjectMappable,wt.fc._Persistable,wt.fc.adminlock._AdministrativelyLockable,AdministrativelyLockable,wt.fc.BusinessInformation,NetFactor,ObjectMappable,Persistable,DisplayIdentification,wt.inf.container._WTContained,WTContained,wt.notify._Notifiable,Notifiable,wt.recent.RecentlyVisited
@GenAsPersistable(superClass=wt.businessRules.BusinessRuleObject.class,extendable=true,properties={@GeneratedProperty(name="config",type=java.util.HashMap.class,typeParameter="<String,String>",columnProperties=@ColumnProperties(columnType=INLINE_BLOB),supportedAPI=PRIVATE,javaDoc="A serialized Map that holds information to execute the rule"),@GeneratedProperty(name="selector",type=java.lang.String.class,supportedAPI=PUBLIC,javaDoc="An identifier to lookup the rule validator class.",constraints=@PropertyConstraints(required=true,upperLimit=256))})
public class BusinessRule
extends _BusinessRule
A business object that will hold the information about the rules to be
executed. A
The config attribute is used to hold the serialized information for executing the rule. At the rule execution, the config attribute will be de-serialized map, the structure should will be a key / value pair construct. For example, in the state check rule, key could be, "Release" --> "RELEASED,RESOLVED" and "PRE_RELEASE" --> "PROTOTYPE".
Supported API: true
Extendable: false
BusinessRule is a business object that will be
linked to the RuleSet using a binary link RuleLink.
The business rule object is executed as a part of the business rules engine
execution plan. A set of rules are fetched for a rule set key, which is then
executed by the rules engine to evaluate a particular rule. The results are
populated in a validation object for each rule and returned as a set from the
business rules engine.The config attribute is used to hold the serialized information for executing the rule. At the rule execution, the config attribute will be de-serialized map, the structure should will be a key / value pair construct. For example, in the state check rule, key could be, "Release" --> "RELEASED,RESOLVED" and "PRE_RELEASE" --> "PROTOTYPE".
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from class wt.businessRules._BusinessRule
SELECTORFields inherited from class wt.businessRules._BusinessRuleObject
DESCRIPTION, ENABLED, NAME, UNIQUE_KEY -
Method Summary
Modifier and TypeMethodDescriptionstatic BusinessRulenewBusinessRule(String key, String selector) Creates an instance of theBusinessRuleobject that holds the attribute information.static BusinessRulenewBusinessRule(String key, String selector, String name, boolean enabled, HashMap<String, String> config) Creates an instance ofBusinessRuleobject that holds the attribute information.Methods inherited from class wt.businessRules._BusinessRule
getSelector, setSelectorMethods inherited from class wt.businessRules._BusinessRuleObject
getUniqueKey, isEnabled, setDescription, setEnabled, setName, setUniqueKeyMethods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface wt.fc.Persistable
checkAttributes
-
Method Details
-
newBusinessRule
public static BusinessRule newBusinessRule(String key, String selector, String name, boolean enabled, HashMap<String, String> config) throws WTExceptionCreates an instance ofBusinessRuleobject that holds the attribute information.
Supported API: true- Parameters:
key-selector-name-enabled-config-- Returns:
- Throws:
WTException
-
newBusinessRule
Creates an instance of theBusinessRuleobject that holds the attribute information. Attribute enabled will be true, while as the name and the config will be set to null.
Supported API: true- Parameters:
key-selector-- Returns:
- Throws:
WTException
-