sdaiValidateGlobalRule


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: sdaiValidateGlobalRuleBN , edmiValidateGlobalRule , edmiValidateGlobalRuleBN , edmiValidateModel , edmiValidateModelBN
Header:
#include "sdai.h"
Prototype:
SdaiLogical sdaiValidateGlobalRule(SdaiModel      model,
                                    SdaiGlobalRule rule); 
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

rule

A numeric ruleID that uniquely identifies the uniqueness rule in the EDMdatabase that will be validated by this operation.
The ruleID can be retrieved by the edmiGetGlobalRule operation

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;
SdaiGlobalRule globalRuleId;
SdaiLogical result;
. . .
result = sdaiValidateGlobalRule(modelId, globalRuleId);
switch (result) {
case sdaiTRUE: 
. . . /* No violation in operation */ 
break; 
case sdaiFALSE: 
. . . /* Rule violation */ 
break; 
default: 
. . . /* Unpredictable result */ 
break; 
}
. . .