Petri Net Method for Real-Time Control of Rule-Based Systems