private static final String instIdPath = "/repository/components/org.wso2.carbon.instance-id/uuid";
public String retrieveRegId() throws Exception {
RegistryService registryService = Util.getRegistryService();
Registry systemRegistry = registryService.getGovernanceSystemRegistry();
String uuid = null;
systemRegistry.beginTransaction();
boolean isSuccess = false;
try {
if (systemRegistry.resourceExists(instIdPath)) {
Resource resource = systemRegistry.get(instIdPath);
byte[] uuidBytes = (byte[])resource.getContent();