API Trigger Code
The following API trigger code performs the equivalent functionality of the
si createcp --issueID=101 command:
//Get the bean
var eb=bsf.lookupBean ("siEnvironmentBean");
//Create an API session bean
var apiSession = eb.createAPISessionBean();
//Create the command
var command = new Packages.com.mks.api.Command("si", "createcp");
command.addOption (new Packages.com.mks.api.Option("issueId", currentID));
//Execute the command and get the response
var response = apiSession.executeCmd (command);