diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/OperationStatusBean.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/OperationStatusBean.java index 302712e5849..45d38fb6780 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/OperationStatusBean.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/OperationStatusBean.java @@ -44,6 +44,12 @@ public class OperationStatusBean { ) private String status; + @ApiModelProperty( + name = "operationCode", + value = "Operation Code." + ) + private String operationCode; + public int getOperationId() { return operationId; } @@ -59,4 +65,12 @@ public class OperationStatusBean { public void setStatus(String status) { this.status = status; } + + public String getOperationCode() { + return operationCode; + } + + public void setOperationCode(String operationCode) { + this.operationCode = operationCode; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index df8a4b2be2e..804029a13cd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -1417,6 +1417,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } Operation operation = DeviceMgtAPIUtils.validateOperationStatusBean(operationStatusBean); operation.setId(operationStatusBean.getOperationId()); + operation.setCode(operationStatusBean.getOperationCode()); DeviceMgtAPIUtils.getDeviceManagementService().updateOperation(device, operation); if (MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION.equals(operation.getCode()) ||