PX script hangs during multi-level BOM change workflow in change management module

marco_data
Sun, 18 May 2025 08:15:00 +0000

We’re experiencing severe performance issues with our change management workflow when processing ECOs that affect multi-level BOMs. Our custom PX script is designed to propagate changes through the entire BOM hierarchy, but it hangs indefinitely when the BOM has more than 4-5 levels.

The PX recursion handling walks through each BOM level to update affected components and their children. However, with deeper BOM structures (we have some 8-10 level assemblies), the script execution just stops responding. Here’s the core logic that’s causing problems:

public void processBOMLevel(IBOMItem item, int level) {
    for (IBOMLine line : item.getBOMLines()) {
        updateComponent(line);
        processBOMLevel(line.getChild(), level + 1);
    }
}

The workflow step optimization seems inadequate for complex assemblies. We’re seeing memory consumption spike and eventually the change order closure gets blocked completely. The PX script doesn’t throw errors - it just hangs, forcing us to restart the application server. Multi-level BOM processing shouldn’t be this problematic. Any suggestions on handling deep BOM recursion more efficiently?