The magic answer is...
If your 4000 locks the door but just agitates back and forth, your spin enable switch has failed. This is the switch that is on the far right of the latch assy. When the door lock activates, the wax motor (on the left) pushes a linkage over and locks the door. The micro switch kinda in the center is for the door lock light and the spin enable on the end tells the washer that the door is latched/locked and is ok to rev up to the 800-850 rpm spin. If it doesn't sense that the door is locked, it will tumble back and forth while it waits for the 'all clear'. Replace the switch. While you're at it, check the wax motor. If the plunger tip is the same color as the rest of the wax motor, REPLACE IT!!! It is not a matter of 'if' the older wax motor will short,but WHEN it will short. This will prevent premature destruction of your upper machine control board. If the tip of the wax motor is black, then you have the updated wax motor and should be ok.
Spin Enable switch P/N: 22002162
Door Lock Wax Motor P/N: 12002535
Enjoy!
RCD