The Groovy script for executing the BPEL Management Service is attached in BPELManagmentServiceTest.groovy. Modify the script to suit your needs before executing it in your environment/installation.
cd C:\JavaCAPS6\managementapienv.batcd scripting\groovy\scripts\groovy ServiceTest\BPELManagementServiceTest.groovy
If you are comfortable with the Swing-based groovyConsole, use it to load and execute the script file.
cd C:\scripting\groovy\scripts\env.batgroovyConsole