SYNTAX:
xpxValidateInstanceWithParameters (currInst : GENERIC;
diagnosticFile : STRING; options : INTEGER; ruleSchemaId : GENERIC; userOutputFile : STRING;VAR validationResultId : GENERIC;VAR returnValue : GENERIC; numberOfParameters : INTEGER; argument1 : GENERIC; argumentN : GENERIC)status : INTEGER;
This function invokes the EDMmodelChecker to validate a particular instance.
The result of the validation can either be a text report or a population of the EXPRESS schema EDM_Validation_Result_Schema. The latter case enables the caller to make his own diagnostic report in his own format.
There exist two options that will influence the amount of information in the validation report produced by this function: XPXNO_PRINT_OUTPUT and XPXFULL_OUTPUT
A standard validation report will be produced when none of these options are set in the <options> argument. A validation report with all available detailed information is produced when the XPXFULL_OUTPUT option is set. No validation report will be produced when the XPXNO_PRINT_OUTPUT option is enabled. The validation result would then normally be in a population of the EDM_Validation_Result_Schema.
When validating an instance against rules specified in an EDMruleSchema, only he following validation options are effective: XPXFULL_VALIDATION, XPXGLOBAL_RULES, XPXLOCAL_RULES, and XPXUNIQUENESS_RULES. XPXFULL_VALIDATION means in this context: XPXGLOBAL_RULES ~| XPXLOCAL_RULES ~| XPXNIQUENESS_RULES .
A number of arguments can be supplied to the ?instance validation process? in the arguments argument1, ?, argumentN. Hence the validation process can be made parameterized. The validation process can return a value to the caller through the returnValue argument. The value to return must be set in the validation process by invoking the xpxReturnValueToCaller operation.
This function is only applicable to application instances.
The data model that holds the instance to validate must be open before this operation can be successfully performed.
The argument <options> specifies the options that should be used during the validation. The <options> argument should be specified as a zero or as a bitwise OR of one or more of the following integer constants:
- XPXFULL_VALIDATION
- XPXGLOBAL_RULES
- XPXLOCAL_RULES
- XPXINVERSE_RULES
- XPXUNIQUENESS_RULES
- XPXREQUIRED_ATTRIBUTES
- XPXAGGREGATE_DATA_TYPE
- XPXAGGREGATE_SIZE
- XPXARRAY_REQUIRED_ELEMENTS
- XPXAGGREGATE_UNIQUENESS
- XPXUNSET_DERIVE_ATTRIBUTES
- XPXOUTPUT_STEPID
- XPXFULL_OUTPUT
- XPXSTOP_ON_FIRST_ERROR
See related functions: xpxGetNumberOfUserParameters, xpxGetUserParameter
This function is equivalent to the EDMinterface function edmiValidateInstanceWithParameters.