Transforming Statecharts to Petrinets