ValidateProductCategoriesExist
Changed on:
18 Oct 2024
Overview
Validate the incoming Product to confirm that the given Categories already exist.
Plugin Name | Inventory Reference Module |
---|---|
Namespace | [[account.id]].globalinventory |
The is the foundation for related implementations. It provides reference Workflows for inventory ingestion and processing. Extensible by design, use this Module as a base to build a solution to the needs of your customers.
The Module includes the following areas:
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Validates the incoming product event to confirm the given categories already exist.
Accepts
- PRODUCT_CATALOGUE
Actions
- This Rule does not produce any Actions
Rule parameters
This has no Input Parameters.
Event attributes
Name | Type | Description | Required |
| [String] | A list of categories this product belongs to | No |
Exceptions
- This Rule throws an
`IllegalArgumentException`
if any of the specified Categories do not exist.
Configuration example
1{
2 "name": "[[account.id]].globalinventory.ValidateProductCategoriesExist"
3}
Detailed Technical Description
This parses / deserializes `categoryRefs`
. If there is at least one Category Reference provided in the incoming attributes, it:
- Checks if that Category(ies) exists in the Product Catalog, using the
`entityRef`
field value of the incoming event as the Product Catalog Reference. - An
`IllegalArgumentException`
will be thrown if at least one Category does not exist in the Product Catalog. - Otherwise, the Rule does not have any output Actions.
Version History
v.24.10.28
This has been extended with a pagination logic to ensure correct execution when a given Product is associated with more than 100 Categories.
The Version refers to the Product Release Version.
v2.0.0
refers to