I would try replacing the level / Presure switch (Small round sensor with 2/3 wires on it) This tells it when its empty and full of water.
Our dishwasher empties when turned on
purchasing a new one presure switch, you may need to adjust it ?
Maurice Leach
January 2005