@Override
    public String execute() {
        String actionResult = "";
        Map<String, Object> session = ActionContext.getContext().getSession();
        User user = (User) session.get("USER");
        if (user != null) {
            setCurrentUserName(user.getFname() + " " + user.getLname() + " [G]");
           
            String str1=vehicleBusinesService.validateDeviceInVehicle(deviceid,vehicleId);
            if(str1.equals("deviceidExist")){
              addFieldError("deviceid","Device ID already EXIST.");                
                actionResult="input";
            }else{
            }if(str1.equals("ok")){
            
            Vehicle vehicle = new Vehicle();

            vehicle.setVehicleId(getVehicleId());
            vehicle.setDeviceid(getDeviceid());
            vehicle.setVn(vn);
            vehicle.setVmake(getVmake());
            vehicle.setVmodel(getVmodel());
            vehicle.setVfuel_type(getVfuel_type());
           
            String str = getVehicleBusinesService().updateVehicle(vehicle);
            
            
                if (str.equals("notUpdated")) {
                    actionResult = "input";
                    System.err.println(actionResult+"notupdated");
                } else {
                    if (str.equals("updated")) {
                        actionResult = "success";
                    }
                }
            
            }
            if (user.getUprofile() == 2) {
                setCurrentUserName(getCurrentUserName() + " [G]");
            } else {
                if (user.getUprofile() == 3) {
                    setCurrentUserName(getCurrentUserName() + " [A]");
                }
            }
        }
        return actionResult;
    }