Try writing to the fdmAPI.logDebug() throughout your script to help troubleshoot and trace execution
strLoadID = str(fdmContext["LOADID"])
fdmAPI.logDebug("Load ID: %s" % strLoadID )
I tried that, and though I am able to get the Load id, the API function fdmAPI.getProcessStates is not retrieving any information with respect to the mentioned Load-id. Do I need to initialize something in my code before getProcessStates is able to get this information ??