Validating an object by requiring data for specific attributes

You can require that data exist for specific attributes.

Description

A standard message from UCCnet® might not contain all of the data required by an implementation. In this case, certain Retail_Item business object attributes must be identified for which data must exist (the attributes must not be NULL or BLANK) before an item is accepted for processing. Pre-existing code in the ItemValidation template's File Missing Attribute Logic subdiagram enables this type of item validation.

Using this type of validation

To use this type of validation, do the following:
  1. Create a text file that contains one of the following:
    • A simple list of the fully qualified attributes in the Retail_Item business object that must be present (one attribute per line).
    • Complex filters that conditionally specify the list of attributes.
    The first line of the file determines whether simple or complex filtering is performed. If the first line contains a single fully qualified business object attribute name, simple filtering is performed on the rest of the attributes listed in the file. If the first line of the file contains a separator of FILTER or FIELDS, complex filtering is assumed. See Performing simple filtering and Performing complex filtering.
  2. Specify the fully qualified name of this text file in the REQUIRED_ATTRIBUTE_FILE configuration property.
  3. Enable the logic in the File Missing Attribute Logic subdiagram to execute for specific commands attached to a Retail_Item by specifying those commands in the REQUIRED_ATTRIBUTE_CMDS configuration property. Pre-existing logic examines the value of the Retail_Item business object's attribute, named in the configuration property ITEM_COMMAND_ATTRIBUTE, against the values specified in the REQUIRED_ATTRIBUTE_CMDS configuration property. If the value of the attribute named in the ITEM_COMMAND_ATTRIBUTE property is specified in the REQUIRED_ATTRIBUTE_CMDS property, the ItemValidation collaboration object executes the code.
  4. Because the data collection process can be asynchronous or the tool used to perform it (such as a WebSphere® MQ Workflow container) might be limited in size and not able to persist all of the attributes of a Retail_Item business object, save a complete copy of the Retail_Item business object in an item store before it is passed to the ToMissingData port for processing. Set the value of the ItemValidation collaboration object's RETAIN_ITEM_IN_LOCAL_STORE property to true. The collaboration object then calls an ItemStore collaboration object, which actually performs the storage operation.
    Note: The value of the ItemValidation collaboration object's RETAIN_ITEM_IN_LOCAL_STORE property must be set to true for the Product Information Management for Retailers solution to operate properly.

Parent topic: Overall process logic