@Override
    public String execute(){
        String actionResult = "";
       try{ 
        
        Map<String, Object> session = ActionContext.getContext().getSession();
        User user = (User) session.get("USER");
        
        list = new DataService().getUseSubUserList(user.getUserId(),user.getUprofile());

        DeviceBusinesService deviceBusinessService = new DeviceBusinesService();
        String str = deviceBusinessService.validateDevice(dsim_num, deviceid, userid, user);

        if(str.equals("sim"))
        {
           addFieldError("dsim_num", "SIM already in used.");
           if(user.getUprofile()==3){
           actionResult = "input1"; 
           }else{
           actionResult = "input2"; 
           }
        }else{
           if(str.equals("deviceid")){
              addFieldError("deviceid", "Device ID already EXIST.");
              if(user.getUprofile()==3){
               actionResult = "input1"; 
              }else{
              actionResult = "input2";
              }
              }else{
               if(str.equals("ok")){
                 // Now , insert.
                   Device device = new Device();
                   
                   device.setUserid(userid);
                   device.setDeviceId(deviceid);
                   device.setDtype(dtype);
                   device.setDiemi(diemi);
                   //device.setDreg_date(new Date().toLocaleString());
                   device.setDsim_num(dsim_num);
                 
                   str = deviceBusinessService.createDevice(device);
                   if(str.equals("success")){
                      //addFieldError("deviceid", "Successfully Added");
                      actionResult = "success";
                   }else{
                     if(str.equals("SQLException")){
                       actionResult = "SQLException";
                     }
                   }
               }
           }
        }
//        if (user.getUprofile() == 1) {
//			actionResult = "individual";
//			setCurrentUserName(getCurrentUserName()+" [I]");
//		} else {
//			if (user.getUprofile() == 2) {
//				actionResult = "group";
//				setCurrentUserName(getCurrentUserName()+" [G]");
//			} else {
//				if (user.getUprofile() == 3) {
//					actionResult = "admin";
//					setCurrentUserName(getCurrentUserName()+" [A]");
//				}
//			}
//		}
        
        log.info("Going with "+actionResult);
       }catch(Exception e){
         log.info("Ye bat hai "+e);
       }
        log.info("actionResult==>"+actionResult);
        return actionResult;
    }