A machining process produces a batch of n units every time period. At the end of the period, the units are inspected (provided inspection is cost free). Based on the inspection and the quality data as well as the system history, a decision is made as to whether the process is in control. If not, the process is “revised,” in terms of machine recalibration, maintenance, or repair. In the presence of inspection cost, there is also the need to decide whether to inspect the produced batch. We formulate the problem as Markov decision programs, considering both discounted and average costs. We prove the optimality of certain threshold policies, and characterize the monotone behavior of the optimal thresholds.