If there is no water coming in the machine check first the water supply has not a tap and this is closing.
If water is supplied regularly, then the problem is either with the inlet valve or the float switch.
See the following indications from repairclinic:
"
Water-inlet valveFloat switch
Water-inlet valve
The
water-inlet valve lets water enter the machine. If this valve is
defective, you need to completely replace it. It's usually located
behind the lower access panel on the left or right side. It's the
device with the main water line (usually copper) from the house, a
rubber tube to the dishwasher, and two wires attached to it.
Float switch
The
float switch is a small electrical switch that's located right below
the dishwasher "floor." Above the switch, on the inside of the
dishwasher, is a plastic cylinder that floats up as water fills the
dishwasher. If this switch is defective, or if the plastic float gets
caught or trapped in the raised position, the water can't enter the
dishwasher. If the float switch is defective, you need to replace it."