INTRODUCTION TO EXTENDING THE WMS RULES ENGINE
This Chapter describes how users can extend the Warehouse Management Rules engine to use custom user-defined rules.
WAREHOUSE MANAGEMENT RULE
In order to add a custom Warehouse Management Rule, the user needs to create a java class that implements the interface WMSRuleIntf.java.
Create a New Rule
Navigate to the "Warehouse Management Rule" window and create a new Rule.
Enter a name and description for the rule, and select the appropriate type.
From the Rule drop down, set the Rule to "Use custom class".
Enter the Java Class name for the Rule in the "Custom Class" field.
Enter a zone if appropriate and Save.
JAVA CLASS
Create a new Java Class
In order to add a custom Warehouse Management Rule, the user needs to create a java class that implements the interface WMSRuleIntf.java.
WMSRuleIntf.java
This is the interface to implement when you want to create a custom Warehouse Management Rule. Once the class is created, the fully qualified class name must be entered in the Warehouse Management Rule window as described above.
MLocator[] getValidLocators(Ctx ctx, int M_Warehouse_ID, int M_Zone_ID, int M_Product_ID, String trxName);
Parameters:
Ctx ctx : Server Context
int M_Warehouse_ID : Warehouse on the rule
int M_Zone_ID : Zone on the rule, if specified
int M_Product_ID : Product being putaway or picked
String trxName : Database transaction
Returns: The list of valid locators that qualify for this rule.