Rule 119 of the Revised Rules of Criminal Procedures states that it is the court that decides who gets to be state witness "upon the motion of the prosecution before resting its case." Simply put, it is the body that prosecuted the case which gets to recommend to the court that someone is qualified as state witness.