I just walked on my treadmill for 20 minutes. I don't see anything in the exercise ring. How is the exercise time counted?
If you hold onto the handle bars, your WATCH has no way to tell that you’re exercising. Your arms need to be swinging during Walking activities for WATCH to credit you exercise minutes.
As @RedEagle2000 mentioned, your activity also needs to cross a certain intensity threshold. That intensity is specific to each individual, with WATCH learning your exercise capacity through your measured heart rate throughout the day, your other activities, etc. Calibrating your WATCH as per Apple’s instructions can help in that department.
This is a bug people have been complaining about since January 2017. The outdoor walk workout app, and others, do not reliably report data to the exercise ring. The walk data does get recorded by the watch- check under the "Workouts" tab in the Activity App, and you will find the distance and heart rate data. It just doesn't flow into the exercise ring. An activity that raises your heart rate to 100% over baseline resting should be considered equivalent to a brisk walk but even pushing your heart rate to 200% of resting baseline won't reliably budge the exercise ring if you are using the Outdoor Walk or several other workout apps to record your workouts. This is a software bug that Apple needs to fix.
Please use the Apple Product Feedback website to specifically complain directly to Apple. If they get enough complaints, they may eventually assign engineers to fix the bug. Otherwise, the Apple Watch fails as a fitness tracker if you intend to use the exercise workout apps to record and track your work outs and close your exercise rings.
Have you tried calibrating your Apple Watch? According to the support article, Calibrating your Apple Watch for improved Workout and Activity accuracy, calibration helps improve accuracy of things like distance and pace when GPS is not available. An example of this would be when you are walking or running on a treadmill.
According to Apple, anything requiring the effort of a brisk walk or greater will be counted in the Exercise ring.
I imagine that your heart rate has a lot to do with how much effort your Apple Watch detects in the activity that you're preforming, but I don't know what BPM it calls exercise.