INV_CUSTOM_UNPLANNED_LOAD_VALIDATOR
Description: N4 normally prevents loading an unplanned container on a vessel. Use this extension type to relax these validations to enable the N4 Mobile Hatch Clerk or Crane Team UI to override default N4 validation when loading containers to:
Empty/unplanned slots
Different planned positions
Already occupied slots
This is useful for barge loads, which by nature do not have stowage positions, or being able to swap or change planned load positions for direct loads.
With this code extension deployed to your operational specifications, the hatch clerk can update the vessel position and complete a load of a full or empty container to a position that is already planned with a different container, whether or not the stow factor is matching. Additionally, customizing this code extension for your site can enable you to load unplanned empty containers.
The code extension methods are invoked with the UnitFacilityVisit representing the UFV that needs to be loaded onto the vessel or rail, the position on the vessel or rail, and the visit details. By doing this, an extension using this type finds all details about the vessel or rail visit for which the hatch or rail clerk is working. As a result, the method returns a Boolean value that indicates whether the UFV may be loaded to the specified vessel or rail position or not.
If you implement this code extension, N4 disregards all other product validations.
N4 does not invoke this code extension for automated loads done without N4 Mobile Hatch Clerk or Crane Team UI.
Abstract Base Class: AbstractCustomUnplannedLoadValidator
Methods: performValidationToLoadToUnplannedSlots,performValidationToLoadOnMismatchPlans
Module: Inventory
Version Added: 2.5, backmerged to 2.3 and 2.4
Requires Code Extension Name or Name Pattern: Yes
Code Extension Name or Name Pattern: CustomUnplannedLoadValidator
Where to Specify Code Extensions of this Type: Not necessary. Code extension is called by name.
System-Seeded Code Extensions Using this Type: None
Code example
The following groovy stub can be used to allow N4 to load the unplanned container using N4 Mobile Hatch Clerk.
Notes
The code extension will work for both vessel and rail loading.
If you use the template stub as is, without inserting additional validations for your site, you are allowing loads to empty, unplanned, mismatched, already occupied, and incomplete slots.
import com.navis.inventory.external.inventory.AbstractCustomUnplannedLoadValidator
import com.navis.inventory.business.units.UnitFacilityVisit
import com.navis.argo.business.model.LocPosition
import com.navis.argo.business.model.VisitDetails;
public class CustomUnplannedLoadValidator extends AbstractCustomUnplannedLoadValidator
{
/**
* To perform custom validations if container is loaded to an unplanned/empty slot on vessel/rail as by default we don't allow.
*
* @param inUfv UnitFacility visit
* @param inLocPosition loc position
* @param inVvd Carrier Visit Details
* @return either true or false
*/
@Override
public boolean performValidationToLoadToUnplannedSlots(UnitFacilityVisit inUfv, LocPosition inLocPosition, VisitDetails inVvd) {
boolean result = true;
// If any validation needed will go here. If call has to be made by only Hatch Clerk and no further validatio needed
// then simply set result = true;
return result;
}
/**
* To perform custom validations if container is loaded to mismatch planned slot on vessel/rail as by default we don't allow.
*
* @param inUfv UnitFacility visit
* @param inLocPosition loc position
* @param inVvd Carrier Visit Details
* @return either true or false
*/
@Override
public boolean performValidationToLoadOnMismatchPlans(UnitFacilityVisit inUfv, LocPosition inLocPosition, VisitDetails inVvd) {
boolean result = true;
// If any validation needed will go here. If call has to be made by only Hatch Clerk and no further validatio needed
// then simply set result = true;
return result;
}
/**
* To perform custom validations if container is loaded to already occupied slot on vessel/rail as by default we don't allow.
*
* @param inUfv UnitFacility visit
* @param inLocPosition loc position
* @param inVvd Carrier Visit Details
* @return either true or false
*/
@Override
public boolean performValidationToLoadToOccupiedSlots(UnitFacilityVisit inUfv, LocPosition inLocPosition, VisitDetails inVvd) {
boolean result = true;
// If any validation needed will go here. If call has to be made by only Hatch Clerk and no further validatio needed
// then simply set result = true;
return result;
}
}