sdaiValidateInstance
Note: This function can only be used with the EDMmodelChecker license key fully installed.
Performs all applicable EDMinterface validation operations on the actual instance. The possible validation operations are: sdaiValidateAggrSize , sdaiValidateAggrUniqueness , sdaiValidateArraySparseness , sdaiValidateAttrType , sdaiValidateInverseAttrs , sdaiValidateRedquiredAttrs , sdaiValidateUniqueness , sdaiValidateUniquenessBN .
This operation is applicable only to application instances.
The model that holds the actual instance must be open before this operation can be successfully performed.
Related functions: sdaiValidateAggrSize , sdaiValidateAggrUniqueness , sdaiValidateArraySparseness , sdaiValidateAttrType , sdaiValidateInverseAttrs , sdaiValidateRedquiredAttrs , sdaiValidateUniqueness , sdaiValidateUniquenessBN , edmiValidateInstance , edmiValidateInstanceType , edmiValidateInstanceTypeBN , edmiValidateModel , edmiValidateModelBN
Header:
#include "sdai.h"
Prototype:
SdaiLogical sdaiValidateInstance(SdaiAppInstance instance);
Arguments:
instance |
A numeric instanceID that uniquely identifies the instance of interest in the EDMdatabase, that is the instance to perform all applicable EDMinterface validation operations on. |
Returns:
A SdaiLogical value that has the following value:
sdaiTRUE : All applicable violation operation returns a sdaiTRUE value, i.e. no constraints or rule violations are found during validation of the specified instance.
sdaiFALSE: At least one of applicable violation operations returns a sdaiFALSE value
sdaiUNKNOWN: Use sdaiErrorQuery to check for error in operation.
EXAMPLE
SdaiAppInstance anInst;
SdaiLogical result;
. . .
result = sdaiValidateInstance (anInst);
switch (result) {
case sdaiTRUE:
. . . /* No violation in operation */
break;
case sdaiFALSE:
. . . /* Violation detected */
break;
default:
. . . /* Unpredictable result */
break;
}
. . .