Overall process logic

The process logic includes validation and filtering.

Definition of NULL and BLANK

Throughout this section, the terms NULL and BLANK are defined as true responses when the attributes are tested using the business object methods isNull() and isBlank(), respectively. The method isNull() returns true when a value has never been set in an attribute. The method isBlank() returns true when the attribute contains a zero-length string. An attribute containing a space character is not considered BLANK by the isBlank() method.

Process flow

The following flow shows the process logic for this collaboration template's Create verb:

An ItemValidation collaboration object is triggered by the receipt of a Retail_Item business object and a Create verb containing a Create, Update, Delete, or Load message type. This trigger is sent by a message source.
Note: Message type is equivalent to the value of the Retail_Item business object attribute named in the collaboration object configuration property ITEM_COMMAND_ATTRIBUTE (by default, internals.item_command).
Message type Usage
Create An item is to be treated as a new submission from the source channel.
Update An existing item is being updated to reflect changes in data previously submitted.
Delete An item is no longer available and is to be processed for removal.
Load The initial loading of items.
  1. The ItemValidation collaboration object executes any code added to its template to evaluate the Retail_Item business object according to customized business policy rules. The business policy logic code must change the item status to either a value of Review or Rejected, which directs further processing by the collaboration object.

    The ItemValidation collaboration template supports the application of business policy logic to any or all Retail_Item business object commands or message types. If you implement this template, you must set specific configuration properties within the collaboration object and add the customized code containing the business policy rules to the collaboration template. See Validating an object against customized business policy rules.

    If the Retail_Item business object status is not set to Rejected by the business policy logic, the ItemValidation collaboration object continues to process it. If the Retail_Item business object status is set to Rejected by the business policy logic, the collaboration object aborts any further processing and returns the business object to the caller through its From port. The collaboration object can initiate notification of the rejection. See Notifying of item rejection or processing error conditions.

  2. If the Retail_Item business object status is not set to Rejected by the business policy logic, the ItemValidation collaboration object checks that particular attributes of the business object that the user has specified must contain data are not NULL or BLANK. These specified attributes are determined to be missing if they are NULL or BLANK. Simple or complex filtering can be used to conditionally specify which attributes must contain data.

    This missing data check logic is configured to execute for any or all Retail_Item business object commands or message types through specific configuration properties, which must be set by the user. You can also add customized data check logic to the collaboration template. See Validating an object by requiring data for specific attributes.

    Based on the results of this check, the collaboration object handles the Retail_Item business object as follows:
    • If all required attribute data is present, the ItemValidation collaboration object continues to process it.
    • If the business object is missing data for any specified Retail_Item attribute, the collaboration object adds the attribute name to another Retail_Item business object list attribute, which is specified in the CUST_DATA_MISS_ATTR configuration property (by default, internals.customer_data_missing_attributes) and continues to process the object.
  3. The ItemValidation collaboration object executes any customized code the user has added to the template for the command or message type associated with the business object.
  4. If configured to do so, the ItemValidation collaboration object accommodates persisting the business object to a local store by sending it to its LocalItemStore port to be passed to an ItemStore collaboration object. See Persisting an object to a local item store.
  5. If configured to do so via collaboration properties, the collaboration builds a Retail_Audit business object from any optional audit information included in the triggering business object and other audit information specific to the collaboration instance and the Retail_Item being processed and sends the Retail_Audit object to the Audit port. The audit data, including any changes made by the external audit process, is appended to the Retail_Item and passed along to the next appropriate port for further processing.
  6. The ItemValidation collaboration object sets the business object's status to Review. It processes the business object according to whether it is missing data for any specified Retail_Item attribute, as follows:
    1. If the object is missing required attribute data, the collaboration object passes it to its ToMissingData port to trigger a process for obtaining the missing data. The ToMissingData port can be connected to another collaboration object or to an asynchronous process for collecting the missing attribute values.
    2. If all required attribute data is present, the collaboration object passes it to its To port to trigger an ItemDispatcher collaboration object.

If error conditions are encountered during any stage of processing, the ItemValidation collaboration object sets the Retail_Item business object's attribute value named in the configuration property ITEM_STATUS_ATTRIBUTE to Error, logs the error, and returns the object to the calling collaboration object through its From port.

The ItemValidation collaboration object can log the Retail_Item business object in the configured IBM® WebSphere® InterChange Server (ICS) log destination based on the value of the attribute named in the configuration property ITEM_STATUS_ATTRIBUTE. Logging is controlled through the configuration properties LOG_ERROR_ITEM, LOG_REVIEW_ITEM, and LOG_REJECTED_ITEM.

The collaboration object can also initiate notification of item rejection after business policy analysis or if any error conditions are detected during processing. See Notifying of item rejection or processing error conditions.

Parent topic: Collaboration template processes