When a search is performed against spec values, there are
a number of validations performed by the runtime against the provided
criteria.
If any of these validations fail, the transaction fails with an
aggregate of the errors found, where possible. These validations
include:
- SpecValueSearchBObj
- Allowable number of SpecValueSearchBObjs can not be exceeded.
The maximum number of these objects allowed is defined by the /IBM/Product/SpecValueSearch/MaxSpecValueSearchBObjs configuration
item and defaulted to 5. Note that this limit is in place because
of the performance implications of the resulting query as the number
of SpecValueSearchBObjs increase.
- The path must correspond to the searchable attribute. For example,
if /penSpec/penId were passed in as the path, an
error would result because penId is not identified as searchable within
the spec definition.
- The path does not contain namespace prefixes. For example, if /penSpec1:penSpec/penSpec1:penDescription were
passed in as the path, an error results.
- Both path and specId are mandatory. If the optional SpecValueSearchBObj
is provided in a search transaction, the values for the path and specId
attributes must be provided.
- The path and specId cannot be repeated. That is, the same path
and specId can not appear in multiple SpecValueSearchBObjs provided
within the same search transaction.
- SpecValueSearchCriteriaBObj is mandatory. At least one SpecValueSearchCriteriaBObj
object must be provided with every SpecValueSearchBObj.
- SpecValueSearchCriteriaBObj
- The allowable number of SpecValueSearchCriteriaBObj must not exceeded.
The maximum number of these objects is defined by the /IBM/Product/SpecValueSearch/MaxSpecValueSearchCriteriaBObjs
configuration item and is defaulted to 20.
- An operator is mandatory and must correspond to the supported
type. All supported operators are defined within the CDXMLCOMPOPTP
table and can be further customized as described in the chapter Custom SQL search queries.
- The number of values corresponds to the operator. For example,
the between operator requires exactly 2 values,
whereas equals requires exactly 1.
- The values correspond to the given operator. For example, an operator
of less than cannot be used on a data type of xsd:boolean.
- Values must correspond to the XML schema data type. For example,
assuming that length were identified as searchable, if the provided
value for a search on /penSpec/penPhysicalDimensions/length does
not correspond to xsd:decimal as defined in the internal
XSD, an error results.
- Search criteria must not exceed configured length restrictions.
Length restrictions are identified by the following configuration
items with their default values indicated in brackets:
- /IBM/DWLCommonServices/SpecValueSearch/MaxLongTotalDigitsSize
(19)
- /IBM/DWLCommonServices/SpecValueSearch/MaxDecimalTotalDigitsSize
(31)
- /IBM/DWLCommonServices/SpecValueSearch/MaxDecimalFractionDigitsSize
(19)
- /IBM/DWLCommonServices/SpecValueSearch/MaxStringValueSize
(255)