Enabling a UCCnetMessageReceive collaboration object to filter Catalogue Item Notifications for the presence of attributes required by UCCnet.
To provide complex filtering, the file must contain any number of sections, each section containing FILTER and FIELDS subsections. Filterless FIELDS subsections can also be included.
Any number of attributes can be filtered in this way.
Each FILTER subsection must be followed by a FIELDS subsection. A FIELDS subsection must contain the required attributes for the filter above it, each attribute on a separate single line. A FIELDS subsection can be followed by a FILTER subsection, another FIELDS subsection without a filter, or an optional END separator at the end of the file. If a FIELDS subsection is specified without a FILTER subsection in front of it, the list of attributes in that FIELDS subsection is always required.
The UCCnetMessageReceive collaboration object reads through the text file examining the first line. If the line contains a fully qualified business object attribute name, the collaboration object checks all attributes named in the specified file. If any of the listed attributes are missing from the business object or are present in the business object but missing data, the collaboration object logs the business object and handles it according to the value specified in its FILTER_FAIL_RESPONSE configuration property.
If the first line of the file contains a FILTER or FIELDS separator, the collaboration object reads the file until it finds a FILTER subsection that is satisfied by the attribute values contained in the business object being processed. The collaboration object then checks all attributes in the business object against the list of attributes included in the FIELDS subsection related to the satisfied filter.
If any of the attributes in the FIELDS subsection are missing from the business object or are present in the business object but missing data, the collaboration object logs the business object and handles it according to the value specified in its FILTER_FAIL_RESPONSE configuration property.
If no file is specified in the REQUIRED_ATTRIBUTE_FILE property, or if no attributes are indicated within the file, all items are accepted for further processing by the collaboration object.
FILTER notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.informationProviderOfTradeItem.informationProvider.gln 00011112222333 AND notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemUnitDescriptor CASE,PALLET FIELDS notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.netWeight notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.grossWeight notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.height notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.width notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.depth FILTER notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.informationProviderOfTradeItem.informationProvider.gln 00011112222333 AND notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemUnitDescriptor BASE_UNIT_OR_EACH FIELDS notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.netWeight notificationDetail.catalogueItemNotification.catalogueItem.tradeItem. \ tradeItemInformation.tradingPartnerNeutralTradeItemInformation. \ tradeItemMeasurements.grossWeight END
The collaboration object checks if the business object being processed has a gln attribute value of 00011112222333 and a tradeItemUnitDescriptor attribute value of CASE or PALLET. If it does not, the collaboration proceeds to the next FILTER. If it does, the collaboration object then checks if the business object being processed contains the attributes netWeight, grossWeight, height, width, and depth, and that these attributes are not NULL or BLANK. If the business object passes this filter, collaboration object processing continues. If any of the attributes in the FIELDS subsection are missing from the business object or are present in the business object but missing data, the collaboration object logs the business object and handles it according to the value specified in its FILTER_FAIL_RESPONSE configuration property.
The collaboration object then proceeds to the next FILTER subsection. It checks if the business object has a gln value of 00011112222333 and a tradeItemUnitDescriptor attribute value of BASE_UNIT_OR_EACH. If it does, the collaboration object then checks if the business object being processed contains the attributes netWeight and grossWeight, and that these attributes are not NULL or BLANK. If the business object passes this filter, collaboration object processing continues. If any of the attributes in the FIELDS subsection are missing from the business object or are present in the business object but missing data, the collaboration object logs the business object and handles it according to the value specified in its FILTER_FAIL_RESPONSE configuration property.