sdaiValidateGlobalRuleBN


Note: This function can only be used with the EDMmodelChecker license key fully installed.
Validate a model with respect to a specific global rule.
Related functions: sdaiValidateGlobalRule , edmiValidateGlobalRule , edmiValidateGlobalRuleBN , edmiValidateModel , edmiValidateModelBN
Header:
#include "sdai.h"
Prototype:
SdaiLogical sdaiValidateGlobalRuleBN(SdaiModel      model,
                                      SdaiString     ruleName); 
Arguments:

model

A numeric modelID that uniquely identifies a model in the EDMdatabase.
The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

ruleName

The name of the actual global rule. Global rule names are case insensitive.

Returns:
A SdaiLogical value that has the following value:
sdaiTRUE : No constraints or rule violations are found during validation of the specified model.
sdaiFALSE: At least one of applicable violation operations returns a sdaiFALSE value
sdaiUNKNOWN: Use sdaiErrorQuery to check for error in operation.
EXAMPLE
SdaiModel modelId;
SdaiLogical result;
. . .
result = sdaiValidateGlobalRuleBN (modelId, "Product_Requires_Category");
switch (result) {
case sdaiTRUE: 
. . . /* No violation in operation */ 
break; 
case sdaiFALSE: 
. . . /* Rule violation */ 
break; 
default: 
. . . /* Unpredictable result */ 
break; 
}
. . .