高级自定义 > 业务逻辑自定义 > 业务规则 > 略过业务规则 > 示例 > 执行必需业务规则集
  
执行必需业务规则集
为防止更改通告工作流进程继续执行必需业务规则,请将条件更新为仅针对 Resolve Release Conflicts 工作流任务使用必需规则集 EXAMPLE1_RELEASE_RULE_SET
result = "NOT_READY";
com.ptc.core.businessRules.engine.BusinessRuleSetBean[] beans = new
com.ptc.core.businessRules.engine.BusinessRuleSetBean[] {
// Configure to call required rule set only
com.ptc.core.businessRules.engine.BusinessRuleSetBean.
newBusinessRuleSetBean
("EXAMPLE1_RELEASE_RULE_SET", "wt.change2.ChangeRecord2")
};
com.ptc.core.businessRules.validation.RuleValidationResultSet resultSet =
wt.businessRules.BusinessRulesHelper.engine.execute(primaryBusinessObject,
beans);
if ( !resultSet.hasResultsByStatus(com.ptc.core.businessRules.
validation.RuleValidationStatus.FAILURE)) {
result = "PROCEED";
}
else {

businessRulesResultSetGlobal = wt.businessRules.BusinessRulesHelper.
serialize(resultSet);
preReleaseConflictsMsg = new wt.util.WTMessage
("com.ptc.windchill.enterprise.
change2.change2ClientResource", com.ptc.windchill.enterprise.change2.
change2ClientResource.BUSINESS_RULES_PRERELEASE_VALIDATION_MSG,
null).getLocalizedMessage();
preReleaseConflictsMsg = preReleaseConflictsMsg + "\n" + resultSet.
getFailedRulesMessage(java.util.Locale.getDefault());
}
以下是 Resolve Release Conflicts 工作流任务中所示冲突的示例。请注意,Resolve Release Conflicts 工作流任务会继续重新生成任务,直至全部冲突均已解决为止。