Thank you Esteban Aliverti for your help.
I take a look at the tests as your suggestion. Now, I can trigger the ScriptTask inside the AdHocSubProcess by using kSession.signalEvent("ScriptTask", null, activeProcessInstance.getId());. However, the JBPM did not return to EndEvent in the Process after the ScriptTask was triggered. I tried to using mKSession.signalEvent("EndEvent", null, activeProcessInstance.getId()); but it did not work. It seem that the ScriptTask was triggered but not completed. Additional, I tried to run the testAdHocSubProcess() at the test and found that the ScriptTask named "Goodbye" was not triggered same as the EndEvent in my Process too. Is it a JBPM bug? Or I miss something?