Dishwasher fills with water than drains

The problem started that in all cycles it would not drain. Once it filled with water it went through all cycles with the same water. NOW it fills then drains in all cycles. The arm goes around with some water or mist. A piston that is located in solenoid flies out all the time and no way to keep it in. Driving me crazy. Appreciate any help.

Hi

You have posted in the washer section.

Repost in the dishwasher section and I am sure someone can help you.

Good luck