String itemID = req.getParameter("itemID");
int exType = Integer.parseInt(req.getParameter("exType"));
// get the service instance and call replace
if (exType == WorkletService.XTYPE_SELECTION) {
WorkletService ws = WorkletService.getInstance() ;
result = ws.replaceWorklet(itemID) ;
}
else {
String caseID = req.getParameter("caseID");
String trigger = req.getParameter("trigger");
ExceptionService ex = ExceptionService.getInst();