As noted, there are five types of grain that can become ḥametz after touching water. However, if they are roasted in fire, they can no longer become ḥametz, and in principle they may be mixed with water. Nevertheless, the Sages were concerned lest the roasting not be thorough, and thus the grain would become ḥametz when coming into contact with water. Therefore, one must treat them just as one treats regular cereal grains. If they became wet and 18 minutes passed, we suspect they may have become ḥametz, and it is forbidden to gain any benefit from them; one must destroy them (SA 463:3; MB ad loc 7).
The above concerns kernels of grain that were roasted in fire, but if it was flour that was roasted, there are Rishonim who are lenient, maintaining that one need not suspect that the flour was not roasted well. Thus, it is permissible to mix such flour with water or in a cooked food without concern for ḥametz (Rashi, Rambam). Many Rishonim hold that in the case of flour, as well, one must be concerned that it may have not been roasted thoroughly (Rabbeinu Yeruḥam, Hagahot Smak, Hagahot Maimoniyot, and others). The Aḥaronim rule that one must not mix roasted flour with water or in a cooked food, lest it become ḥametz. Nevertheless, if one did make such a mixture, even though it is forbidden to eat it, it is permissible to keep it until after Pesaḥ and to eat it then (MB 463:8; Kaf Ha-ḥayim ad loc. 13).
However, concerning matza that was properly baked, it is agreed that it cannot become leavened. Accordingly, it is permissible to soak matza and matza meal in water, and, indeed, this is what most people do. Ḥasidim, however, customarily do not eat soaked matza (see below, 8:2).
Scalding the grains or the flour in boiling water also destroys the capacity for becoming ḥametz. However, the Ge’onim prohibited reliance on scalding, for today no one knows how to do this scalding, and if the boiling does not destroy the potential for becoming ḥametz, an opposite process of rapid fermentation may be generated, as heat may hasten fermentation. Therefore, scalded grains or flour are treated just like ḥametz: it is forbidden to gain any benefit from them and one must burn them (SA 454:3; MB 13).
Flour on which water dripped, drop by drop, continuously, even all day long, does not become ḥametz, since the falling of the drops disturbs the flour and shakes it, and does not allow the leavening process to develop. Immediately upon cessation of the dripping, one should knead the dough and bake it. If there is doubt that some of the dripping may not have been continuous, then this is a doubt concerning a law of Torah, and one must relate to that flour as ḥametz and burn it (Pesaḥim 39b; SA 466:6).
Another way to prevent the dough from fermenting is by soaking it in cold water (Pesaḥim 46a; SA 457:2). Preferably, one should not do so, lest the water not be cold enough, allowing the dough to ferment (Rosh, MB 454:18).
Flour that was kneaded with fruit juice does not become leavened at all, but if even a little water was added to the mixture, then it will become leavened (as explained below, 8:1).
And even though we generally are not lenient when it comes to scalding the dough, there are practical applications when dealing with a dangerously sick person, where it is better to minimize the number of prohibitions involved, as explained in MB 454:13.