add check for script execution, modify EventState and other state related info.