PE_GetSelectedItems returning null

I have null relationship and added an action on it. The action opens a search dialog box. When I select some rows of relationship and executes the action, a method named "PE_GetSelectedItems" get executed which is an internal method of ARAS. There is a code of line in the "PE_GetSelectedItems"

parentItem.selectSingleNode("Relationships/Item[@id='" + idArray[k] + "']")  which sometimes returns null value and sometimes returns the selcted rows. I am not able to identify what is the cause.