What are the differences in flavor and texture when using the different techniques? Do some vegetables call for one technique rather than the other? Assume you oil the container you roast in.
Stir frying in a pan or in a wok (it's more or less the same thing) is and should be done on high heat and should be a quick operation.
Raw vegetables need to be cut into small size to be cooked as quickly as possible. If you use large pieces of vegetable there is the risk of moisture leeching out and reduce the pan temperature and it will start to boil or steam instead of frying.
In some instances, some vegetables can be par-boiled or blanched in advance to speed up the stir-fry process.
In the case of roasting, it is different, it is a longer process and you can use larger pieces of vegetables; the heat is not that intense and will come from all around the food; not just an intense heat from the bottom.
The oven heat will take care of removing the humidity/moisture from the vegetables.
Oven roasting will also help creating different flavors in vegetables (browning) ; it will usually accentuate the sweetness of most vegetables.
2 different applications, 2 different end results.