Well the way I do it (as I've mentioned before) is to play it as I hear it in my head.
This is one I made yesterday.
It's a bit rough with the odd duff note, but it's only a bit of fun - not a masterwork.
I like solos that are fresh and not overworked (or in this case straight off - first take).
This is my idea on how to construct a solo by using the same method you use when you whistle or hum to yourself. I didn't consider scales or modes or even chords. It's all done in the brain - and I'm the first person to hear it.
http://homepage.ntlworld.com/nwd/impro.mp3