sdaiValidateRequiredAttrs


Note: This function can only be used with the EDMmodelChecker license key fully installed.
This operation checks that all mandatory attributes have a value set, i.e. a value unequal to indeterminate. Mandatory attributes are all attributes that is not declared with the OPTIONAL keyword.
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: sdaiValidateInstance , edmiValidateInstance , edmiValidateInstanceType , edmiValidateInstanceTypeBN , edmiValidateModel , edmiValidateModelBN .
Header:
#include "sdai.h"
Prototype:
SdaiBoolean sdaiValidateRequiredAttrs(SdaiAppInstance instance);
Arguments:

instance

A numeric instanceID that uniquely identifies the instance of interest in the EDMdatabase, that is the instance to be checked for unset mandatory attributes.
The instanceID is defined by a sdaiCreateInstance or a sdaiCreateInstanceBN function.

Returns:
A SdaiLogical value that has the following value:
sdaiTRUE : All mandatory attributes of the specified instance have a value set, i.e. all mandatory attribute values are unequal indeterminate.
sdaiFALSE: At least one mandatory attribute in the specified instance have an unset value, i.e. an attribute value equal to indeterminate.
sdaiUNKNOWN: Use sdaiErrorQuery to check for error in operation.
EXAMPLE
SdaiAppInstance anInst;
SdaiLogical result;
. . .
result = sdaiValidateRequiredAttrs (anInst);
switch (result) {
case sdaiTRUE: 
. . . /* No violation in operation */ 
break; 
case sdaiFALSE: 
. . . /* Violation detected */ 
break; 
default: 
. . . /* Unpredictable result */ 
break; 
}
. . .