Too Soft Cookie Dough
Whole wheat flour isn't going to absorb the same amount of water as white flour, so that's probably the source of the problem. You can either add a bit more flour until you get the right consistency, or reduce the amount of liquid. Margarine counts as liquid as the majority of it is water, so reduce that and maybe add less egg. If it was me, I'd just try adding a couple more tablespoons of flour and see if that fixes it, don't add too much extra right away as you'd be surprised how little flour it takes to change from gooey to firm.