高级自定义 > 业务逻辑自定义 > 业务规则 > 加载业务规则对象 > 过程 > 删除业务规则对象
  
删除业务规则对象
可使用命令行实用程序 DeleteBusinessRuleObjects 删除现有业务规则对象。要删除业务规则或业务规则集,自变量为
windchill wt.businessRules.DeleteBusinessRuleObjects “typeOfObjectToDelete:key:containerPath”
自变量名称
说明
应用于
示例
typeOfObjectToDelete
要删除对象的类型
BusinessRule
BusinessRuleSet
BusinessRuleLink
BusinessRule
BusinessRuleSet
BusinessRuleLink
key
要删除的对象的键
BusinessRule
BusinessRuleSet
CHECKOUT_RULE
CHANGEABLE_PRE_RELEASE
containerPath
对象的容器路径
BusinessRule
BusinessRuleSet
/wt.inf.container.OrgContainer=PTC/wt.pdmlink.PDMLinkProduct=
GOLF_CART
要删除业务规则链接,需要指定其链接的业务规则集和业务规则:
windchill wt.businessRules.DeleteBusinessRuleObjects "typeOfObjectToDelete:key:containerPath:key:containerPath"
由于容器路径可能包含空格,因此要删除的对象的自变量需要用引号括起。如果删除业务规则或业务规则集,则涉及该对象的任何链接也将被删除。可指定一个或多个对象,以空格分隔。
示例
删除业务规则
windchill wt.businessRules.DeleteBusinessRuleObjects "BusinessRule:keyToDelete:/wt.inf.container.OrgContainer=Org Name/wt.pdmlink.PDMLinkProduct=Product Name"
删除 2 个业务规则集
windchill wt.businessRules.DeleteBusinessRuleObjects "BusinessRuleSet:keyToDelete:/wt.inf.container.OrgContainer=Org Name/wt.pdmlink.PDMLinkProduct=Product Name"
"BusinessRuleSet:anotherKey:/wt.inf.container.OrgContainer=Org Name/wt.pdmlink.PDMLinkProduct=Product Name"
删除业务规则链接
windchill wt.businessRules.DeleteBusinessRuleObjects "BusinessRuleLink:businessRuleSetKey:/wt.inf.container.OrgContainer=Org Name/wt.pdmlink.PDMLinkProduct=Product Name:businessRuleKey:/wt.inf.container.OrgContainer=Org Name/wt.pdmlink.PDMLinkProduct=Product Name"