AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
if (agentInstance==null)
throw new Exception("Unknown processID");
if (statusID!=null) {
//form 2
setProperty(statusID.toString(),agentInstance.CMDSTOP(processID.toString()));
}
else {
// form 1
agentInstance.CMDSTOP(processID.toString());
}