Regression test selection problem is treated as an optimal control issue. Three rules are given to transform BPEL application into an universal BPEL form. Our approach can select fewer test cases to test BPEL applications effectively. We prove our optimal control strategy is safe under controlled regression testing.