Performing simple filtering

Describes simple filtering of the text in the REQUIRED_ATTRIBUTES_FILE

Process flow

For simple filtering, the text file specified in the REQUIRED_ATTRIBUTE_FILE property must contain a list of the fully qualified attributes in the Retail_Item business object that must be present and not NULL or BLANK. The text file has the following format:
  • A fully qualified business object attribute name on a single line.
  • On the next single line, another fully qualified attribute name.
Any number of attributes can be included in this way.

The File Missing Attribute logic reads the attribute names from this file and employs an external Java™ class called RetailUtility in the Java package com.ibm.wbi.retail.utils to determine if the required attributes listed in the file contain data in the Retail_Item business object being processed. See Using the RetailUtility external Java class for more information. It then adds the names of any required attributes missing data to a Retail_Item business object attribute named in the configuration property CUST_DATA_MISS_ATTR. This attribute consists of a multiple cardinality array of Retail_Missing_Attributes business objects. If there are any names in this missing attribute child business object array, the ItemValidation collaboration object passes the Retail_Item business object to the ToMissingData port to start a process for obtaining the missing data.

The following examples show how the missing attribute list is populated:
  • The attribute customer_data.vendorAddress is included in the required attribute file. The Retail_Item business object that triggers the ItemValidation collaboration object does not contain an instance of the customer_data child business object attribute. Therefore, the missing attribute code does not include customer_data.vendorAddress in the missing attribute list.
  • The attribute customer_data.vendorAddress is included in the required attribute file. The Retail_Item business object that triggers the ItemValidation collaboration object does contain an instance of the customer_data child business object attribute. The vendorAddress attribute is NULL. Therefore, the missing attribute code includes customer_data.vendorAddress in the missing attribute list.
  • The attribute item.catalogueItem.catalogueItemChildItemLink[].catalogueItem.tradeItem.tradeItemIdentification.gtin is included in the required attribute file. The Retail_Item business object that triggers the ItemValidation collaboration object contains two instances of the catalogueItemChildItemLink business object attribute, each of which contains an instance of the catalogueItem.tradeItem.tradeItemIdentification child business object. In each instance, the gtin attribute is NULL. Therefore, the missing attribute code adds the following entries to the missing attribute list:
    item.catalogueItem.catalogueItemChildItemLink[0].catalogueItem.tradeItem.tradeItemIdentification.gtin
    item.catalogueItem.catalogueItemChildItemLink[1].catalogueItem.tradeItem.tradeItemIdentification.gtin
    The missing attribute code includes specific references to all required attributes that exist, but are NULL or BLANK.
  • The attribute item.catalogueItem.catalogueItemChildItemLink[].catalogueItem.tradeItem.tradeItemIdentification.gtin is included in the required attribute file. The Retail_Item business object that triggers the ItemValidation collaboration object contains no instances of the catalogueItemChildItemLink business object attribute. Therefore, the missing attribute code includes no references to the item.catalogueItem.catalogueItemChildItemLink[].catalogueItem.tradeItem.tradeItemIdentification.gtin attribute in the missing attribute list.

Parent topic: Validating an object by requiring data for specific attributes