To accept or reject an item based on existing business policies, insert customized code into the ItemValidation collaboration template's Business Policy Processing subdiagram.
The pre-existing subdiagram logic examines the value for the Retail_Item business object's attribute named in the ITEM_COMMAND_ATTRIBUTE configuration property against the values specified in the BUSINESS_POLICY_CMDS configuration property. If the value for the attribute in the ITEM_COMMAND_ATTRIBUTE property is specified in the BUSINESS_POLICY_CMDS property, the ItemValidation collaboration object executes the customized code.
The rules in the customized code must specify whether the Retail_Item is accepted or rejected for subsequent processing by changing the value of its attribute named in the configuration property ITEM_STATUS_ATTRIBUTE. If the object is accepted, the code must change the value to Review; if the object is rejected, it must change the value to Rejected. The pre-existing subdiagram logic uses this attribute value to determine whether to return the item to the caller or to continue processing it. If the item is rejected, the business policy subdiagram raises an exception to abort the item processing and returns it to the main scenario, where the item rejection processing is handled.
Parent topic: Overall process logic