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

kavyalead
Fri, 06 Jun 2025 09:34:41 +0000

Loading everything into memory upfront is actually the right approach, but you need to do it smartly. Use Agile’s BOM explosion API to get the flattened structure in a single query, then process it iteratively rather than recursively. This gives you O(n) complexity instead of O(n^depth). Also consider processing in chunks - update 100 components, commit, then continue. This prevents transaction timeout issues.