ValidateCategoriesExist
Rule
Changed on:
12 Aug 2025
Overview
Validates the incoming category event for the existence of the parent and child categories| Plugin Name | Inventory Reference Module |
|---|---|
| Namespace | [[account.id]].globalinventory |
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Validates the incoming category event for the existence of the parent and child categories
Accepts
- PRODUCT_CATALOGUE
Actions
- This rule does not produce any output actions. It validates the incoming child categories and the parent category if they exist. Otherwise, an IllegalArgumentException will be thrown with the missing categories
Rule parameters
There are no Input Parameters for this rule.
Event attributes
| Parameter | Description | Data Type | Required? |
| childCategories | A list of child categories of the category being created/updated. Each child category is a string and the value of this field is a list of strings | [String] | Optional |
| parentCategory | The category reference if the current category being created/updated has a parent category | String | Optional |
Exceptions
- If there is a parent category provided in the incoming event and if it does not exist, an IllegalArgumentException will be thrown.
- If there are one or more child categories provided in the incoming event and if at least one of them does not exist, an IllegalArgumentException will be thrown
Configuration example
1{
2 "name": "{{accountId}}.globalinventory.ValidateCategoriesExist"
3}Detailed Technical Description
The below snippet shows the corresponding Java class definition of the incoming event's event attributes1public class Category {
2
3 @NonNull
4 private String ref;
5
6 private String type;
7
8 private List<Attribute> attributes;
9
10 private String name;
11
12 private String summary;
13
14 private String parentCategory;
15
16 private List<String> childCategories;
17}