diff --git a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java
index 3995185..f326d92 100644
--- a/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java
+++ b/adapters/etsi-sol002-adapter/src/main/java/org/onap/so/adapters/vevnfm/aai/AaiConnection.java
@@ -25,11 +25,22 @@
 import java.util.List;
 import java.util.Optional;
 import org.apache.logging.log4j.util.Strings;
-import org.onap.aai.domain.yang.*;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aai.domain.yang.EsrSystemInfo;
+import org.onap.aai.domain.yang.EsrSystemInfoList;
+import org.onap.aai.domain.yang.EsrVnfm;
+import org.onap.aai.domain.yang.EsrVnfmList;
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
+import org.onap.aai.domain.yang.RelatedToProperty;
+import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.RelationshipData;
+import org.onap.aai.domain.yang.RelationshipList;
+import org.onap.aai.domain.yang.Vserver;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.adapters.vevnfm.exception.VeVnfmException;
 import org.slf4j.Logger;
@@ -104,7 +115,7 @@
     }
 
     private List<EsrSystemInfo> receiveVnfmInternal() {
-        final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VNFM_LIST);
+        final AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfmList());
         final Optional<EsrVnfmList> response = getResourcesClient().get(EsrVnfmList.class, resourceUri);
 
         if (response.isPresent()) {
@@ -127,7 +138,7 @@
 
     private List<EsrSystemInfo> receiveVnfmServiceUrl(final String vnfmId) {
         final Optional<EsrVnfm> response = getResourcesClient().get(EsrVnfm.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId).depth(Depth.ONE));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)).depth(Depth.ONE));
 
         if (response.isPresent()) {
             final EsrVnfm esrVnfm = response.get();
@@ -143,8 +154,8 @@
     }
 
     public String receiveGenericVnfId(final String href) {
-        final AAIResourceUri resourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam(SELFLINK, href);
+        final AAIPluralResourceUri resourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam(SELFLINK, href);
         final Optional<GenericVnfs> response = getResourcesClient().get(GenericVnfs.class, resourceUri);
 
         if (response.isPresent()) {
@@ -165,7 +176,7 @@
     }
 
     public String receiveVserverName(final String genericId) {
-        final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericId);
+        final AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericId));
         final Optional<GenericVnf> response = getResourcesClient().get(GenericVnf.class, resourceUri);
 
         if (response.isPresent()) {
@@ -199,7 +210,7 @@
     private String receiveVserverNameFromParams(final String cloudOwner, final String cloudId, final String tenantId,
             final String vserverId) {
         final AAIResourceUri resourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudId, tenantId, vserverId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudId).tenant(tenantId).vserver(vserverId));
         final Optional<Vserver> response = getResourcesClient().get(Vserver.class, resourceUri);
 
         if (response.isPresent()) {
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
index d9450b3..8f95d8a 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/main/java/org/onap/so/adapters/etsisol003adapter/lcm/extclients/aai/AaiServiceProviderImpl.java
@@ -26,8 +26,8 @@
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant;
 import org.slf4j.Logger;
@@ -49,7 +49,8 @@
     @Override
     public GenericVnf invokeGetGenericVnf(final String vnfId) {
         return aaiClientProvider.getAaiClient()
-                .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+                .get(GenericVnf.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
                 .orElseGet(() -> {
                     logger.debug("No vnf found in AAI with ID: {}", vnfId);
                     return null;
@@ -58,9 +59,8 @@
 
     @Override
     public GenericVnfs invokeQueryGenericVnf(final String selfLink) {
-        return aaiClientProvider.getAaiClient()
-                .get(GenericVnfs.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam("selflink", selfLink))
+        return aaiClientProvider.getAaiClient().get(GenericVnfs.class, AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("selflink", selfLink))
                 .orElseGet(() -> {
                     logger.debug("No vnf found in AAI with selflink: {}", selfLink);
                     return null;
@@ -70,7 +70,9 @@
     @Override
     public EsrVnfmList invokeGetVnfms() {
         return aaiClientProvider.getAaiClient()
-                .get(EsrVnfmList.class, AAIUriFactory.createResourceUri(AAIObjectType.VNFM_LIST)).orElseGet(() -> {
+                .get(EsrVnfmList.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfmList()))
+                .orElseGet(() -> {
                     logger.debug("No VNFMs in AAI");
                     return null;
                 });
@@ -79,7 +81,8 @@
     @Override
     public EsrVnfm invokeGetVnfm(final String vnfmId) {
         return aaiClientProvider.getAaiClient()
-                .get(EsrVnfm.class, AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId).depth(Depth.ONE))
+                .get(EsrVnfm.class, AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)).depth(Depth.ONE))
                 .orElseGet(() -> {
                     logger.debug("VNFM not found in AAI");
                     return null;
@@ -90,7 +93,8 @@
     public EsrSystemInfoList invokeGetVnfmEsrSystemInfoList(final String vnfmId) {
         return aaiClientProvider.getAaiClient()
                 .get(EsrSystemInfoList.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.VNFM_ESR_SYSTEM_INFO_LIST, vnfmId))
+                        AAIUriFactory.createResourceUri(
+                                AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId).esrSystemInfoList()))
                 .orElseGet(() -> {
                     logger.debug("VNFM ESR system info list not found in AAI");
                     return null;
@@ -99,45 +103,47 @@
 
     @Override
     public void invokePatchGenericVnf(final GenericVnf vnf) {
-        aaiClientProvider.getAaiClient()
-                .update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId()), vnf);
+        aaiClientProvider.getAaiClient().update(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())), vnf);
     }
 
     @Override
     public void invokePutGenericVnfToVnfmRelationship(final GenericVnf vnf, final String vnfmId) {
-        aaiClientProvider.getAaiClient().connect(AAIUriFactory.createResourceUri(AAIObjectType.VNFM, vnfmId),
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId()));
+        aaiClientProvider.getAaiClient().connect(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrVnfm(vnfmId)),
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())));
     }
 
     @Override
     public void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenant,
             final Vserver vserver) {
-        aaiClientProvider.getAaiClient().create(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
-                cloudRegion, tenant, vserver.getVserverId()), vserver);
+        aaiClientProvider
+                .getAaiClient().create(
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                                .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
+                        vserver);
     }
 
     @Override
     public void invokePutVserverToVnfRelationship(final String cloudOwner, final String cloudRegion,
             final String tenant, final Vserver vserver, final String vnfId) {
-        aaiClientProvider.getAaiClient()
-                .connect(
-                        AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenant,
-                                vserver.getVserverId()),
-                        AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+        aaiClientProvider.getAaiClient().connect(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserver.getVserverId())),
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
     }
 
     @Override
     public void invokeDeleteVserver(final String cloudOwner, final String cloudRegion, final String tenant,
             final String vserverId) {
-        aaiClientProvider.getAaiClient().delete(
-                AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenant, vserverId));
+        aaiClientProvider.getAaiClient().delete(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenant).vserver(vserverId)));
     }
 
     @Override
     public Tenant invokeGetTenant(final String cloudOwner, final String cloudRegion, final String tenantId) {
-        return aaiClientProvider.getAaiClient()
-                .get(Tenant.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId))
+        return aaiClientProvider.getAaiClient().get(Tenant.class, AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)))
                 .orElseGet(() -> {
                     logger.debug("Tenant not found in AAI");
                     return null;
@@ -147,8 +153,8 @@
     @Override
     public EsrSystemInfoList invokeGetCloudRegionEsrSystemInfoList(final String cloudOwner, final String cloudRegion) {
         return aaiClientProvider
-                .getAaiClient().get(EsrSystemInfoList.class, AAIUriFactory
-                        .createResourceUri(AAIObjectType.CLOUD_ESR_SYSTEM_INFO_LIST, cloudOwner, cloudRegion))
+                .getAaiClient().get(EsrSystemInfoList.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                        .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).esrSystemInfoList()))
                 .orElseGet(() -> {
                     logger.debug("Cloud esr system info list not found in AAI");
                     return null;
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java
index 9aed675..5bc4daa 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/EtsiSol003AdapterControllerTest.java
@@ -53,6 +53,7 @@
 import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.AAIVersion;
+import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.adapters.etsisol003adapter.lcm.extclients.EtsiPackageProvider;
 import org.onap.so.adapters.etsisol003adapter.lcm.extclients.vnfm.VnfmRestTemplateConfiguration;
@@ -534,7 +535,7 @@
     }
 
 
-    private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
+    private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
 
         final String uriAsString;
 
@@ -544,12 +545,12 @@
 
         @Override
         public boolean matches(final Object item) {
-            if (item instanceof AAIResourceUri) {
+            if (item instanceof AAIBaseResourceUri<?, ?>) {
                 if (uriAsString.endsWith("...")) {
-                    return ((AAIResourceUri) item).build().toString()
+                    return ((AAIBaseResourceUri<?, ?>) item).build().toString()
                             .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
                 }
-                return ((AAIResourceUri) item).build().toString().equals(uriAsString);
+                return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
             }
             return false;
         }
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java
index 21e5661..99b8c71 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003GrantControllerTest.java
@@ -43,7 +43,7 @@
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
 import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantRequest;
 import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantRequest.OperationEnum;
 import org.onap.so.adapters.etsisol003adapter.lcm.grant.model.GrantsAddResources;
@@ -224,7 +224,7 @@
                         "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
     }
 
-    private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
+    private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
 
         final String uriAsString;
 
@@ -234,12 +234,12 @@
 
         @Override
         public boolean matches(final Object item) {
-            if (item instanceof AAIResourceUri) {
+            if (item instanceof AAIBaseResourceUri) {
                 if (uriAsString.endsWith("...")) {
-                    return ((AAIResourceUri) item).build().toString()
+                    return ((AAIBaseResourceUri<?, ?>) item).build().toString()
                             .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
                 }
-                return ((AAIResourceUri) item).build().toString().equals(uriAsString);
+                return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
             }
             return false;
         }
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java
index 86eda0a..0d5bcd2 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-adapter/src/test/java/org/onap/so/adapters/etsisol003adapter/lcm/rest/Sol003LcnControllerTest.java
@@ -54,6 +54,7 @@
 import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.AaiHelper;
 import org.onap.so.adapters.etsisol003adapter.lcm.extclients.aai.OamIpAddressSource;
@@ -385,7 +386,7 @@
         genericVnf.getRelationshipList().getRelationship().add(relationshipToVserver);
     }
 
-    private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
+    private class AaiResourceUriMatcher extends BaseMatcher<AAIBaseResourceUri<?, ?>> {
 
         final String uriAsString;
 
@@ -395,12 +396,12 @@
 
         @Override
         public boolean matches(final Object item) {
-            if (item instanceof AAIResourceUri) {
+            if (item instanceof AAIBaseResourceUri<?, ?>) {
                 if (uriAsString.endsWith("...")) {
-                    return ((AAIResourceUri) item).build().toString()
+                    return ((AAIBaseResourceUri<?, ?>) item).build().toString()
                             .startsWith(uriAsString.substring(0, uriAsString.indexOf("...")));
                 }
-                return ((AAIResourceUri) item).build().toString().equals(uriAsString);
+                return ((AAIBaseResourceUri<?, ?>) item).build().toString().equals(uriAsString);
             }
             return false;
         }
diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml
index 01ba94d..b636f68 100644
--- a/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml
+++ b/adapters/etsi-sol003-adapter/etsi-sol003-lcm/etsi-sol003-lcm-api/pom.xml
@@ -100,6 +100,7 @@
                 <source>${project.basedir}/target/generated-sources/vnfmadapter/src/gen/java/main</source>
                 <source>${project.basedir}/target/generated-sources/sol003-vnf-lcn/src/gen/java/main</source>
                 <source>${project.basedir}/target/generated-sources/sol003-vnf-grant/src/gen/java/main</source>
+                <source>${project.basedir}/target/generated-sources/etsisol003adapter/src/gen/java/main</source>
               </sources>
             </configuration>
           </execution>
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
index 3f2e5b2..442339d 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
@@ -24,9 +24,9 @@
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.aai.domain.yang.EsrThirdpartySdncList;
 import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,7 +47,8 @@
     @Override
     public EsrThirdpartySdncList invokeGetThirdPartySdncList() {
         return aaiClientProvider.getAaiClient()
-                .get(EsrThirdpartySdncList.class, AAIUriFactory.createResourceUri(AAIObjectType.THIRDPARTY_SDNC_LIST))
+                .get(EsrThirdpartySdncList.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.externalSystem().esrThirdpartySdncList()))
                 .orElseGet(() -> {
                     logger.debug("No VNFMs in AAI");
                     return null;
@@ -58,7 +59,8 @@
     public EsrSystemInfoList invokeGetThirdPartySdncEsrSystemInfo(String sdncId) {
         return aaiClientProvider.getAaiClient()
                 .get(EsrSystemInfoList.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.THIRDPARTY_SDNC_SYSTEM_INFO_LIST, sdncId))
+                        AAIUriFactory
+                                .createResourceUri(AAIFluentTypeBuilder.externalSystem().esrThirdpartySdnc((sdncId))))
                 .orElseGet(() -> {
                     logger.debug("VNFM not found in AAI");
                     return null;
@@ -69,8 +71,8 @@
     @Override
     public void invokeCreateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
             String serviceInstanceId) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,
-                serviceType, serviceInstanceId);
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
         aaiClientProvider.getAaiClient().create(uri, nssiInstance);
     }
 }
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
index 67cd913..f150f47 100644
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
@@ -20,6 +20,17 @@
 
 package org.onap.so.adapters.nssmf;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.when;
+import static org.mockito.MockitoAnnotations.initMocks;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
+import static org.onap.so.beans.nsmf.NetworkType.CORE;
+import static org.onap.so.beans.nsmf.ResourceSharingLevel.NON_SHARED;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.util.LinkedList;
@@ -56,19 +67,9 @@
 import org.onap.so.beans.nsmf.PerfReq;
 import org.onap.so.beans.nsmf.PerfReqEmbb;
 import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
+import org.skyscreamer.jsonassert.JSONAssert;
 import org.springframework.http.ResponseEntity;
 import org.springframework.test.context.junit4.SpringRunner;
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
-import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
-import static org.onap.so.beans.nsmf.NetworkType.CORE;
-import static org.onap.so.beans.nsmf.ResourceSharingLevel.NON_SHARED;
 
 @RunWith(SpringRunner.class)
 public class NssmfAdapterRestTest {
@@ -281,7 +282,7 @@
     //
     @Test
     public void testAllocateJsonSerDeSer() throws Exception {
-        assertEquals(marshal(allocateNssi()), ALLOCATE);
+        JSONAssert.assertEquals(marshal(allocateNssi()), ALLOCATE, false);
         NssiAllocateRequest all = unMarshal(ALLOCATE, NssiAllocateRequest.class);
         assertNotNull(all);
         assertNotNull(all.getAllocateCnNssi());
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRestImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRestImpl.java
index 2849907..bb2c938 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRestImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRestImpl.java
@@ -5,12 +5,11 @@
 import org.onap.aai.domain.yang.CloudRegion;
 import org.onap.aai.domain.yang.Complex;
 import org.onap.aai.domain.yang.NetworkTechnologies;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.db.catalog.beans.NetworkTechnologyReference;
 import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -68,11 +67,12 @@
             if (complex.isPresent()) {
                 cloudRegion.setComplexName(complex.get().getComplexName());
             }
-            AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
-                    cloudRegion.getCloudOwner(), cloudRegion.getCloudRegionId());
+            AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                    .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getCloudRegionId()));
             getAaiClient().createIfNotExists(cloudRegionURI, Optional.of(cloudRegion));
             if (complex.isPresent()) {
-                AAIResourceUri complexURI = AAIUriFactory.createResourceUri(AAIObjectType.COMPLEX, cloudSite.getClli());
+                AAIResourceUri complexURI = AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().complex(cloudSite.getClli()));
                 getAaiClient().connect(cloudRegionURI, complexURI);
             }
             createCloudRegionNetworkTechnologyRelationship(cloudSite, cloudRegionURI);
@@ -88,18 +88,21 @@
     }
 
     protected Optional<Complex> retrieveComplex(CloudSite cloudSite) {
-        AAIResourceUri complexURI = AAIUriFactory.createResourceUri(AAIObjectType.COMPLEX, cloudSite.getClli());
+        AAIResourceUri complexURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().complex(cloudSite.getClli()));
         return getAaiClient().get(Complex.class, complexURI);
     }
 
     protected void linkCloudAndTechnology(String networkTechnologyName, AAIResourceUri cloudRegionURI) {
-        AAIPluralResourceUri technologyPluralUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_TECHNOLOGY)
-                .queryParam("network-technology-name", networkTechnologyName);
+        AAIPluralResourceUri technologyPluralUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().networkTechnologies())
+                        .queryParam("network-technology-name", networkTechnologyName);
         Optional<NetworkTechnologies> networkTechnology =
                 getAaiClient().get(NetworkTechnologies.class, technologyPluralUri);
         if (networkTechnology.isPresent()) {
-            AAIResourceUri networkTechnologyURI = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_TECHNOLOGY,
-                    networkTechnology.get().getNetworkTechnology().get(0).getNetworkTechnologyId());
+            AAIResourceUri networkTechnologyURI =
+                    AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().networkTechnology(
+                            networkTechnology.get().getNetworkTechnology().get(0).getNetworkTechnologyId()));
             getAaiClient().connect(cloudRegionURI, networkTechnologyURI);
         }
     }
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditVServer.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditVServer.java
index 1445622..6f87b6b 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditVServer.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditVServer.java
@@ -27,12 +27,13 @@
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VfModules;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
 import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.so.objects.audit.AAIObjectAudit;
 import org.onap.so.objects.audit.AAIObjectAuditList;
@@ -49,20 +50,20 @@
     public void auditVservers(AAIObjectAuditList aaiObjectAuditList) {
 
         aaiObjectAuditList.getAuditList().forEach(aaiObjectAudit -> {
-            boolean vserverExist = getAaiClient().exists(AAIUriFactory
-                    .createResourceFromExistingURI(AAIObjectType.VSERVER, aaiObjectAudit.getResourceURI()));
+            boolean vserverExist = getAaiClient().exists(
+                    AAIUriFactory.createResourceFromExistingURI(Types.VSERVER, aaiObjectAudit.getResourceURI()));
             aaiObjectAudit.setDoesObjectExist(vserverExist);
         });
     }
 
     public Optional<AAIObjectAuditList> auditVserversThroughRelationships(String genericVnfId, String vfModuleName) {
         AAIObjectAuditList auditList = new AAIObjectAuditList();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, genericVnfId)
-                .queryParam("vf-module-name", vfModuleName);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId).vfModules())
+                        .queryParam("vf-module-name", vfModuleName);
         Optional<AAIResultWrapper> wrapper = getAaiClient().getFirstWrapper(VfModules.class, VfModule.class, uri);
         if (wrapper.isPresent() && wrapper.get().getRelationships().isPresent()) {
-            List<AAIResourceUri> relatedVservers =
-                    wrapper.get().getRelationships().get().getRelatedUris(AAIObjectType.VSERVER);
+            List<AAIResourceUri> relatedVservers = wrapper.get().getRelationships().get().getRelatedUris(Types.VSERVER);
             if (!relatedVservers.isEmpty()) {
                 relatedVservers.forEach(vserverUri -> {
                     Optional<Vserver> vserver = getAaiClient().get(vserverUri).asBean(Vserver.class);
@@ -70,7 +71,7 @@
                     BeanUtils.copyProperties(vserver, vServerShallow);
                     AAIObjectAudit vServerAudit = new AAIObjectAudit();
                     vServerAudit.setAaiObject(vServerShallow);
-                    vServerAudit.setAaiObjectType(AAIObjectType.VSERVER.typeName());
+                    vServerAudit.setAaiObjectType(Types.VSERVER.typeName());
                     vServerAudit.setDoesObjectExist(true);
                     auditList.getAuditList().add(vServerAudit);
                 });
@@ -103,8 +104,8 @@
             String cloudRegion) {
         AAIObjectAuditList auditList = new AAIObjectAuditList();
         AAIObjectAudit vServerAudit = new AAIObjectAudit();
-        AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion,
-                tenantId, vServer.getVserverId());
+        AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver(vServer.getVserverId()));
         Vserver vServerShallow = new Vserver();
         BeanUtils.copyProperties(vServer, vServerShallow, "LInterfaces");
         boolean vServerExists = getAaiClient().exists(vserverURI);
@@ -112,7 +113,7 @@
         vServerAudit.setAaiObject(vServerShallow);
         vServerAudit.setDoesObjectExist(vServerExists);
         vServerAudit.setResourceURI(vserverURI.build());
-        vServerAudit.setAaiObjectType(AAIObjectType.VSERVER.typeName());
+        vServerAudit.setAaiObjectType(Types.VSERVER.typeName());
         auditList.getAuditList().add(vServerAudit);
         if (vServer.getLInterfaces() != null) {
             vServer.getLInterfaces().getLInterface().stream().forEach(lInterface -> auditList.getAuditList().addAll(
@@ -126,8 +127,9 @@
             String cloudOwner, String cloudRegion) {
         AAIObjectAuditList auditList = new AAIObjectAuditList();
         AAIObjectAudit lInterfaceAudit = new AAIObjectAudit();
-        AAIResourceUri linterfaceURI = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE, cloudOwner,
-                cloudRegion, tenantId, vServerId, lInterface.getInterfaceName());
+        AAIResourceUri linterfaceURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion)
+                        .tenant(tenantId).vserver(vServerId).lInterface(lInterface.getInterfaceName()));
         Optional<LInterface> queriedLInterface = getAaiClient().get(LInterface.class, linterfaceURI);
         if (queriedLInterface.isPresent()) {
             lInterfaceAudit.setDoesObjectExist(true);
@@ -135,7 +137,7 @@
         }
         lInterfaceAudit.setAaiObject(lInterface);
         lInterfaceAudit.setResourceURI(linterfaceURI.build());
-        lInterfaceAudit.setAaiObjectType(AAIObjectType.L_INTERFACE.typeName());
+        lInterfaceAudit.setAaiObjectType(Types.L_INTERFACE.typeName());
         auditList.getAuditList().add(lInterfaceAudit);
         logger.info("l-interface id:{} name: {} exists: {} ", lInterface.getInterfaceId(),
                 lInterface.getInterfaceName(), lInterfaceAudit.isDoesObjectExist());
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
index 3ff15ff..c58e568 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
@@ -37,8 +37,9 @@
 import org.onap.aai.domain.yang.Vlan;
 import org.onap.aai.domain.yang.Vlans;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.objects.audit.AAIObjectAudit;
 import org.onap.so.objects.audit.AAIObjectAuditList;
 import org.onap.so.openstack.utils.MsoHeatUtils;
@@ -260,10 +261,12 @@
         Vserver vServerShallow = new Vserver();
         BeanUtils.copyProperties(vServer, vServerShallow);
         aaiObjectAudit.setAaiObject(vServerShallow);
-        aaiObjectAudit.setAaiObjectType(AAIObjectType.VSERVER.typeName());
-        aaiObjectAudit.setResourceURI(AAIUriFactory
-                .createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenantId, vServer.getVserverId())
-                .build());
+        aaiObjectAudit.setAaiObjectType(Types.VSERVER.typeName());
+        aaiObjectAudit
+                .setResourceURI(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                                .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver(vServer.getVserverId()))
+                        .build());
 
         return aaiObjectAudit;
     }
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
index 1fa757f..c1a97ce 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
@@ -50,9 +50,9 @@
 import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aai.domain.yang.SriovVf;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.heatbridge.constants.HeatBridgeConstants;
 import org.openstack4j.model.compute.Server;
 import org.openstack4j.model.network.Network;
@@ -82,39 +82,39 @@
 
         // vserver to pserver relationship
         if (!StringUtils.isEmpty(server.getHypervisorHostname())) {
-            Relationship pserverRelationship = buildRelationship(
-                    AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, server.getHypervisorHostname()));
+            Relationship pserverRelationship = buildRelationship(AAIUriFactory.createResourceUri(
+                    AAIFluentTypeBuilder.cloudInfrastructure().pserver(server.getHypervisorHostname())));
             relationships.add(pserverRelationship);
         }
 
         // vserver to generic-vnf relationship
-        Relationship genericVnfRelationship =
-                buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnfId));
+        Relationship genericVnfRelationship = buildRelationship(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId)));
         relationships.add(genericVnfRelationship);
 
         // vserver to vnfc relationship
         if (!StringUtils.isEmpty(server.getName())) {
-            Relationship vnfcRelationship =
-                    buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.VNFC, server.getName()));
+            Relationship vnfcRelationship = buildRelationship(
+                    AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(server.getName())));
             relationships.add(vnfcRelationship);
         }
 
         // vserver to vf-module relationship
-        Relationship vfModuleRelationship =
-                buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, genericVnfId, vfModuleId));
+        Relationship vfModuleRelationship = buildRelationship(AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId).vfModule(vfModuleId)));
         relationships.add(vfModuleRelationship);
 
         // vserver to image relationship
         if (server.getImage() != null) {
-            Relationship imageRel = buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.IMAGE, cloudOwner,
-                    cloudRegionId, server.getImage().getId()));
+            Relationship imageRel = buildRelationship(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                    .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId).image(server.getImage().getId())));
             relationships.add(imageRel);
         }
 
         // vserver to flavor relationship
         if (server.getFlavor() != null) {
-            Relationship flavorRel = buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.FLAVOR, cloudOwner,
-                    cloudRegionId, server.getFlavor().getId()));
+            Relationship flavorRel = buildRelationship(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                    .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId).flavor(server.getFlavor().getId())));
             relationships.add(flavorRel);
         }
 
@@ -127,20 +127,21 @@
         List<Relationship> relationships = relationshipList.getRelationship();
 
         // sriov-vf to sriov-pf relationship
-        Relationship sriovPfRelationship = buildRelationship(
-                AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_PF, pserverName, pIfName, pfPciId));
+        Relationship sriovPfRelationship = buildRelationship(AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserverName).pInterface(pIfName).sriovPf(pfPciId)));
         relationships.add(sriovPfRelationship);
 
         return relationshipList;
     }
 
     public Relationship getRelationshipToVfModule(String vnfId, String vfModuleId) {
-        return buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId));
+        return buildRelationship(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId)));
     }
 
     public Relationship getRelationshipToTenant(String cloudOwner, String cloudRegionId, String tenantId) {
-        return buildRelationship(
-                AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegionId, tenantId));
+        return buildRelationship(AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId).tenant(tenantId)));
     }
 
     public org.onap.aai.domain.yang.Subnet buildSubnet(Subnet subnet) {
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/cloudregion/CloudRegionRestImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/cloudregion/CloudRegionRestImplTest.java
index 76bc8d2..9d5a4c6 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/cloudregion/CloudRegionRestImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/cloudregion/CloudRegionRestImplTest.java
@@ -17,10 +17,10 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aai.domain.yang.CloudRegion;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.db.catalog.data.repository.NetworkTechnologyReferenceRepository;
@@ -94,7 +94,8 @@
     public void createCloudRegionTest() {
         when(catalogDbClientMock.getCloudSite("region1")).thenReturn(null);
         when(catalogDbClientMock.postCloudSite(cloudSite)).thenReturn(cloudSite);
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, "bob", "region1");
+        AAIResourceUri uri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion("bob", "region1"));
         cloudRestImpl.createCloudRegion(cloudSite);
         ArgumentCaptor<AAIResourceUri> actualURI = ArgumentCaptor.forClass(AAIResourceUri.class);
         ArgumentCaptor<Optional<Object>> actualCloudRegion = ArgumentCaptor.forClass(Optional.class);
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditVServerTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditVServerTest.java
index e70b56d..2e496c5 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditVServerTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditVServerTest.java
@@ -41,12 +41,12 @@
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VfModules;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
 import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.objects.audit.AAIObjectAudit;
 import org.onap.so.objects.audit.AAIObjectAuditList;
 import org.skyscreamer.jsonassert.JSONAssert;
@@ -70,35 +70,43 @@
     private String cloudRegion = "cloudRegion";
     private String tenantId = "tenantId";
 
-    private AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion,
-            tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db");
+    private AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+            .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db"));
 
-    private AAIResourceUri vserverURI2 = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion,
-            tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4dz");
+    private AAIResourceUri vserverURI2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+            .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4dz"));
 
-    private AAIResourceUri ssc_1_trusted_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_trusted_port_0");
+    private AAIResourceUri ssc_1_trusted_port_0_uri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)
+                    .vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_trusted_port_0"));
 
-    private AAIResourceUri ssc_1_service1_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_service1_port_0");
+    private AAIResourceUri ssc_1_service1_port_0_uri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)
+                    .vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_service1_port_0"));
 
-    private AAIResourceUri ssc_1_mgmt_port_1_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_mgmt_port_1");
+    private AAIResourceUri ssc_1_mgmt_port_1_uri = AAIUriFactory
+            .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion)
+                    .tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_mgmt_port_1"));
 
-    private AAIResourceUri ssc_1_mgmt_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_mgmt_port_0");
+    private AAIResourceUri ssc_1_mgmt_port_0_uri = AAIUriFactory
+            .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion)
+                    .tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_mgmt_port_0"));
 
-    private AAIResourceUri ssc_1_service2_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_service2_port_0");
+    private AAIResourceUri ssc_1_service2_port_0_uri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)
+                    .vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_service2_port_0"));
 
-    private AAIResourceUri ssc_1_int_ha_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE,
-            cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db", "ssc_1_int_ha_port_0");
+    private AAIResourceUri ssc_1_int_ha_port_0_uri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)
+                    .vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4db").lInterface("ssc_1_int_ha_port_0"));
 
-    private AAIResourceUri test_port_1_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE, cloudOwner,
-            cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4dz", "test_port_1");
+    private AAIResourceUri test_port_1_uri = AAIUriFactory
+            .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion)
+                    .tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4dz").lInterface("test_port_1"));
 
-    private AAIResourceUri test_port_2_uri = AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE, cloudOwner,
-            cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4dz", "test_port_2");
+    private AAIResourceUri test_port_2_uri = AAIUriFactory
+            .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion)
+                    .tenant(tenantId).vserver("3a4c2ca5-27b3-4ecc-98c5-06804867c4dz").lInterface("test_port_2"));
 
     private AAIResourceUri service2_sub_1_uri =
             AAIUriFactory.createResourceUri(AAIObjectType.SUB_L_INTERFACE, cloudOwner, cloudRegion, tenantId,
@@ -368,17 +376,20 @@
         Vserver vserver = new Vserver();
         vserver.setVserverId("testVserverId");
         obj1.setAaiObject(vserver);
-        obj1.setResourceURI(AAIUriFactory
-                .createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion, tenantId, "testVserverId").build());
+        obj1.setResourceURI(
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                                .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver("testVserverId"))
+                        .build());
         auditList.getAuditList().add(obj1);
 
-        doReturn(false).when(aaiResourcesMock).exists(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
-                cloudRegion, tenantId, "testVserverId"));
+        doReturn(false).when(aaiResourcesMock).exists(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver("testVserverId")));
 
         auditNova.auditVservers(auditList);
 
-        Mockito.verify(aaiResourcesMock).exists(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
-                cloudRegion, tenantId, "testVserverId"));
+        Mockito.verify(aaiResourcesMock).exists(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver("testVserverId")));
 
         Assert.assertEquals(false, auditList.getAuditList().get(0).isDoesObjectExist());
     }
@@ -392,8 +403,8 @@
         AAIResultWrapper wrapper = new AAIResultWrapper(vfModule);
 
         doReturn(Optional.of(wrapper)).when(aaiResourcesMock).getFirstWrapper(VfModules.class, VfModule.class,
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, "genericVnfId").queryParam("vf-module-name",
-                        "vfModuleName"));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("genericVnfId").vfModules())
+                        .queryParam("vf-module-name", "vfModuleName"));
 
         Optional<AAIObjectAuditList> auditList =
                 auditNova.auditVserversThroughRelationships("genericVnfId", "vfModuleName");
@@ -410,11 +421,12 @@
         AAIResultWrapper vserverWrapper = new AAIResultWrapper(new Vserver());
 
         doReturn(Optional.of(wrapper)).when(aaiResourcesMock).getFirstWrapper(VfModules.class, VfModule.class,
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, "genericVnfId").queryParam("vf-module-name",
-                        "vfModuleName"));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("genericVnfId").vfModules())
+                        .queryParam("vf-module-name", "vfModuleName"));
 
-        doReturn(vserverWrapper).when(aaiResourcesMock).get(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER,
-                "cloud-owner", "cloud-region-id", "tenant-id", "VUSCHGA1"));
+        doReturn(vserverWrapper).when(aaiResourcesMock)
+                .get(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion("cloud-owner", "cloud-region-id").tenant("tenant-id").vserver("VUSCHGA1")));
 
         Optional<AAIObjectAuditList> auditList =
                 auditNova.auditVserversThroughRelationships("genericVnfId", "vfModuleName");
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
index cea436b..110faaf 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
@@ -45,7 +45,6 @@
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.doReturn;
 import java.io.File;
 import java.io.IOException;
 import java.nio.charset.Charset;
@@ -66,20 +65,17 @@
 import org.mockito.ArgumentCaptor;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
-import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aai.domain.yang.L3InterfaceIpv6AddressList;
 import org.onap.aai.domain.yang.LInterface;
 import org.onap.aai.domain.yang.PInterface;
 import org.onap.aai.domain.yang.SriovPf;
 import org.onap.aaiclient.client.aai.AAIDSLQueryClient;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.AAISingleTransactionClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.aaiclient.client.graphinventory.exceptions.BulkProcessFailed;
 import org.onap.so.cloud.resource.beans.NodeType;
 import org.onap.so.db.catalog.beans.CloudIdentity;
@@ -105,7 +101,6 @@
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableMap;
-import inet.ipaddr.IPAddressString;
 
 
 @RunWith(MockitoJUnitRunner.Silent.class)
@@ -202,10 +197,10 @@
         verify(transaction, times(2)).createIfNotExists(captor.capture(), any(Optional.class));
 
         List<AAIResourceUri> uris = captor.getAllValues();
-        assertEquals(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, CLOUD_OWNER, REGION_ID, TENANT_ID,
-                server1.getId()), uris.get(0));
-        assertEquals(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, CLOUD_OWNER, REGION_ID, TENANT_ID,
-                server2.getId()), uris.get(1));
+        assertEquals(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(CLOUD_OWNER, REGION_ID).tenant(TENANT_ID).vserver(server1.getId())), uris.get(0));
+        assertEquals(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(CLOUD_OWNER, REGION_ID).tenant(TENANT_ID).vserver(server2.getId())), uris.get(1));
 
     }
 
@@ -246,10 +241,10 @@
         verify(transaction, times(2)).createIfNotExists(captor.capture(), any(Optional.class));
 
         List<AAIResourceUri> uris = captor.getAllValues();
-        assertEquals(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, CLOUD_OWNER, REGION_ID, TENANT_ID,
-                server1.getId()), uris.get(0));
-        assertEquals(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, CLOUD_OWNER, REGION_ID, TENANT_ID,
-                server2.getId()), uris.get(1));
+        assertEquals(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(CLOUD_OWNER, REGION_ID).tenant(TENANT_ID).vserver(server1.getId())), uris.get(0));
+        assertEquals(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(CLOUD_OWNER, REGION_ID).tenant(TENANT_ID).vserver(server2.getId())), uris.get(1));
     }
 
     @Test
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java
index 8544267..e081902 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/WatchdogDistribution.java
@@ -25,10 +25,10 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.db.catalog.beans.Service;
 import org.onap.so.db.catalog.data.repository.ServiceRepository;
@@ -183,8 +183,8 @@
 
 
 
-            AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, serviceModelInvariantUUID,
-                    serviceModelVersionId);
+            AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation()
+                    .model(serviceModelInvariantUUID).modelVer(serviceModelVersionId));
             aaiUri.depth(Depth.ZERO); // Do not return relationships if any
             logger.debug("Target A&AI Resource URI: {}", aaiUri.build().toString());
 
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
index d85c387..fe36867 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
@@ -22,25 +22,24 @@
 
 package org.onap.so.bpmn.common.scripts
 
-import org.onap.so.logger.LoggingAnchor
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.logging.filter.base.ErrorCode
-
 import static org.apache.commons.lang3.StringUtils.isBlank;
-
 import javax.ws.rs.NotFoundException
 import javax.ws.rs.core.UriBuilder
-
 import org.apache.commons.lang.StringUtils
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.AllottedResource
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.client.PreconditionFailedException
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.client.PreconditionFailedException
+import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -115,7 +114,7 @@
 	public boolean ifExistsAR(DelegateExecution execution, String allottedResourceId) {
 		logger.trace("ifExistsAR ")
 		try {
-			AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
+			AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(Types.ALLOTTED_RESOURCE.getFragment(allottedResourceId))
             AAIResultWrapper wrapper = getAAIClient().get(resourceUri)
             Optional<AllottedResource> allottedResource = wrapper.asBean(AllottedResource.class)
             if(allottedResource.isPresent()) {
@@ -150,7 +149,7 @@
 		Optional<AllottedResource> allottedResource = Optional.empty()
 		try {
 			logger.debug("GET AR Aai Path is: \n" + link)
-			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(link).build())
+			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(link).build())
 			allottedResource = getAAIClient().get(AllottedResource.class,uri);
 			if(allottedResource.isPresent()) {
 				if (!isBlank(role)) {
@@ -193,7 +192,7 @@
 			allottedResource.setOrchestrationStatus(status)
 			logger.debug('AAI AR URI: ' + aaiARPath)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(aaiARPath).build())
+			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(aaiARPath).build())
 			getAAIClient().update(uri,allottedResource)
 		}catch(Exception e){
 			logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
@@ -208,7 +207,7 @@
 		logger.trace(" deleteAR - aaiARPath:" + aaiARPath)
 		try {
 
-			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(aaiARPath).build())
+			AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(aaiARPath).build())
 			getAAIClient().delete(uri);
 		}catch(NotFoundException ex){
 			logger.debug("  Delete AR Received a Not Found (404) Response")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
index c5a0e46..2f09ca2 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
@@ -29,6 +29,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.constants.Defaults
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.LoggingAnchor
@@ -74,7 +76,7 @@
         execution.setVariable("CVGN_volumeGroupName", volumeGroupName)
         execution.setVariable("CVGN_aicCloudRegion", aicCloudRegion)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
         execution.setVariable("CVGN_volumeGroupGetEndpoint", uri)
     }
 
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
index f5cf541..fce9286 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
@@ -31,6 +31,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.constants.Defaults
 import org.onap.so.logger.LoggingAnchor
@@ -62,7 +63,7 @@
 			String incomingGroupName = execution.getVariable("volumeGroupName")
 			String incomingTenantId = execution.getVariable("tenantId")
 			String aicCloudRegion = execution.getVariable("aicCloudRegion")
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
 			AAIResultWrapper wrapper = getAAIClient().get(uri);
 			Optional<VolumeGroup> volumeGroup = wrapper.asBean(VolumeGroup.class)
 			Optional<Relationships> relationships = wrapper.getRelationships()
@@ -70,7 +71,7 @@
 				execution.setVariable("queryAAIVolumeGroupResponse", volumeGroup.get())
 				String volumeGroupTenantId = ""
 				if(relationships.isPresent()){
-					List<AAIResourceUri> tenantUris = relationships.get().getRelatedAAIUris(AAIObjectType.TENANT)
+					List<AAIResourceUri> tenantUris = relationships.get().getRelatedUris(Types.TENANT)
 					for (AAIResourceUri tenantURI: tenantUris){
 							volumeGroupTenantId = tenantURI.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
 					}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
index 9758c12..40b9388 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
@@ -26,14 +26,13 @@
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.GenericVnf
 import org.onap.aai.domain.yang.GenericVnfs
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
-import org.onap.so.db.catalog.beans.OrchestrationStatus
 import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.db.catalog.beans.OrchestrationStatus
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
@@ -154,9 +153,9 @@
 		def vnfName = execution.getVariable("CAAIVfMod_vnfName")
         Optional<GenericVnf> genericVnfOp
 		if (vnfId == null || vnfId.isEmpty()) {
-			genericVnfOp = getAAIClient().getFirst(GenericVnfs.class, GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName).depth(Depth.ONE))
+			genericVnfOp = getAAIClient().getFirst(GenericVnfs.class, GenericVnf.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("vnf-name", vnfName).depth(Depth.ONE))
 		} else {
-			genericVnfOp = getAAIClient().get(GenericVnf.class,  AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+			genericVnfOp = getAAIClient().get(GenericVnf.class,  AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
 		}
 		try {
             if(genericVnfOp.isPresent()){
@@ -214,7 +213,7 @@
         genericVnf.setModelVersionId(execution.getVariable("CAAIVfMod_vnfPersonaVer"))
 
 		try {
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, newVnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(newVnfId))
             getAAIClient().create(uri,genericVnf)
 			execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", 201)
 			execution.setVariable("CAAIVfMod_createGenericVnfResponse", "Vnf Created")
@@ -266,7 +265,7 @@
 
 		try {
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, newModuleId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(newModuleId))
             getAAIClient().create(uri,vfModule)
             def statusCode = 201
 			execution.setVariable("CAAIVfMod_createVfModuleResponseCode", statusCode)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
index 8a74307..511cd8d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
@@ -27,6 +27,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -111,7 +113,7 @@
 			def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
 			def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
 			try {
-				AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
+				AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
 				Optional<org.onap.aai.domain.yang.VfModule> vfModule = getAAIClient().get(org.onap.aai.domain.yang.VfModule.class, resourceUri)
 				if(vfModule.isPresent()){
 					execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', 200)
@@ -164,8 +166,8 @@
 			def volumeGroupId = execution.getVariable('CAAIVfModVG_volumeGroupId')
 
 			try {
-				AAIResourceUri vfModuleUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId,vfModuleId);
-				AAIResourceUri volumeGroupUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwner, aicCloudRegion,volumeGroupId);
+				AAIResourceUri vfModuleUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
+				AAIResourceUri volumeGroupUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, aicCloudRegion).volumeGroup(volumeGroupId));
 				logger.debug("Creating relationship between Vf Module: " + vfModuleUri.build().toString() + " and Volume Group: " + volumeGroupUri.build().toString())
 				getAAIClient().connect(vfModuleUri,volumeGroupUri)
 				execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', 200)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
index 8c6ebef..02d0cd0 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
@@ -28,6 +28,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.MessageEnum
@@ -83,7 +85,7 @@
 
 		try {
 			AaiUtil aaiUriUtil = new AaiUtil(this)
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			uri.depth(Depth.ONE)
             Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class, uri)
 
@@ -109,7 +111,7 @@
 
 		try {
 			String vnfId = execution.getVariable("DAAIVfMod_vnfId")
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
             getAAIClient().delete(uri)
 			execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", 200)
 			execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", "Vnf Deleted")
@@ -126,7 +128,7 @@
 			String vnfId = execution.getVariable("DAAIVfMod_vnfId")
 			String vfModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
 
             getAAIClient().delete(uri)
 			execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", 200)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
index 9593aa1..63dd9af 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
@@ -41,6 +41,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ONAPComponents;
 import org.onap.so.logger.MessageEnum
@@ -85,7 +87,7 @@
 			def personaModelId = execution.getVariable('personaModelId')
 
 			AaiUtil aaiUtil = new AaiUtil(this)
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			uri.depth(Depth.ONE)
 			String endPoint = aaiUtil.createAaiUri(uri)
 
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
index 051f693..f7fbc3a 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
@@ -35,6 +35,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.springframework.web.util.UriUtils
 import org.onap.so.logger.MessageEnum
@@ -123,7 +125,7 @@
 
 
 			try {
-				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 				AAIResourcesClient resourceClient = new AAIResourcesClient()
 				AAIResultWrapper wrapper = resourceClient.get(uri.depth(Depth.ONE), NotFoundException.class)
 				GenericVnf responseData = wrapper.asBean(GenericVnf.class).get()
@@ -167,7 +169,7 @@
 			def vnfName = genericVnf.getVnfName()
 			execution.setVariable('PUAAIVfMod_vnfName', vnfName)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
 
 
@@ -224,7 +226,7 @@
 			vfModule.setOrchestrationStatus(orchestrationStatus)
 
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
 			client.update(uri, vfModule)
 			execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', 200)
 			// Set the output for this flow.  The updated VfModule is an output, the generic VNF name, and for
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
index 9a78472..b68bf7b 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
@@ -30,6 +30,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.MessageEnum
@@ -134,7 +136,7 @@
 		try {
 			def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			uri.depth(Depth.ONE)
 			try {
 				Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class,uri)
@@ -223,7 +225,7 @@
 			payload.setManagementV6Address(managementV6AddressEntry)
 			payload.setOrchestrationStatus(orchestrationStatusEntry)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 
 			try {
 				getAAIClient().update(uri,payload)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
index 20f9721..a8a289d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
@@ -30,6 +30,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -106,7 +108,7 @@
 			def vnfId = execution.getVariable('UAAIVfMod_vnfId')
 			def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
 			try {
-				AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
+				AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
 				Optional<org.onap.aai.domain.yang.VfModule> vfModule = getAAIClient().get(org.onap.aai.domain.yang.VfModule.class, resourceUri)
 				if (vfModule.isPresent()) {
 					execution.setVariable('UAAIVfMod_getVfModuleResponseCode', 200)
@@ -185,7 +187,7 @@
 			payload.setContrailServiceInstanceFqdn(contrailServiceInstanceFqdnEntry)
 
             try {
-                AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
+                AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
                 getAAIClient().update(resourceUri, payload)
 				execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', 200)
 				execution.setVariable('UAAIVfMod_updateVfModuleResponse', "Success")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index b181a60..8923051 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -35,12 +35,12 @@
 import org.camunda.bpm.engine.delegate.JavaDelegate;
 import org.javatuples.Pair;
 import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
@@ -54,6 +54,7 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
@@ -62,7 +63,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Tenant;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Vnfc;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
 import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
@@ -496,7 +496,7 @@
     }
 
     protected Vnfc getVnfcToConfiguration(String vnfcName) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfcName);
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfcName));
         Optional<org.onap.aai.domain.yang.Vnfc> vnfcOp =
                 bbInputSetupUtils.getAAIResourceDepthOne(uri).asBean(org.onap.aai.domain.yang.Vnfc.class);
         if (vnfcOp.isPresent()) {
@@ -1883,15 +1883,13 @@
     }
 
     private void mapRelationship(ServiceInstance serviceInstance, Relationships relationships) {
-        this.mapProject(relationships.getByType(AAIObjectType.PROJECT, uri -> uri.nodesOnly(true)), serviceInstance);
-        this.mapOwningEntity(relationships.getByType(AAIObjectType.OWNING_ENTITY, uri -> uri.nodesOnly(true)),
-                serviceInstance);
-        this.mapL3Networks(relationships.getRelatedAAIUris(AAIObjectType.L3_NETWORK), serviceInstance.getNetworks());
-        this.mapGenericVnfs(relationships.getRelatedAAIUris(AAIObjectType.GENERIC_VNF), serviceInstance.getVnfs());
-        this.mapPnfs(relationships.getRelatedAAIUris(AAIObjectType.PNF), serviceInstance.getPnfs());
-        this.mapCollection(relationships.getByType(AAIObjectType.COLLECTION), serviceInstance);
-        this.mapConfigurations(relationships.getRelatedAAIUris(AAIObjectType.CONFIGURATION),
-                serviceInstance.getConfigurations());
+        this.mapProject(relationships.getByType(Types.PROJECT, uri -> uri.nodesOnly(true)), serviceInstance);
+        this.mapOwningEntity(relationships.getByType(Types.OWNING_ENTITY, uri -> uri.nodesOnly(true)), serviceInstance);
+        this.mapL3Networks(relationships.getRelatedUris(Types.L3_NETWORK), serviceInstance.getNetworks());
+        this.mapGenericVnfs(relationships.getRelatedUris(Types.GENERIC_VNF), serviceInstance.getVnfs());
+        this.mapPnfs(relationships.getRelatedUris(Types.PNF), serviceInstance.getPnfs());
+        this.mapCollection(relationships.getByType(Types.COLLECTION), serviceInstance);
+        this.mapConfigurations(relationships.getRelatedUris(Types.CONFIGURATION), serviceInstance.getConfigurations());
     }
 
     protected void mapConfigurations(List<AAIResourceUri> relatedAAIUris, List<Configuration> configurations) {
@@ -1930,11 +1928,10 @@
         Optional<Relationships> relationshipsOp = aaiGenericVnfWrapper.getRelationships();
         if (relationshipsOp.isPresent()) {
             Relationships relationships = relationshipsOp.get();
-            this.mapPlatform(relationships.getByType(AAIObjectType.PLATFORM), genericVnf);
-            this.mapLineOfBusiness(relationships.getByType(AAIObjectType.LINE_OF_BUSINESS), genericVnf);
-            genericVnf.getVolumeGroups().addAll(mapVolumeGroups(relationships.getByType(AAIObjectType.VOLUME_GROUP)));
-            genericVnf.getInstanceGroups()
-                    .addAll(mapInstanceGroups(relationships.getByType(AAIObjectType.INSTANCE_GROUP)));
+            this.mapPlatform(relationships.getByType(Types.PLATFORM), genericVnf);
+            this.mapLineOfBusiness(relationships.getByType(Types.LINE_OF_BUSINESS), genericVnf);
+            genericVnf.getVolumeGroups().addAll(mapVolumeGroups(relationships.getByType(Types.VOLUME_GROUP)));
+            genericVnf.getInstanceGroups().addAll(mapInstanceGroups(relationships.getByType(Types.INSTANCE_GROUP)));
         }
 
         return genericVnf;
@@ -2041,8 +2038,7 @@
     }
 
     private void setInstanceGroupForCollection(Collection collection, Relationships relationships) {
-        List<InstanceGroup> instanceGroupsList =
-                mapInstanceGroups(relationships.getByType(AAIObjectType.INSTANCE_GROUP));
+        List<InstanceGroup> instanceGroupsList = mapInstanceGroups(relationships.getByType(Types.INSTANCE_GROUP));
         if (!instanceGroupsList.isEmpty()) {
             collection.setInstanceGroup(instanceGroupsList.get(0));
         }
@@ -2079,9 +2075,8 @@
         Optional<Relationships> relationshipsOp = aaiNetworkWrapper.getRelationships();
         if (relationshipsOp.isPresent()) {
             Relationships relationships = relationshipsOp.get();
-            this.mapNetworkPolicies(relationships.getByType(AAIObjectType.NETWORK_POLICY),
-                    network.getNetworkPolicies());
-            mapRouteTableReferences(relationships.getByType(AAIObjectType.ROUTE_TABLE_REFERENCE),
+            this.mapNetworkPolicies(relationships.getByType(Types.NETWORK_POLICY), network.getNetworkPolicies());
+            mapRouteTableReferences(relationships.getByType(Types.ROUTE_TABLE_REFERENCE),
                     network.getContrailNetworkRouteTableReferences());
         }
 
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 4e0b563..9205cae 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -43,19 +43,20 @@
 import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aai.domain.yang.VolumeGroups;
 import org.onap.aai.domain.yang.VpnBinding;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.uri.AAIFluentSingleType;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.MultipleObjectsFoundException;
 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.NoServiceInstanceFoundException;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
 import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
 import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
@@ -237,7 +238,7 @@
     }
 
     public Map<String, String> getURIKeysFromServiceInstance(String serviceInstanceId) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         return uri.getURIKeys();
     }
 
@@ -266,8 +267,10 @@
             String cloudRegionId = cloudConfiguration.getLcpCloudRegionId();
             String cloudOwner = cloudConfiguration.getCloudOwner();
             if (cloudRegionId != null && cloudOwner != null && !cloudRegionId.isEmpty() && !cloudOwner.isEmpty()) {
-                return injectionHelper.getAaiClient().get(CloudRegion.class, AAIUriFactory
-                        .createResourceUri(AAIObjectType.CLOUD_REGION, cloudOwner, cloudRegionId).depth(Depth.TWO))
+                return injectionHelper.getAaiClient()
+                        .get(CloudRegion.class, AAIUriFactory.createResourceUri(
+                                AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId))
+                                .depth(Depth.TWO))
                         .orElse(null);
 
             } else {
@@ -279,13 +282,17 @@
     }
 
     public InstanceGroup getAAIInstanceGroup(String instanceGroupId) {
-        return injectionHelper.getAaiClient().get(InstanceGroup.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroupId)).orElse(null);
+        return injectionHelper.getAaiClient()
+                .get(InstanceGroup.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroupId)))
+                .orElse(null);
     }
 
     public org.onap.aai.domain.yang.Customer getAAICustomer(String globalSubscriberId) {
-        return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.Customer.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, globalSubscriberId)).orElse(null);
+        return injectionHelper.getAaiClient()
+                .get(org.onap.aai.domain.yang.Customer.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId)))
+                .orElse(null);
     }
 
     public ServiceSubscription getAAIServiceSubscription(String globalSubscriberId, String subscriptionServiceType) {
@@ -294,8 +301,9 @@
                 || subscriptionServiceType.equals("")) {
             return null;
         } else {
-            return injectionHelper.getAaiClient().get(ServiceSubscription.class, AAIUriFactory
-                    .createResourceUri(AAIObjectType.SERVICE_SUBSCRIPTION, globalSubscriberId, subscriptionServiceType))
+            return injectionHelper
+                    .getAaiClient().get(ServiceSubscription.class, AAIUriFactory.createResourceUri(AAIFluentTypeBuilder
+                            .business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType)))
                     .orElse(null);
         }
 
@@ -304,25 +312,25 @@
     public ServiceInstance getAAIServiceInstanceById(String serviceInstanceId) {
         return injectionHelper.getAaiClient()
                 .get(ServiceInstance.class, AAIUriFactory
-                        .createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId).depth(Depth.TWO))
+                        .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId)).depth(Depth.TWO))
                 .orElse(null);
     }
 
     protected ServiceInstance getAAIServiceInstanceByIdAndCustomer(String globalCustomerId, String serviceType,
             String serviceInstanceId) {
-        return injectionHelper.getAaiClient().get(ServiceInstance.class, AAIUriFactory
-                .createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustomerId, serviceType, serviceInstanceId)
-                .depth(Depth.TWO)).orElse(null);
+        return injectionHelper.getAaiClient().get(ServiceInstance.class,
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId)
+                        .serviceSubscription(serviceType).serviceInstance(serviceInstanceId)).depth(Depth.TWO))
+                .orElse(null);
     }
 
     public org.onap.aai.domain.yang.ServiceInstance getAAIServiceInstanceByName(String serviceInstanceName,
             Customer customer) throws Exception {
-        Optional<org.onap.aai.domain.yang.ServiceInstance> aaiServiceInstance =
-                injectionHelper.getAaiClient()
-                        .getOne(ServiceInstances.class, org.onap.aai.domain.yang.ServiceInstance.class, AAIUriFactory
-                                .createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer.getGlobalCustomerId(),
-                                        customer.getServiceSubscription().getServiceType())
-                                .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO));
+        Optional<org.onap.aai.domain.yang.ServiceInstance> aaiServiceInstance = injectionHelper.getAaiClient().getOne(
+                ServiceInstances.class, org.onap.aai.domain.yang.ServiceInstance.class,
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId())
+                        .serviceSubscription(customer.getServiceSubscription().getServiceType()).serviceInstances())
+                        .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO));
 
         return aaiServiceInstance.orElse(null);
     }
@@ -331,7 +339,9 @@
             String serviceInstanceName) {
 
         return injectionHelper.getAaiClient().getOne(ServiceInstances.class, ServiceInstance.class,
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, globalCustomerId, serviceType)
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId)
+                                .serviceSubscription(serviceType).serviceInstances())
                         .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO));
     }
 
@@ -356,43 +366,46 @@
     }
 
     public Configuration getAAIConfiguration(String configurationId) {
-        return this.getConcreteAAIResource(Configuration.class, AAIObjectType.CONFIGURATION, configurationId);
+        return this.getConcreteAAIResource(Configuration.class,
+                AAIFluentTypeBuilder.network().configuration(configurationId));
     }
 
     public GenericVnf getAAIGenericVnf(String vnfId) {
-        return getConcreteAAIResource(GenericVnf.class, AAIObjectType.GENERIC_VNF, vnfId);
+        return getConcreteAAIResource(GenericVnf.class, AAIFluentTypeBuilder.network().genericVnf(vnfId));
     }
 
     public VpnBinding getAAIVpnBinding(String vpnBindingId) {
-        return getConcreteAAIResource(VpnBinding.class, AAIObjectType.VPN_BINDING, vpnBindingId);
+        return getConcreteAAIResource(VpnBinding.class, AAIFluentTypeBuilder.network().vpnBinding(vpnBindingId));
     }
 
     public VolumeGroup getAAIVolumeGroup(String cloudOwnerId, String cloudRegionId, String volumeGroupId) {
-        return getConcreteAAIResource(VolumeGroup.class, AAIObjectType.VOLUME_GROUP, cloudOwnerId, cloudRegionId,
-                volumeGroupId);
+        return getConcreteAAIResource(VolumeGroup.class, AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudOwnerId, cloudRegionId).volumeGroup(volumeGroupId));
     }
 
     public VfModule getAAIVfModule(String vnfId, String vfModuleId) {
-        return getConcreteAAIResource(VfModule.class, AAIObjectType.VF_MODULE, vnfId, vfModuleId);
+        return getConcreteAAIResource(VfModule.class,
+                AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
     }
 
     public L3Network getAAIL3Network(String networkId) {
-        return getConcreteAAIResource(L3Network.class, AAIObjectType.L3_NETWORK, networkId);
+        return getConcreteAAIResource(L3Network.class, AAIFluentTypeBuilder.network().l3Network(networkId));
     }
 
-    private <T> T getConcreteAAIResource(Class<T> clazz, AAIObjectType objectType, Object... ids) {
-        return injectionHelper.getAaiClient()
-                .get(clazz, AAIUriFactory.createResourceUri(objectType, ids).depth(Depth.ONE)).orElseGet(() -> {
-                    logger.debug("No resource of type: {} matched by ids: {}", objectType.typeName(),
-                            Arrays.toString(ids));
+    private <T> T getConcreteAAIResource(Class<T> clazz, AAIFluentSingleType type) {
+        return injectionHelper.getAaiClient().get(clazz, AAIUriFactory.createResourceUri(type).depth(Depth.ONE))
+                .orElseGet(() -> {
+                    logger.debug("No resource of type: {} matched by ids: {}", type.build().typeName(),
+                            Arrays.toString(type.values()));
                     return null;
                 });
     }
 
     public Optional<ServiceInstance> getRelatedServiceInstanceFromInstanceGroup(String instanceGroupId)
             throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroupId)
-                .relatedTo(AAIObjectPlurals.SERVICE_INSTANCE);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroupId))
+                        .relatedTo(Types.SERVICE_INSTANCES.getFragment());
         Optional<ServiceInstances> serviceInstances = injectionHelper.getAaiClient().get(ServiceInstances.class, uri);
         ServiceInstance serviceInstance = null;
         if (!serviceInstances.isPresent()) {
@@ -414,8 +427,9 @@
 
     public Optional<L3Network> getRelatedNetworkByNameFromServiceInstance(String serviceInstanceId, String networkName)
             throws MultipleObjectsFoundException {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                .relatedTo(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.L3_NETWORKS.getFragment()).queryParam("network-name", networkName);
         Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
         L3Network network = null;
         if (!networks.isPresent()) {
@@ -435,34 +449,37 @@
     }
 
     public Optional<GenericVnf> getRelatedVnfByNameFromServiceInstance(String serviceInstanceId, String vnfName) {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                .relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", vnfName);
         return injectionHelper.getAaiClient().getOne(GenericVnfs.class, GenericVnf.class, uri);
 
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVnf(String vnfId, String volumeGroupName) {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                .relatedTo(Types.VOLUME_GROUPS.getFragment()).queryParam("volume-group-name", volumeGroupName);
         return injectionHelper.getAaiClient().getOne(VolumeGroups.class, VolumeGroup.class, uri);
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupByIdFromVnf(String vnfId, String volumeGroupId) {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-id", volumeGroupId);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                .relatedTo(Types.VOLUME_GROUPS.getFragment()).queryParam("volume-group-id", volumeGroupId);
         return injectionHelper.getAaiClient().getOne(VolumeGroups.class, VolumeGroup.class, uri);
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId,
             String volumeGroupName) throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment()).queryParam("volume-group-name", volumeGroupName);
         return injectionHelper.getAaiClient().getOne(VolumeGroups.class, VolumeGroup.class, uri);
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupFromVfModule(String vnfId, String vfModuleId) throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment());
         return injectionHelper.getAaiClient().getOne(VolumeGroups.class, VolumeGroup.class, uri);
     }
 
@@ -470,9 +487,9 @@
             org.onap.aai.domain.yang.L3Network aaiLocalNetwork) {
         AAIResultWrapper networkWrapper = new AAIResultWrapper(aaiLocalNetwork);
         if (networkWrapper.getRelationships().isPresent()
-                && !networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING).isEmpty()) {
+                && !networkWrapper.getRelationships().get().getRelatedUris(Types.VPN_BINDING).isEmpty()) {
             return getAAIResourceDepthOne(
-                    networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING).get(0))
+                    networkWrapper.getRelationships().get().getRelatedUris(Types.VPN_BINDING).get(0))
                             .asBean(org.onap.aai.domain.yang.VpnBinding.class);
         }
         return Optional.empty();
@@ -481,7 +498,7 @@
     public ServiceInstances getAAIServiceInstancesGloballyByName(String serviceInstanceName) {
 
         return injectionHelper.getAaiClient()
-                .get(ServiceInstances.class, AAIUriFactory.createNodesUri(AAIObjectPlurals.SERVICE_INSTANCE)
+                .get(ServiceInstances.class, AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
                         .queryParam("service-instance-name", serviceInstanceName))
                 .orElseGet(() -> {
                     logger.debug("No Service Instance matched by name");
@@ -491,26 +508,27 @@
 
     public boolean existsAAINetworksGloballyByName(String networkName) {
 
-        AAIPluralResourceUri l3networkUri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName);
+        AAIPluralResourceUri l3networkUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks())
+                .queryParam("network-name", networkName);
         AAIResourcesClient aaiRC = injectionHelper.getAaiClient();
         return aaiRC.exists(l3networkUri);
     }
 
     public boolean existsAAIVfModuleGloballyByName(String vfModuleName) {
         AAIPluralResourceUri vfModuleUri =
-                AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE).queryParam("vf-module-name", vfModuleName);
+                AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment()).queryParam("vf-module-name", vfModuleName);
         return injectionHelper.getAaiClient().exists(vfModuleUri);
     }
 
     public boolean existsAAIConfigurationGloballyByName(String configurationName) {
-        AAIPluralResourceUri configUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.CONFIGURATION)
-                .queryParam("configuration-name", configurationName);
+        AAIPluralResourceUri configUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configurations())
+                        .queryParam("configuration-name", configurationName);
         return injectionHelper.getAaiClient().exists(configUri);
     }
 
     public boolean existsAAIVolumeGroupGloballyByName(String volumeGroupName) {
-        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VOLUME_GROUP)
+        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(Types.VOLUME_GROUPS.getFragment())
                 .queryParam("volume-group-name", volumeGroupName);
         return injectionHelper.getAaiClient().exists(volumeGroupUri);
     }
@@ -519,7 +537,7 @@
 
         return injectionHelper.getAaiClient()
                 .get(GenericVnfs.class,
-                        AAIUriFactory.createNodesUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName))
+                        AAIUriFactory.createNodesUri(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", vnfName))
                 .orElseGet(() -> {
                     logger.debug("No GenericVnfs matched by name");
                     return null;
@@ -528,8 +546,9 @@
 
     public Optional<Configuration> getRelatedConfigurationByNameFromServiceInstance(String serviceInstanceId,
             String configurationName) {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                .relatedTo(AAIObjectPlurals.CONFIGURATION).queryParam("configuration-name", configurationName);
+        AAIPluralResourceUri uri = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                .relatedTo(Types.CONFIGURATIONS.getFragment()).queryParam("configuration-name", configurationName);
         return injectionHelper.getAaiClient().getOne(Configurations.class, Configuration.class, uri);
     }
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
index c7e3234..cae18a1 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
@@ -24,14 +24,14 @@
 
 import java.util.List;
 import java.util.Optional;
+import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.Relationships;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -88,8 +88,8 @@
 
     protected Optional<CloudRegion> getRelatedCloudRegionAndTenant(Relationships relationships) {
         CloudRegion cloudRegion = new CloudRegion();
-        List<AAIResultWrapper> cloudRegions = relationships.getByType(AAIObjectType.CLOUD_REGION);
-        List<AAIResultWrapper> tenants = relationships.getByType(AAIObjectType.TENANT);
+        List<AAIResultWrapper> cloudRegions = relationships.getByType(Types.CLOUD_REGION);
+        List<AAIResultWrapper> tenants = relationships.getByType(Types.TENANT);
         if (!cloudRegions.isEmpty()) {
             AAIResultWrapper cloudRegionWrapper = cloudRegions.get(0);
             Optional<org.onap.aai.domain.yang.CloudRegion> aaiCloudRegionOp =
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 948c932..843cca0 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -30,6 +30,9 @@
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.onap.aai.domain.yang.LInterface;
 import org.onap.aai.domain.yang.Vserver;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.logging.filter.base.ErrorCode;
 import org.onap.logging.filter.base.ONAPComponents;
 import org.onap.logging.filter.base.ONAPComponentsList;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
@@ -38,9 +41,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
-import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.logger.LoggingAnchor;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.objects.audit.AAIObjectAudit;
@@ -280,20 +280,19 @@
                         + auditList.getAuditType() + "d in AAI: ");
 
                 Stream<AAIObjectAudit> vServerLInterfaceAuditStream = auditList.getAuditList().stream()
-                        .filter(auditObject -> auditObject.getAaiObjectType().equals(AAIObjectType.VSERVER.typeName())
-                                || auditObject.getAaiObjectType().equals(AAIObjectType.L_INTERFACE.typeName()));
+                        .filter(auditObject -> auditObject.getAaiObjectType().equals(Types.VSERVER.typeName())
+                                || auditObject.getAaiObjectType().equals(Types.L_INTERFACE.typeName()));
                 List<AAIObjectAudit> filteredAuditStream =
                         vServerLInterfaceAuditStream.filter(a -> !a.isDoesObjectExist()).collect(Collectors.toList());
 
                 for (AAIObjectAudit object : filteredAuditStream) {
-                    if (object.getAaiObjectType().equals(AAIObjectType.L_INTERFACE.typeName())) {
+                    if (object.getAaiObjectType().equals(Types.L_INTERFACE.typeName())) {
                         LInterface li = objectMapper.getMapper().convertValue(object.getAaiObject(), LInterface.class);
-                        errorMessage = errorMessage
-                                .append(AAIObjectType.L_INTERFACE.typeName() + " " + li.getInterfaceId() + ", ");
+                        errorMessage =
+                                errorMessage.append(Types.L_INTERFACE.typeName() + " " + li.getInterfaceId() + ", ");
                     } else {
                         Vserver vs = objectMapper.getMapper().convertValue(object.getAaiObject(), Vserver.class);
-                        errorMessage =
-                                errorMessage.append(AAIObjectType.VSERVER.typeName() + " " + vs.getVserverId() + ", ");
+                        errorMessage = errorMessage.append(Types.VSERVER.typeName() + " " + vs.getVserverId() + ", ");
                     }
                 }
 
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy
index f0b1bfe..7509233 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy
@@ -20,30 +20,26 @@
 
 package org.onap.so.bpmn.common.scripts
 
-import org.camunda.bpm.engine.delegate.DelegateExecution
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertTrue
+import static org.mockito.ArgumentMatchers.any
+import static org.mockito.Mockito.atLeastOnce
+import static org.mockito.Mockito.mock
+import static org.mockito.Mockito.spy
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+import javax.ws.rs.core.UriBuilder
 import org.junit.Before
 import org.junit.Ignore
 import org.junit.Test
-import org.mockito.Mockito
 import org.mockito.internal.stubbing.answers.DoesNothing
 import org.onap.aai.domain.yang.AllottedResource
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import javax.ws.rs.core.UriBuilder
-import static org.junit.Assert.assertEquals
-import static org.junit.Assert.assertTrue
-import static org.mockito.ArgumentMatchers.any
-import static org.mockito.ArgumentMatchers.anyObject
-import static org.mockito.ArgumentMatchers.isA
-import static org.mockito.Mockito.atLeastOnce
-import static org.mockito.Mockito.doNothing
-import static org.mockito.Mockito.doThrow
-import static org.mockito.Mockito.mock
-import static org.mockito.Mockito.spy
-import static org.mockito.Mockito.verify
-import static org.mockito.Mockito.when
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 
 class AllottedResourceUtilsTest extends MsoGroovyTest{
@@ -67,7 +63,7 @@
         expectedAllottedResource.setId("ID")
         expectedAllottedResource.setResourceVersion("1.2")
         when(client.get(any(AAIResourceUri.class))).thenReturn(new AAIResultWrapper(expectedAllottedResource))
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(Types.ALLOTTED_RESOURCE.getFragment(allottedResourceId))
         when(allottedResourceUtils.setExecutionVariables(mockExecution,expectedAllottedResource,resourceUri)).thenAnswer(new DoesNothing())
         boolean allottedResource = allottedResourceUtils.ifExistsAR(mockExecution,allottedResourceId)
         assertTrue(allottedResource)
@@ -79,7 +75,7 @@
 
         AllottedResource expectedAllottedResource = new AllottedResource()
         expectedAllottedResource.setId("ID")
-        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(ALLOTTED_RESOURSE_URI).build())
+        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(ALLOTTED_RESOURSE_URI).build())
         when(client.get(AllottedResource.class, uri)).thenReturn(Optional.of(expectedAllottedResource))
         Optional<AllottedResource> allottedResource = allottedResourceUtils.getARbyLink(mockExecution, ALLOTTED_RESOURSE_URI,"")
         assertEquals(expectedAllottedResource.getId(),allottedResource.get().getId())
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
index 8a80d79..df4d371 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupNameTest.groovy
@@ -22,6 +22,13 @@
 
 package org.onap.so.bpmn.common.scripts
 
+import static org.assertj.core.api.Assertions.catchThrowableOfType
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertFalse
+import static org.junit.Assert.assertTrue
+import static org.mockito.Mockito.spy
+import static org.mockito.Mockito.when
+import javax.ws.rs.core.UriBuilder
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake
@@ -31,29 +38,18 @@
 import org.mockito.MockitoAnnotations
 import org.onap.aai.domain.yang.RelationshipList
 import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.so.bpmn.common.scripts.ConfirmVolumeGroupName
-import org.onap.so.bpmn.common.scripts.ConfirmVolumeGroupNameFactory
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.constants.Defaults
 import org.springframework.http.HttpStatus
 
-import javax.ws.rs.core.UriBuilder
-
-import static org.assertj.core.api.Assertions.catchThrowableOfType
-import static org.junit.Assert.assertEquals
-import static org.junit.Assert.assertFalse
-import static org.junit.Assert.assertTrue
-import static org.mockito.Mockito.spy
-import static org.mockito.Mockito.when
-
 class ConfirmVolumeGroupNameTest {
 
     private static final AAIResourceUri RESOURCE_URI = AAIUriFactory.createResourceFromExistingURI(
-            AAIObjectType.VOLUME_GROUP, UriBuilder.fromPath('/aai/test/volume-groups/volume-group/testVolumeGroup').build())
+            Types.VOLUME_GROUP, UriBuilder.fromPath('/aai/test/volume-groups/volume-group/testVolumeGroup').build())
 
     private ConfirmVolumeGroupName confirmVolumeGroupName
     @Mock
@@ -79,7 +75,7 @@
         String volumeGroupId = "volume-group-id-1"
         String volumeGroupName = "volume-group-name-1"
         String aicCloudRegion = "aic-cloud-region-1"
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER, aicCloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
 
         delegateExecution.setVariable("ConfirmVolumeGroupName_volumeGroupId", volumeGroupId)
         delegateExecution.setVariable("ConfirmVolumeGroupName_volumeGroupName", volumeGroupName)
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenantTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenantTest.groovy
index cd57434..3b7179d 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenantTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenantTest.groovy
@@ -40,6 +40,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.constants.Defaults
 
 class ConfirmVolumeGroupTenantTest extends MsoGroovyTest {
@@ -79,7 +81,7 @@
         when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
         when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner')
         when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
-        AAIResourceUri arURI = AAIUriFactory. createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), "aicCloudRegionId","volumeGroupId")
+        AAIResourceUri arURI = AAIUriFactory. createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), "aicCloudRegionId").volumeGroup("volumeGroupId"))
         AAIResultWrapper wrapper = new AAIResultWrapper(expectedVolumeGroup)
         when(client.get(arURI)).thenReturn(wrapper)
         confirmVolumeGroupTenant.preProcessRequest(mockExecution)
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroupTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroupTest.groovy
index 4f36aec..cd9061c 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroupTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroupTest.groovy
@@ -31,6 +31,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.constants.Defaults
 
 class CreateAAIVfModuleVolumeGroupTest extends MsoGroovyTest{
@@ -50,7 +52,7 @@
         when(mockExecution.getVariable("CAAIVfModVG_vfModuleId")).thenReturn("VfModule123")
         org.onap.aai.domain.yang.VfModule vfModuleExpected = new  org.onap.aai.domain.yang.VfModule()
         vfModuleExpected.setVfModuleId("VfModule123")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "Vnf123", "VfModule123");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("Vnf123").vfModule("VfModule123"));
         when(client.get(org.onap.aai.domain.yang.VfModule.class,resourceUri)).thenReturn(Optional.of(vfModuleExpected))
         createAAIVfModuleVolumeGroup.getVfModule(mockExecution)
         Mockito.verify(mockExecution).setVariable("CAAIVfModVG_getVfModuleResponseCode", 200)
@@ -61,7 +63,7 @@
     void testGetVfModuleNotFound (){
         when(mockExecution.getVariable("CAAIVfModVG_vnfId")).thenReturn("Vnf123")
         when(mockExecution.getVariable("CAAIVfModVG_vfModuleId")).thenReturn("VfModule123")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "Vnf123", "VfModule123");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("Vnf123").vfModule("VfModule123"));
         when(client.get(org.onap.aai.domain.yang.VfModule.class,resourceUri)).thenReturn(Optional.empty())
         createAAIVfModuleVolumeGroup.getVfModule(mockExecution)
         Mockito.verify(mockExecution).setVariable("CAAIVfModVG_getVfModuleResponseCode", 404)
@@ -72,7 +74,7 @@
     void testGetVfModuleException (){
         when(mockExecution.getVariable("CAAIVfModVG_vnfId")).thenReturn("Vnf123")
         when(mockExecution.getVariable("CAAIVfModVG_vfModuleId")).thenReturn("VfModule123")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "Vnf123", "VfModule123");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("Vnf123").vfModule("VfModule123"));
         when(client.get(org.onap.aai.domain.yang.VfModule.class,resourceUri)).thenThrow(new NullPointerException("Error in AAI client"))
         createAAIVfModuleVolumeGroup.getVfModule(mockExecution)
         Mockito.verify(mockExecution).setVariable("CAAIVfModVG_getVfModuleResponseCode", 500)
@@ -90,8 +92,8 @@
         vfModuleExpected.setVfModuleId("VfModule123")
         vfModuleExpected.setResourceVersion("12345")
         when(mockExecution.getVariable("CAAIVfModVG_getVfModuleResponse")).thenReturn(vfModuleExpected)
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "Vnf123", "VfModule123");
-        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(),"CloudRegion1", "VolumeGroup1")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("Vnf123").vfModule("VfModule123"));
+        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), "CloudRegion1").volumeGroup("VolumeGroup1"))
         doNothing().when(client).connect(resourceUri ,resourceUri1 )
         createAAIVfModuleVolumeGroup.updateVfModule(mockExecution)
         Mockito.verify(mockExecution).setVariable("CAAIVfModVG_updateVfModuleResponseCode", 200)
@@ -109,8 +111,8 @@
         vfModuleExpected.setResourceVersion("12345")
         when(mockExecution.getVariable("CAAIVfModVG_cloudOwner")).thenReturn("cloudOwner")
         when(mockExecution.getVariable("CAAIVfModVG_getVfModuleResponse")).thenReturn(vfModuleExpected)
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "Vnf123", "VfModule123");
-        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, 'cloudOwner',"CloudRegion1", "VolumeGroup1")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("Vnf123").vfModule("VfModule123"));
+        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion('cloudOwner', "CloudRegion1").volumeGroup("VolumeGroup1"))
         doThrow(new NullPointerException("Error in AAI client")).when(client).connect(resourceUri ,resourceUri1 )
         createAAIVfModuleVolumeGroup.updateVfModule(mockExecution)
         Mockito.verify(mockExecution).setVariable("CAAIVfModVG_updateVfModuleResponseCode", 500)
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
index c8eeb0a..77e4374 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy
@@ -31,16 +31,15 @@
 import org.junit.runner.RunWith
 import org.mockito.junit.MockitoJUnitRunner
 import org.onap.aai.domain.yang.GenericVnf
-import org.onap.so.bpmn.mock.FileUtil
-import org.onap.so.client.HttpClient
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.client.HttpClient
 import org.onap.so.constants.Defaults
 
 @RunWith(MockitoJUnitRunner.Silent.class)
@@ -111,8 +110,8 @@
     }
 	
     protected Optional<GenericVnf> mockAAIGenericVnf(String vnfId,String file){
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-        AAIResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+        AAIResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
         Optional<GenericVnf> genericVnf = getAAIObjectFromJson(GenericVnf.class,file);
         when(client.get(GenericVnf.class, resourceUri)).thenReturn(genericVnf)
         when(client.get(GenericVnf.class, resourceUriDepthOne)).thenReturn(genericVnf)
@@ -120,8 +119,8 @@
     }
 
     protected Optional<GenericVnf> mockAAIGenericVnfByName(String vnfName){
-        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName)
-        AAIPluralResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName).depth(Depth.ONE)
+        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("vnf-name", vnfName)
+        AAIPluralResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("vnf-name", vnfName).depth(Depth.ONE)
         Optional<GenericVnf> genericVnf = getAAIObjectFromJson(GenericVnf.class,"__files/aai/GenericVnf.json");
         when(client.get(GenericVnf.class, resourceUri)).thenReturn(genericVnf)
         when(client.get(GenericVnf.class, resourceUriDepthOne)).thenReturn(genericVnf)
@@ -129,21 +128,21 @@
     }
 
     protected void mockAAIGenericVnfNotFound(String vnfId){
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
-        AAIResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
+        AAIResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
         when(client.get(GenericVnf.class, resourceUri)).thenReturn(Optional.empty())
         when(client.get(GenericVnf.class, resourceUriDepthOne)).thenReturn(Optional.empty())
     }
 
     protected void mockAAIGenericVnfByNameNotFound(String vnfName){
-        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName)
-        AAIPluralResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName).depth(Depth.ONE)
+        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("vnf-name", vnfName)
+        AAIPluralResourceUri resourceUriDepthOne = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs()).queryParam("vnf-name", vnfName).depth(Depth.ONE)
         when(client.get(GenericVnf.class, resourceUri)).thenReturn(Optional.empty())
         when(client.get(GenericVnf.class, resourceUriDepthOne)).thenReturn(Optional.empty())
     }
 
     protected AAIResultWrapper mockVolumeGroupWrapper(String region, String volumeGroupId, String file){
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, region,volumeGroupId)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, region).volumeGroup(volumeGroupId))
         String json = FileUtil.readResourceFile(file)
         AAIResultWrapper resultWrapper = new AAIResultWrapper(json)
         when(client.get(resourceUri)).thenReturn(resultWrapper)
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
index 1918d10..94317f4 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy
@@ -38,6 +38,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aai.domain.yang.VfModule
 
 import com.github.tomakehurst.wiremock.junit.WireMockRule
@@ -67,7 +69,7 @@
         when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("supercool")
         VfModule vfModule = new VfModule()
         vfModule.setVfModuleId("supercool")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "skask", "supercool");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("skask").vfModule("supercool"));
         when(client.get(VfModule.class,resourceUri)).thenReturn(Optional.of(vfModule))
         updateAAIVfModule.getVfModule(mockExecution)
         verify(mockExecution).setVariable(prefix + "getVfModuleResponseCode", 200)
@@ -79,7 +81,7 @@
         when(mockExecution.getVariable("prefix")).thenReturn(prefix)
         when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
         when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("supercool")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "skask", "supercool");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("skask").vfModule("supercool"));
         when(client.get(VfModule.class,resourceUri)).thenReturn(Optional.empty())
         updateAAIVfModule.getVfModule(mockExecution)
         verify(mockExecution).setVariable(prefix + "getVfModuleResponseCode", 404)
@@ -91,7 +93,7 @@
         when(mockExecution.getVariable("prefix")).thenReturn(prefix)
         when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
         when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("supercool")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "skask", "supercool");
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("skask").vfModule("supercool"));
         when(client.get(VfModule.class,resourceUri)).thenThrow(new NullPointerException("Error from AAI client"))
         updateAAIVfModule.getVfModule(mockExecution)
         verify(mockExecution).setVariable(prefix + "getVfModuleResponseCode", 500)
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index 70bce65..127253a 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -59,7 +59,6 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
@@ -69,12 +68,12 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
@@ -1830,7 +1829,8 @@
         expectedAAI.setRelationshipList(relationshipList);
 
         Configuration expected = new Configuration();
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, "configurationId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration("configurationId"));
         AAIResultWrapper configurationWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI));
 
@@ -1854,7 +1854,8 @@
         expectedAAI.setRelationshipList(relationshipList);
 
         GenericVnf expected = new GenericVnf();
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId"));
         AAIResultWrapper vnfWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI));
 
@@ -1884,7 +1885,7 @@
         expectedAAI.setRelationshipList(relationshipList);
 
         Pnf expected = new Pnf();
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.PNF, "pnfId");
+        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf("pnfId"));
         AAIResultWrapper pnfWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI));
 
@@ -2008,7 +2009,8 @@
         List<L3Network> l3Networks = new ArrayList<>();
         AAIResultWrapper l3NetworksWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI));
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, "networkId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network("networkId"));
 
         doReturn(l3NetworksWrapper).when(SPY_bbInputSetupUtils).getAAIResourceDepthTwo(aaiResourceUri);
         doReturn(expected).when(bbInputSetupMapperLayer).mapAAIL3Network(isA(org.onap.aai.domain.yang.L3Network.class));
@@ -3422,7 +3424,7 @@
 
         String vnfcName = "vnfcName";
         org.onap.aai.domain.yang.Configuration expectedAAI = new org.onap.aai.domain.yang.Configuration();
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfcName);
+        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfcName));
         AAIResultWrapper configurationWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(expectedAAI));
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
index f6615e5..c65b36a 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
@@ -64,12 +64,12 @@
 import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aai.domain.yang.VolumeGroups;
 import org.onap.aai.domain.yang.VpnBinding;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
@@ -179,8 +179,10 @@
         Optional<CloudRegion> expected = Optional.of(new CloudRegion());
 
         doReturn(expected).when(MOCK_aaiResourcesClient).get(CloudRegion.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, cloudConfig.getCloudOwner(),
-                        cloudConfig.getLcpCloudRegionId()).depth(Depth.TWO));
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                                .cloudRegion(cloudConfig.getCloudOwner(), cloudConfig.getLcpCloudRegionId()))
+                        .depth(Depth.TWO));
 
         assertThat(bbInputSetupUtils.getCloudRegion(cloudConfig), sameBeanAs(expected.get()));
     }
@@ -208,7 +210,7 @@
         expected.get().setId(instanceGroupId);
 
         doReturn(expected).when(MOCK_aaiResourcesClient).get(InstanceGroup.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroupId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroupId)));
 
         assertThat(bbInputSetupUtils.getAAIInstanceGroup(instanceGroupId), sameBeanAs(expected.get()));
     }
@@ -225,7 +227,7 @@
         expected.get().setGlobalCustomerId(globalSubscriberId);
 
         doReturn(expected).when(MOCK_aaiResourcesClient).get(org.onap.aai.domain.yang.Customer.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, globalSubscriberId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId)));
 
         assertThat(bbInputSetupUtils.getAAICustomer(globalSubscriberId), sameBeanAs(expected.get()));
     }
@@ -244,8 +246,8 @@
 
         expected.get().setServiceType(subscriptionServiceType);
         doReturn(expected).when(MOCK_aaiResourcesClient).get(org.onap.aai.domain.yang.ServiceSubscription.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_SUBSCRIPTION, globalSubscriberId,
-                        subscriptionServiceType));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId)
+                        .serviceSubscription(subscriptionServiceType)));
 
         assertThat(bbInputSetupUtils.getAAIServiceSubscription(globalSubscriberId, subscriptionServiceType),
                 sameBeanAs(expected.get()));
@@ -286,9 +288,12 @@
         ServiceInstance expected = new ServiceInstance();
         expected.setServiceInstanceId(serviceInstanceId);
 
-        doReturn(Optional.of(expected)).when(MOCK_aaiResourcesClient).get(ServiceInstance.class, AAIUriFactory
-                .createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustomerId, serviceType, serviceInstanceId)
-                .depth(Depth.TWO));
+        doReturn(Optional.of(expected)).when(MOCK_aaiResourcesClient)
+                .get(ServiceInstance.class,
+                        AAIUriFactory
+                                .createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId)
+                                        .serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
+                                .depth(Depth.TWO));
 
         assertThat(bbInputSetupUtils.getAAIServiceInstanceByIdAndCustomer(globalCustomerId, serviceType,
                 serviceInstanceId), sameBeanAs(expected));
@@ -320,8 +325,8 @@
         serviceInstances.getServiceInstance().add(expectedServiceInstance);
 
         AAIPluralResourceUri expectedUri = AAIUriFactory
-                .createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer.getGlobalCustomerId(),
-                        customer.getServiceSubscription().getServiceType())
+                .createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId())
+                        .serviceSubscription(customer.getServiceSubscription().getServiceType()).serviceInstances())
                 .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO);
         bbInputSetupUtils.getAAIServiceInstanceByName(serviceInstanceName, customer);
 
@@ -402,14 +407,15 @@
                 mapper.readValue(new File(RESOURCE_PATH + "aaiGenericVnfInput.json"), GenericVnf.class);
 
         doReturn(Optional.of(expectedAaiVnf)).when(MOCK_aaiResourcesClient).get(isA(Class.class),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)));
 
         assertThat(bbInputSetupUtils.getAAIGenericVnf(vnfId), sameBeanAs(expectedAaiVnf));
     }
 
     @Test
     public void getAAIResourceDepthOneTest() {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "anyVnfId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("anyVnfId"));
         AAIResourceUri expectedUri = aaiResourceUri.clone().depth(Depth.ONE);
         AAIResourceUri aaiResourceUriClone = aaiResourceUri.clone();
 
@@ -421,7 +427,8 @@
 
     @Test
     public void getAAIResourceDepthTwoTest() {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "anyVnfId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("anyVnfId"));
         AAIResourceUri expectedUri = aaiResourceUri.clone().depth(Depth.TWO);
         AAIResourceUri aaiResourceUriClone = aaiResourceUri.clone();
 
@@ -516,8 +523,8 @@
         vnf.setVnfId(vnfId);
         vnf.setVnfName(vnfName);
         doReturn(Optional.of(vnf)).when(MOCK_aaiResourcesClient).getOne(GenericVnfs.class, GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                        .relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName));
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", vnfName));
         Optional<GenericVnf> actual =
                 this.bbInputSetupUtils.getRelatedVnfByNameFromServiceInstance(serviceInstanceId, vnfName);
         assertTrue(actual.isPresent());
@@ -545,8 +552,8 @@
         volumeGroup.setVolumeGroupId(volumeGroupId);
         volumeGroup.setVolumeGroupName(volumeGroupName);
         doReturn(Optional.of(volumeGroup)).when(MOCK_aaiResourcesClient).getOne(VolumeGroups.class, VolumeGroup.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                        .relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment()).queryParam("volume-group-name", volumeGroupName));
         Optional<VolumeGroup> actual =
                 this.bbInputSetupUtils.getRelatedVolumeGroupByNameFromVnf(vnfId, volumeGroupName);
         assertEquals(volumeGroup.getVolumeGroupId(), actual.get().getVolumeGroupId());
@@ -572,8 +579,10 @@
         volumeGroup.setVolumeGroupId("id123");
         volumeGroup.setVolumeGroupName("name123");
         doReturn(Optional.of(volumeGroup)).when(MOCK_aaiResourcesClient).getOne(VolumeGroups.class, VolumeGroup.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "vnf-id123", "vf-module-id123")
-                        .relatedTo(AAIObjectPlurals.VOLUME_GROUP)
+                AAIUriFactory
+                        .createResourceUri(
+                                AAIFluentTypeBuilder.network().genericVnf("vnf-id123").vfModule("vf-module-id123"))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment())
                         .queryParam("volume-group-name", "volume-group-name123"));
         Optional<VolumeGroup> actual = this.bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule("vnf-id123",
                 "vf-module-id123", "volume-group-name123");
@@ -620,8 +629,10 @@
         VolumeGroup volumeGroup = new VolumeGroup();
         volumeGroup.setVolumeGroupId("id123");
         doReturn(Optional.of(volumeGroup)).when(MOCK_aaiResourcesClient).getOne(VolumeGroups.class, VolumeGroup.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "vnf-id123", "vf-module-id123")
-                        .relatedTo(AAIObjectPlurals.VOLUME_GROUP));
+                AAIUriFactory
+                        .createResourceUri(
+                                AAIFluentTypeBuilder.network().genericVnf("vnf-id123").vfModule("vf-module-id123"))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment()));
         Optional<VolumeGroup> actual =
                 this.bbInputSetupUtils.getRelatedVolumeGroupFromVfModule("vnf-id123", "vf-module-id123");
         assertTrue(actual.isPresent());
@@ -679,8 +690,8 @@
         configuration.setConfigurationId("id123");
         doReturn(Optional.of(configuration)).when(MOCK_aaiResourcesClient).getOne(Configurations.class,
                 Configuration.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "service-instance-id123")
-                        .relatedTo(AAIObjectPlurals.CONFIGURATION)
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("service-instance-id123"))
+                        .relatedTo(Types.CONFIGURATIONS.getFragment())
                         .queryParam("configuration-name", "configuration-name123"));
         Optional<Configuration> actual = this.bbInputSetupUtils
                 .getRelatedConfigurationByNameFromServiceInstance("service-instance-id123", "configuration-name123");
@@ -690,8 +701,8 @@
 
     @Test
     public void existsAAIVfModuleGloballyByNameTest() {
-        AAIPluralResourceUri expectedUri =
-                AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE).queryParam("vf-module-name", "testVfModule");
+        AAIPluralResourceUri expectedUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment())
+                .queryParam("vf-module-name", "testVfModule");
         bbInputSetupUtils.existsAAIVfModuleGloballyByName("testVfModule");
 
         verify(MOCK_aaiResourcesClient, times(1)).exists(expectedUri);
@@ -699,8 +710,9 @@
 
     @Test
     public void existsAAIConfigurationGloballyByNameTest() {
-        AAIPluralResourceUri expectedUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.CONFIGURATION)
-                .queryParam("configuration-name", "testConfig");
+        AAIPluralResourceUri expectedUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configurations())
+                        .queryParam("configuration-name", "testConfig");
         bbInputSetupUtils.existsAAIConfigurationGloballyByName("testConfig");
 
         verify(MOCK_aaiResourcesClient, times(1)).exists(expectedUri);
@@ -708,8 +720,8 @@
 
     @Test
     public void existsAAINetworksGloballyByNameTest() {
-        AAIPluralResourceUri expectedUri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", "testNetwork");
+        AAIPluralResourceUri expectedUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks())
+                .queryParam("network-name", "testNetwork");
         bbInputSetupUtils.existsAAINetworksGloballyByName("testNetwork");
 
         verify(MOCK_aaiResourcesClient, times(1)).exists(expectedUri);
@@ -717,7 +729,7 @@
 
     @Test
     public void existsAAIVolumeGroupGloballyByNameTest() {
-        AAIPluralResourceUri expectedUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VOLUME_GROUP)
+        AAIPluralResourceUri expectedUri = AAIUriFactory.createNodesUri(Types.VOLUME_GROUPS.getFragment())
                 .queryParam("volume-group-name", "testVoumeGroup");
 
         bbInputSetupUtils.existsAAIVolumeGroupGloballyByName("testVoumeGroup");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java
index edd214f..4d034a1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java
@@ -23,7 +23,6 @@
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import java.io.File;
@@ -38,14 +37,14 @@
 import org.mockito.Mockito;
 import org.mockito.Spy;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.Relationships;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.Relationships;
 import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
@@ -143,14 +142,14 @@
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(cloudRegion));
         cloudRegions.add(cloudRegionWrapper);
 
-        doReturn(cloudRegions).when(relationships).getByType(AAIObjectType.CLOUD_REGION);
+        doReturn(cloudRegions).when(relationships).getByType(Types.CLOUD_REGION);
         List<AAIResultWrapper> tenants = new ArrayList<>();
         org.onap.aai.domain.yang.Tenant tenant = new org.onap.aai.domain.yang.Tenant();
         tenant.setTenantId(tenantId);
         AAIResultWrapper tenantWrapper =
                 new AAIResultWrapper(new AAICommonObjectMapperProvider().getMapper().writeValueAsString(tenant));
         tenants.add(tenantWrapper);
-        doReturn(tenants).when(relationships).getByType(AAIObjectType.TENANT);
+        doReturn(tenants).when(relationships).getByType(Types.TENANT);
 
         Optional<CloudRegion> actual = SPY_CloudInfoFromAAI.getRelatedCloudRegionAndTenant(relationships);
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
index e05a3bd..fff495f 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
@@ -34,14 +34,14 @@
 import org.mockito.Mockito;
 import org.mockito.Spy;
 import org.onap.aai.domain.yang.Vserver;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.so.BaseTest;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
 import org.onap.so.bpmn.core.WorkflowException;
 import org.onap.so.bpmn.mock.FileUtil;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.so.objects.audit.AAIObjectAudit;
 import org.onap.so.objects.audit.AAIObjectAuditList;
 import org.springframework.beans.BeanUtils;
@@ -71,7 +71,7 @@
         auditList.setAuditType("create");
         auditList.setHeatStackName("testStackName");
         AAIObjectAudit vserver = new AAIObjectAudit();
-        vserver.setAaiObjectType(AAIObjectType.VSERVER.typeName());
+        vserver.setAaiObjectType(Types.VSERVER.typeName());
         vserver.setDoesObjectExist(false);
         Vserver vs = new Vserver();
         vs.setVserverId("testVServerId");
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateCommunicationService.groovy
index 8e3bef6..1130158 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateCommunicationService.groovy
@@ -20,12 +20,20 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.Relationship
 import org.onap.aai.domain.yang.RelationshipData
 import org.onap.aai.domain.yang.RelationshipList
 import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -33,19 +41,10 @@
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.NotFoundException
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
 class ActivateCommunicationService extends AbstractServiceTaskProcessor {
 
     String Prefix="ACS_"
@@ -130,8 +129,7 @@
 
         //check the cms status
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
 
             if (!client.exists(uri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
@@ -394,8 +392,7 @@
             // create service
             ServiceInstance csi = new ServiceInstance()
             csi.setOrchestrationStatus(orchestrationStatus)
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
             client.update(uri, csi)
 
         } catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSliceService.groovy
index 334f5b4..36d579c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSliceService.groovy
@@ -20,11 +20,20 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.google.gson.Gson
-import com.google.gson.reflect.TypeToken
+import static org.apache.commons.lang3.StringUtils.isBlank
+import java.lang.reflect.Type
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.*
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.beans.nsmf.NSSI
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -32,22 +41,13 @@
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
-import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-
-import javax.ws.rs.NotFoundException
-import java.lang.reflect.Type
-
-import static org.apache.commons.lang3.StringUtils.isBlank
+import com.google.gson.Gson
+import com.google.gson.reflect.TypeToken
 
 /**
  * This groovy class supports the <class>ActivateSliceService.bpmn</class> process.
@@ -248,8 +248,7 @@
         String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
 
         AAIResourcesClient client = new AAIResourcesClient()
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalSubscriberId, subscriptionServiceType, NSIServiceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(NSIServiceId))
         if (!client.exists(uri)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
         }
@@ -271,8 +270,7 @@
                     }
                     for (String snssi : SNSSIList) {
                         AAIResourcesClient client01 = new AAIResourcesClient()
-                        AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                                globalSubscriberId, subscriptionServiceType, snssi)
+                        AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(snssi))
                         if (!client.exists(uri01)) {
                             exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
                                     "Service Instance was not found in aai")
@@ -339,8 +337,7 @@
 
         try {
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalCustId, serviceType, serviceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceId))
             if (!client.exists(uri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
             }
@@ -392,8 +389,7 @@
         try {
             //get the TN NSSI id by NSI id, active NSSI TN slicing
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalSubscriberId, subscriptionServiceType, NSIserviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(NSIserviceInstanceId))
             if (!client.exists(uri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
             }
@@ -410,8 +406,7 @@
                                 relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length())
 
                         AAIResourcesClient client01 = new AAIResourcesClient()
-                        AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                                globalSubscriberId, subscriptionServiceType, nssiserviceid)
+                        AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(nssiserviceid))
                         if (!client.exists(uri01)) {
                             exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
                                     "Service Instance was not found in aai")
@@ -477,8 +472,7 @@
         try {
             try {
                 AAIResourcesClient client = new AAIResourcesClient()
-                AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                        globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+                AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
                 if (!client.exists(uri)) {
                     exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
                             "Service Instance was not found in aai")
@@ -516,8 +510,8 @@
 
                 //get the allotted-resources by e2e slice id
                 AAIResourcesClient client_allotted = new AAIResourcesClient()
-                AAIResourceUri uri_allotted = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE_ALL,
-                        globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+                AAIPluralResourceUri uri_allotted = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId).allottedResources()
+                        )
                 if (!client_allotted.exists(uri_allotted)) {
                     exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
                 }
@@ -536,8 +530,7 @@
                     try {
                         //get the NSI id by e2e slice id
                         AAIResourcesClient client = new AAIResourcesClient()
-                        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                                globalSubscriberId, subscriptionServiceType, nsiserviceid)
+                        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(nsiserviceid))
                         if (!client.exists(uri)) {
                             exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
                                     "Service Instance was not found in aai")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
index d59f865..4108cce 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy
@@ -20,6 +20,7 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+
 import com.google.gson.JsonArray
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
@@ -42,6 +43,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import javax.ws.rs.NotFoundException
 import org.onap.so.beans.nsmf.AllocateTnNssi
 import org.onap.so.beans.nsmf.DeAllocateNssi
@@ -53,6 +56,7 @@
 import org.onap.aai.domain.yang.SliceProfiles
 import org.onap.aai.domain.yang.Relationship
 
+
 class AnNssmfUtils {
 
 	private static final Logger logger = LoggerFactory.getLogger(AnNssmfUtils.class)
@@ -228,13 +232,13 @@
 	try {
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), ANNF_sliceProfileInstanceId)
+		AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(ANNF_sliceProfileInstanceId))
 		client.create(sliceProfileUri, ANNF_sliceProfileInstance)
 
-		AAIResourceUri sliceProfileUri1 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), TNFH_sliceProfileInstanceId)
+		AAIResourceUri sliceProfileUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(TNFH_sliceProfileInstanceId))
 		client.create(sliceProfileUri1, TNFH_sliceProfileInstance)
 
-		AAIResourceUri sliceProfileUri2 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), TNMH_sliceProfileInstanceId)
+		AAIResourceUri sliceProfileUri2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(TNMH_sliceProfileInstanceId))
 		client.create(sliceProfileUri2, TNMH_sliceProfileInstance)
 
 	} catch (BpmnError e) {
@@ -303,10 +307,7 @@
         String msg
 		AAIResourcesClient client = new AAIResourcesClient()
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    instanceId).relationshipAPI()
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(instanceId).relationshipAPI())
             client.create(uri, relationship)
 
         } catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
index be5a029..7b8b79f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
@@ -22,43 +22,28 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.google.gson.JsonObject
+import static org.apache.commons.lang3.StringUtils.*
+import javax.ws.rs.core.Response
+import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONArray
 import org.json.JSONObject
-import org.json.XML
-import org.onap.so.bpmn.common.scripts.ExternalAPIUtilFactory
-
-import static org.apache.commons.lang3.StringUtils.*
-import groovy.xml.XmlUtil
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
-import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.aai.domain.yang.SpPartner
-import org.onap.so.bpmn.common.recipe.ResourceInput
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
-import java.util.Map
-import java.util.UUID
-import javax.ws.rs.core.Response
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
+import org.onap.so.bpmn.common.scripts.ExternalAPIUtilFactory
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import org.camunda.bpm.engine.runtime.Execution
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64
-
 
 /**
  * This groovy class supports the <class>Create3rdONAPE2EServiceInstance.bpmn</class> process.
@@ -604,12 +589,12 @@
 		partner.setModelCustomizationId(resourceModelCustomizationUuid)
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SP_PARTNER, sppartnerId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().spPartner(sppartnerId))
 		logger.info("sending request to create sp-partner: " +  uri.toString())
 		logger.info("requestbody: " + partner)
 		client.create(uri, partner)
 
-		AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+		AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 		client.connect(uri, siUri)
         } catch (Exception ex) {
             String msg = "Exception in Create3rdONAPE2EServiceInstance.saveSPPartnerInAAI. " + ex.getMessage()
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
index f8eafe7..e253855 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
@@ -20,12 +20,16 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import groovy.json.JsonSlurper
+import static org.apache.commons.lang3.StringUtils.isBlank
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONObject
 import org.onap.aai.domain.yang.Relationship
 import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -36,16 +40,11 @@
 import org.onap.so.bpmn.core.domain.ServiceInfo
 import org.onap.so.bpmn.core.domain.ServiceProxy
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.springframework.web.util.UriUtils
-
-import static org.apache.commons.lang3.StringUtils.isBlank
+import groovy.json.JsonSlurper
 
 /**
  * This groovy class supports the <class>DoCreateCommunicationService.bpmn</class> process.
@@ -538,10 +537,7 @@
         String msg
         try {
             String serviceInstanceId = execution.getVariable("serviceInstanceId")
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    serviceInstanceId).relationshipAPI()
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(serviceInstanceId)).relationshipAPI()
             client.create(uri, relationship)
 
         } catch (BpmnError e) {
@@ -633,8 +629,7 @@
             // create service
             ServiceInstance csi = new ServiceInstance()
             csi.setOrchestrationStatus(orchestrationStatus)
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
             client.update(uri, csi)
             logger.debug(Prefix + "updateFinishStatusInAAI update communication service status to deactivated")
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index c9ad18b..b7edc02 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -39,6 +39,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
@@ -361,7 +363,7 @@
 				si.setOrchestrationStatus("Pending")
 			}
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 			client.update(uri, si)
 		} catch (BpmnError e) {
 			throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 56a97bc..eb67b8f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -32,20 +32,19 @@
 import org.onap.aai.domain.yang.ServiceInstances
 import org.onap.aai.domain.yang.v13.Metadata
 import org.onap.aai.domain.yang.v13.Metadatum
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.recipe.ResourceInput
 import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.core.domain.ModelInfo
-import org.onap.so.bpmn.core.domain.ResourceType
-import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.json.JsonUtils
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -142,8 +141,7 @@
         AAIResourcesClient client = new AAIResourcesClient()
 
         // think how AAI queried for PNF name using the name
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE_METADATA,
-                customerId, serviceType, serId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customerId).serviceSubscription(serviceType).serviceInstance(serId).metadata())
         logger.debug("uri for pnf get:" + uri.toString())
 
         Metadata metadata = client.get(uri).asBean(Metadata.class).get()
@@ -294,7 +292,7 @@
 
         AAIResourcesClient client = new AAIResourcesClient()
         logger.info("sending request to resolve vpn-name:" + vpnName)
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(new AAIObjectPlurals("/nodes", "/service-instances", "queryByName")).queryParam("service-instance-name", parentServiceName)
+        AAIResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment()).queryParam("service-instance-name", parentServiceName)
         Optional<ServiceInstances> serviceInstancesOpt = client.get(ServiceInstances.class, uri)
 
         if(serviceInstancesOpt.isPresent()) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
index 342fce7..65398eb 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
@@ -20,37 +20,33 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.fasterxml.jackson.databind.ObjectMapper
+import static org.apache.commons.lang3.StringUtils.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.ServiceInstance
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.beans.nsmf.EsrInfo
-import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.beans.nsmf.SliceTaskParams
 import org.onap.so.beans.nsmf.SliceTaskParamsAdapter
 import org.onap.so.beans.nsmf.oof.TemplateInfo
-import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-
-import static org.apache.commons.lang3.StringUtils.*
-import org.springframework.web.util.UriUtils
-import groovy.json.JsonSlurper
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.beans.nsmf.SliceTaskParams
-import org.onap.so.db.request.beans.OrchestrationTask
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
 import org.onap.so.bpmn.common.scripts.OofUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.db.request.beans.OrchestrationTask
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
+import org.springframework.web.util.UriUtils
+import com.fasterxml.jackson.databind.ObjectMapper
+import groovy.json.JsonSlurper
 
 public class CreateSliceService extends AbstractServiceTaskProcessor {
     String Prefix = "CRESS_"
@@ -409,7 +405,7 @@
             ServiceInstance si = new ServiceInstance()
             si.setOrchestrationStatus(orchStatus)
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
             client.update(uri, si)
         } catch (BpmnError e) {
             throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
index 80b6641..4cebb92 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
@@ -26,6 +26,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -245,8 +247,8 @@
         String serviceType = execution.getVariable("serviceType")
         String serviceId = execution.getVariable("serviceInstanceId")
 
-        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,globalSubscriberId,serviceType,nsInstanceId)
-        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,globalSubscriberId,serviceType,serviceId)
+        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nsInstanceId))
+        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceId))
 
         try{
             getAAIClient().connect(nsUri,relatedServiceUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
index 1dfe137..4725f9a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
@@ -22,21 +22,21 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import org.onap.so.logger.LoggingAnchor
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.core.WorkflowException
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-
 import groovy.json.JsonOutput
 import groovy.json.JsonSlurper
 
@@ -324,7 +324,7 @@
 		ExceptionUtil exceptionUtil = new ExceptionUtil()
 		try {
 
-			AAIResourceUri uri = AAIUriFactory.createNodesUri(AAIObjectType.SERVICE_INSTANCE,serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 			if(getAAIClient().exists(uri)){
 				logger.debug('Service instance ' + serviceInstanceId + ' found in AAI.')
 			}else{
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
index 057863b..3062b1c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
@@ -45,6 +45,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -473,7 +475,7 @@
 		String id = execution.getVariable(Prefix + "SppartnerId")
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SP_PARTNER, id)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().spPartner(id))
 		SpPartner sp = client.get(uri).asBean(SpPartner.class).get()
 
 		logger.debug("GET sppartner Received a Good Response")
@@ -508,7 +510,7 @@
 		String sppartnerId = execution.getVariable(Prefix + "SppartnerId")
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SP_PARTNER, sppartnerId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().spPartner(sppartnerId))
 		client.delete(uri)
 		logger.debug("Delete sppartner Received a Good Response")
 		execution.setVariable(Prefix + "SuccessIndicator", true)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
index 26936bf..8cab146 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
@@ -20,12 +20,23 @@
 package org.onap.so.bpmn.infrastructure.scripts
 
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.aai.domain.yang.Relationship
-import org.onap.aai.domain.yang.ServiceInstance
 import org.onap.aai.domain.yang.CommunicationServiceProfile
 import org.onap.aai.domain.yang.CommunicationServiceProfiles
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aaiclient.client.aai.AAIObjectName
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -35,21 +46,10 @@
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.client.HttpClient
-import org.onap.so.client.HttpClientFactory
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.NotFoundException
-import javax.ws.rs.core.Response
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
 class DeleteCommunicationService extends AbstractServiceTaskProcessor {
     private final String PREFIX ="DeleteCommunicationService"
     private final Long TIMEOUT = 60 * 60 * 1000
@@ -147,7 +147,7 @@
         String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
         String errorMsg = "query communication service from aai failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
         if(si.isPresent())
         {
@@ -177,16 +177,16 @@
     /**
      * query AAI
      * @param execution
-     * @param aaiObjectType
+     * @param aaiObjectName
      * @param instanceId
      * @return AAIResultWrapper
      */
-    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectName aaiObjectName, String instanceId, String errorMsg)
     {
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(instanceId))
         if (!getAAIClient().exists(resourceUri)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
         }
@@ -310,7 +310,7 @@
         String profileId
         try
         {
-            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+            AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId).communicationServiceProfiles())
             AAIResultWrapper wrapper = getAAIClient().get(resourceUri, NotFoundException.class)
             Optional<CommunicationServiceProfiles> csProfilesOpt = wrapper.asBean(CommunicationServiceProfiles.class)
             if(csProfilesOpt.isPresent()){
@@ -318,7 +318,7 @@
                 CommunicationServiceProfile csProfile = csProfiles.getCommunicationServiceProfile().get(0)
                 profileId = csProfile ? csProfile.getProfileId() : ""
             }
-            resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+            resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId).communicationServiceProfile(profileId))
             if (!getAAIClient().exists(resourceUri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "communication service profile was not found in aai")
             }
@@ -344,7 +344,7 @@
         try
         {
             LOGGER.debug("start delete communication service from AAI")
-            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(execution.getVariable("serviceInstanceId")))
             getAAIClient().delete(serviceInstanceUri)
 
             execution.setVariable("progress", "100")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
index 99289b8..036fa51 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
@@ -41,6 +41,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
@@ -115,7 +117,7 @@
 		String deviceId = execution.getVariable(Prefix + "DeviceId")
         
         AAIResourcesClient client = new AAIResourcesClient()
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.DEVICE, deviceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().device(deviceId))
         Device dev = client.get(uri).asBean(Device.class).get()
         
         String devClass = dev.getClass ()
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index cc5b8cf..6d699d3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -43,6 +43,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -149,7 +151,7 @@
         try {
             String parentServiceId = "";
             AAIResourcesClient resourceClient = new AAIResourcesClient();
-            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, globalCustId, serviceType, serviceInstanceId, allotedResourceId)
+            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId).allottedResource(allotedResourceId))
             AAIResultWrapper aaiResult = resourceClient.get(serviceInstanceUri, NotFoundException.class)
             Optional<AllottedResource> si = aaiResult.asBean(AllottedResource.class)
             if((si.present) && (null != si.get().getRelationshipList()) && (null != si.get().getRelationshipList().getRelationship())) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
index d22ee5e..4c008a2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
@@ -20,29 +20,28 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.ServiceProfile
 import org.onap.aai.domain.yang.ServiceProfiles
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.NotFoundException
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
 class DeleteSliceService extends AbstractServiceTaskProcessor {
 
     private final String PREFIX ="DeleteSliceService"
@@ -122,7 +121,7 @@
         LOGGER.trace("${PREFIX} Start deleteSliceServiceInstance")
         try {
 
-            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(execution.getVariable("serviceInstanceId")))
             getAAIClient().delete(serviceInstanceUri)
 
             execution.setVariable("progress", "100")
@@ -169,7 +168,7 @@
 
         try
         {
-            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+            AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId).serviceProfiles())
             AAIResultWrapper wrapper = getAAIClient().get(resourceUri, NotFoundException.class)
             Optional<ServiceProfiles> serviceProfilesOpt =wrapper.asBean(ServiceProfiles.class)
             if(serviceProfilesOpt.isPresent()){
@@ -177,7 +176,7 @@
                 ServiceProfile serviceProfile = serviceProfiles.getServiceProfile().get(0)
                 profileId = serviceProfile ? serviceProfile.getProfileId() : ""
             }
-            resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+            resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId).serviceProfile(profileId))
             if (!getAAIClient().exists(resourceUri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
             }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index 005f0f3..1bcf615 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -31,6 +31,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.AaiUtil;
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
@@ -197,7 +198,7 @@
 
 		AaiUtil aaiUtil = new AaiUtil(this)
 
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
 		def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
 		execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
@@ -240,7 +241,7 @@
 		String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
 
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroup(volumeGroupId))
             AAIResultWrapper volumeGroupWrapper = getAAIClient().get(uri)
 
             if (!volumeGroupWrapper.isEmpty()) {
@@ -249,7 +250,7 @@
                 def heatStackId = volumeGroupOp.get().getHeatStackId() ?: ""
                 execution.setVariable('DELVfModVol_volumeGroupHeatStackId', heatStackId)
 
-                if ( volumeGroupWrapper.getRelationships().isPresent() && !volumeGroupWrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()) {
+                if ( volumeGroupWrapper.getRelationships().isPresent() && !volumeGroupWrapper.getRelationships().get().getRelatedUris(Types.VF_MODULE).isEmpty()) {
                     logger.debug('Volume Group ' + volumeGroupId + ' currently in use')
                     exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
                 }
@@ -283,7 +284,7 @@
 	 */
 	private String getTenantIdFromVolumeGroup(AAIResultWrapper wrapper) {
         if(wrapper.getRelationships().isPresent()) {
-            List<AAIResourceUri> tenantURIList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.TENANT)
+            List<AAIResourceUri> tenantURIList = wrapper.getRelationships().get().getRelatedUris(Types.TENANT)
             if(!tenantURIList.isEmpty()){
                 return tenantURIList.get(0).getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
             }
@@ -356,7 +357,7 @@
 
         ExceptionUtil exceptionUtil = new ExceptionUtil()
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroup(groupId))
             getAAIClient().delete(uri)
             logger.debug("Volume group $groupId deleted.")
         }catch(NotFoundException e){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
index 4d86fb4..9ccc695 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
@@ -19,7 +19,6 @@
  */
 
 package org.onap.so.bpmn.infrastructure.scripts
-
 import static org.apache.commons.lang3.StringUtils.isBlank
 
 import javax.ws.rs.NotFoundException
@@ -33,6 +32,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.beans.nsmf.ActDeActNssi
 import org.onap.so.beans.nsmf.EsrInfo
 import org.onap.so.beans.nsmf.ServiceInfo
@@ -49,6 +50,7 @@
 import com.fasterxml.jackson.databind.ObjectMapper
 import com.google.gson.JsonObject
 
+
 /**
  * Internal AN NSSMF to handle NSSI Activation/Deactivation
  *
@@ -421,8 +423,7 @@
 
 		try {
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-					globalSubscriberId, subscriptionServiceType, serviceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceId))
 			if (!client.exists(uri)) {
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
 			}
@@ -488,8 +489,7 @@
 		Map<String,ServiceInstance> relatedInstances = new HashMap<>()
 		
 		AAIResourcesClient client = getAAIClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, instanceId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(instanceId))
 		if (!client.exists(uri)) {
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai : ${instanceId}")
 		}
@@ -504,8 +504,7 @@
 				String relatioshipurl = relationship.getRelatedLink()
 				String serviceInstanceId =
 						relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length())
-				uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-						globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+				uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
 				if (!client.exists(uri)) {
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
 							"Service Instance was not found in aai: ${serviceInstanceId} related to ${instanceId}")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSI.groovy
index 306c53a..5e50b9d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSI.groovy
@@ -20,15 +20,31 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONObject
+import org.onap.aai.domain.yang.GenericVnf
+import org.onap.aai.domain.yang.RelatedToProperty
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.RelationshipData
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aaiclient.client.aai.AAIObjectName
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.CatalogDbUtils
 import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.HttpClient
+import org.onap.so.db.request.beans.ResourceOperationStatus
 import org.onap.so.serviceinstancebeans.CloudConfiguration
 import org.onap.so.serviceinstancebeans.LineOfBusiness
 import org.onap.so.serviceinstancebeans.ModelInfo
@@ -36,37 +52,14 @@
 import org.onap.so.serviceinstancebeans.OwningEntity
 import org.onap.so.serviceinstancebeans.Platform
 import org.onap.so.serviceinstancebeans.Project
-import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.rest.catalog.beans.Vnf
 import org.onap.so.serviceinstancebeans.RequestDetails
 import org.onap.so.serviceinstancebeans.RequestInfo
 import org.onap.so.serviceinstancebeans.RequestParameters
 import org.onap.so.serviceinstancebeans.SubscriberInfo
-import org.onap.aai.domain.yang.GenericVnf
-import org.onap.aai.domain.yang.RelatedToProperty
-import org.onap.aai.domain.yang.Relationship
-import org.onap.aai.domain.yang.RelationshipData
-import org.onap.aai.domain.yang.RelationshipList
-import org.onap.aai.domain.yang.ServiceInstance
-import org.onap.aai.domain.yang.v19.SliceProfile
-import org.onap.aai.domain.yang.v19.SliceProfiles
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.onap.so.client.HttpClient
-import org.onap.so.client.HttpClientFactory
-import org.onap.so.db.request.beans.OperationStatus
-import org.onap.so.db.request.beans.ResourceOperationStatus
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import com.fasterxml.jackson.databind.ObjectMapper
 
-import javax.ws.rs.NotFoundException
-import javax.ws.rs.core.Response
-
 class DoActivateCoreNSSI extends AbstractServiceTaskProcessor {
     String Prefix="DACTCNSSI_"
     private static final Logger logger = LoggerFactory.getLogger(DoActivateCoreNSSI.class);
@@ -117,7 +110,7 @@
         //NSSI Id as service Instance Id to get from Request
         String serviceInstanceId = execution.getVariable("serviceInstanceID")
         String errorMsg = "query Network Service Instance from AAI failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> nsi = wrapper.asBean(ServiceInstance.class)
         String networkServiceInstanceName = ""
         String networkServiceInstanceId =""
@@ -156,7 +149,7 @@
                         String errorSliceProfileMsg = "Slice Profile Service Instance was not found in aai"
 
                         //Query Slice Profile Service Instance From AAI by sliceProfileServiceInstanceId
-                        AAIResultWrapper sliceProfileInstanceWrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, sliceProfileServiceInstanceId, errorSliceProfileMsg)
+                        AAIResultWrapper sliceProfileInstanceWrapper = queryAAI(execution, Types.SERVICE_INSTANCE, sliceProfileServiceInstanceId, errorSliceProfileMsg)
                         Optional<ServiceInstance> sliceProfileServiceInstance = sliceProfileInstanceWrapper.asBean(ServiceInstance.class)
                         if (sliceProfileServiceInstance.isPresent()) {
                             String orchestrationStatus= sliceProfileServiceInstance.get().getOrchestrationStatus()
@@ -205,7 +198,7 @@
         String serviceInstanceId = execution.getVariable("networkServiceInstanceId")
         logger.debug("**** serviceInstanceId :: getServiceInstanceRelationships  :: "+serviceInstanceId)
         String errorMsg = "query Network Service Instance from AAI failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
 
         String networkServiceModelInvariantUuid = si.get().getModelInvariantId()
@@ -251,7 +244,7 @@
         logger.debug(Prefix +" **** Enter DoActivateCoreNSSI ::: getVnfRelationships ****")
         String msg = "query Generic Vnf from AAI failed"
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, execution.getVariable('vnfId'))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(execution.getVariable('vnfId')))
             if (!getAAIClient().exists(uri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
             }
@@ -313,13 +306,13 @@
      * @param instanceId
      * @return AAIResultWrapper
      */
-    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg) {
+    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectName aaiObjectName, String instanceId, String errorMsg) {
         logger.debug(Prefix +" **** Enter DoActivateCoreNSSI ::: queryAAI ****")
 
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(instanceId))
         if (!getAAIClient().exists(resourceUri)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
         }
@@ -615,8 +608,7 @@
         String sliceProfileInstanceId = si.getServiceInstanceId()
         si.setOrchestrationStatus(oStatus)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalCustId, serviceType, sliceProfileInstanceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(sliceProfileInstanceId))
         try {
 
             Response response = getAAIClient().update(uri, si)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
index 04fe161..0900863 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
@@ -29,6 +29,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
@@ -37,6 +39,7 @@
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
+
 public class DoActivateTnNssi extends AbstractServiceTaskProcessor {
     String Prefix = "TNACT_"
 
@@ -124,7 +127,7 @@
             ServiceInstance si = new ServiceInstance()
             si.setOrchestrationStatus(orchStatus)
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, tnNssiId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(tnNssiId))
             client.update(uri, si)
         } catch (BpmnError e) {
             throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
index 3df0d3d..fc14da3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
@@ -47,6 +47,8 @@
 import org.onap.so.bpmn.core.domain.ServiceInstance
 import org.onap.so.bpmn.core.domain.ServiceProxy
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.aai.AAINamespaceConstants
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aai.domain.yang.NetworkPolicy
@@ -549,7 +551,7 @@
 		try {
 	
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), execution.getVariable("RANServiceInstanceId"))
+			AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("RANServiceInstanceId")))
 			client.create(nssiServiceUri, ANServiceInstance)
 	
 		} catch (BpmnError e) {
@@ -630,10 +632,10 @@
 		try {
 	
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), execution.getVariable("RANServiceInstanceId"))
+			AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("RANServiceInstanceId")))
 			client.create(nssiServiceUri, ANServiceInstance)
 	
-			AAIResourceUri nssiServiceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), execution.getVariable("RANNFServiceInstanceId"))
+			AAIResourceUri nssiServiceUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("RANNFServiceInstanceId")))
 			client.create(nssiServiceUri1, ANNFServiceInstance)
 	
 		} catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreNonSharedSlice.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreNonSharedSlice.groovy
index 2a31997..b5e1e6b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreNonSharedSlice.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreNonSharedSlice.groovy
@@ -54,6 +54,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.domain.ServiceProxy
 import org.onap.so.bpmn.core.json.JsonUtils
@@ -125,7 +127,7 @@
             si.setEnvironmentContext(environmentContext)
             si.setWorkloadContext(workloadContext)
             logger.debug("AAI service Instance Request Payload : "+si.toString())
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), serviceType, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
             Response response = getAAIClient().create(uri, si)
             if(response.getStatus()!=200) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, response.getStatus(), "AAI instance creation failed")
@@ -353,8 +355,7 @@
             ServiceInstance si = execution.getVariable("nssiServiceInstance")
             si.setOrchestrationStatus("activated")
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalCustId, serviceType, networkServiceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(networkServiceInstanceId))
             try {
                 getAAIClient().update(uri, si)
             } catch (Exception e) {
@@ -364,10 +365,10 @@
             }
 
             //URI for NSSI
-            AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId);
+            AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId));
 
             //URI for Network Service Instance
-            AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, networkServiceInstanceId)
+            AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(networkServiceInstanceId))
 
             // Update Relationship in AAI
             Response response = getAAIClient().connect(nssiUri, networkServiceInstanceUri, AAIEdgeLabel.COMPOSED_OF);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSlice.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSlice.groovy
index 6367341..5ecfc9a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSlice.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSlice.groovy
@@ -20,15 +20,32 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONObject
+import org.onap.aai.domain.yang.GenericVnf
+import org.onap.aai.domain.yang.RelatedToProperty
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.RelationshipData
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aaiclient.client.aai.AAIObjectName
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.CatalogDbUtils
 import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.HttpClient
+import org.onap.so.db.request.beans.ResourceOperationStatus
 import org.onap.so.serviceinstancebeans.CloudConfiguration
 import org.onap.so.serviceinstancebeans.LineOfBusiness
 import org.onap.so.serviceinstancebeans.ModelInfo
@@ -36,36 +53,14 @@
 import org.onap.so.serviceinstancebeans.OwningEntity
 import org.onap.so.serviceinstancebeans.Platform
 import org.onap.so.serviceinstancebeans.Project
-import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.rest.catalog.beans.Vnf
 import org.onap.so.serviceinstancebeans.RequestDetails
 import org.onap.so.serviceinstancebeans.RequestInfo
 import org.onap.so.serviceinstancebeans.RequestParameters
 import org.onap.so.serviceinstancebeans.SubscriberInfo
-import org.onap.aai.domain.yang.GenericVnf
-import org.onap.aai.domain.yang.RelatedToProperty
-import org.onap.aai.domain.yang.Relationship
-import org.onap.aai.domain.yang.RelationshipData
-import org.onap.aai.domain.yang.RelationshipList
-import org.onap.aai.domain.yang.ServiceInstance
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.onap.so.client.HttpClient
-import org.onap.so.client.HttpClientFactory
-import org.onap.so.db.request.beans.OperationStatus
-import org.onap.so.db.request.beans.ResourceOperationStatus
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import com.fasterxml.jackson.databind.ObjectMapper
 
-import static org.apache.commons.lang3.StringUtils.isBlank
-
-import javax.ws.rs.NotFoundException
-import javax.ws.rs.core.Response
 
 class DoAllocateCoreSharedSlice extends AbstractServiceTaskProcessor {
 
@@ -123,7 +118,7 @@
         String serviceInstanceId = execution.getVariable("serviceInstanceID")
 
         String errorMsg = "query Network Service Instance from AAI failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> nsi = wrapper.asBean(ServiceInstance.class)
 
         String networkServiceInstanceName = ""
@@ -163,7 +158,7 @@
                         String errorSliceProfileMsg = "Slice Profile Service Instance was not found in aai"
 
                         //Query Slice Profile Service Instance From AAI by sliceProfileServiceInstanceId
-                        AAIResultWrapper sliceProfileInstanceWrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, sliceProfileServiceInstanceId, errorSliceProfileMsg)
+                        AAIResultWrapper sliceProfileInstanceWrapper = queryAAI(execution, Types.SERVICE_INSTANCE, sliceProfileServiceInstanceId, errorSliceProfileMsg)
                         Optional<ServiceInstance> sliceProfileServiceInstance = sliceProfileInstanceWrapper.asBean(ServiceInstance.class)
                         if (sliceProfileServiceInstance.isPresent()) {
                             String orchestrationStatus= sliceProfileServiceInstance.get().getOrchestrationStatus()
@@ -204,7 +199,7 @@
         String serviceInstanceId = execution.getVariable("networkServiceInstanceId")
 
         String errorMsg = "query Network Service Instance from AAI failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
 
         String networkServiceModelInvariantUuid = si.get().getModelInvariantId()
@@ -256,7 +251,7 @@
         logger.debug(Prefix+" **** Enter DoAllocateCoreSharedSlice ::: getVnfRelationships ****")
         String msg = "query Generic Vnf from AAI failed"
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, execution.getVariable('vnfId'))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(execution.getVariable('vnfId')))
             if (!getAAIClient().exists(uri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
             }
@@ -313,15 +308,15 @@
     /**
      * query AAI
      * @param execution
-     * @param aaiObjectType
+     * @param aaiObjectName
      * @param instanceId
      * @return AAIResultWrapper
      */
-    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg) {
+    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectName aaiObjectName, String instanceId, String errorMsg) {
         logger.debug(Prefix+" **** Enter DoAllocateCoreSharedSlice ::: queryAAI ****")
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(instanceId))
         if (!getAAIClient().exists(resourceUri)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
         }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
index c4068d2..c497fc4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
@@ -20,16 +20,18 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.Relationship
 import org.onap.aai.domain.yang.ServiceInstance
 import org.onap.aai.domain.yang.SliceProfile
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
 import org.onap.so.beans.nsmf.AllocateAnNssi
 import org.onap.so.beans.nsmf.AllocateCnNssi
 import org.onap.so.beans.nsmf.AllocateTnNssi
@@ -43,17 +45,12 @@
 import org.onap.so.beans.nsmf.SliceTaskInfo
 import org.onap.so.beans.nsmf.SliceTaskParamsAdapter
 import org.onap.so.beans.nsmf.TnSliceProfile
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.NotFoundException
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
-class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
+class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor{
 
     private static final Logger logger = LoggerFactory.getLogger(DoAllocateNSIandNSSI.class);
 
@@ -146,10 +143,7 @@
         String msg
         try {
 
-            AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    sliceInstanceId)
+            AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sliceInstanceId))
             client.create(nsiServiceUri, nsi)
 
             execution.setVariable("nsiServiceUri", nsiServiceUri)
@@ -179,12 +173,7 @@
         AAIResourceUri nsiServiceUri = execution.getVariable("nsiServiceUri") as AAIResourceUri
         logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri)
 
-        AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(
-                AAIObjectType.ALLOTTED_RESOURCE,
-                execution.getVariable("globalSubscriberId"),
-                execution.getVariable("subscriptionServiceType"),
-                sliceParams.suggestNsiId,
-                allottedResourceId)
+        AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sliceParams.suggestNsiId).allottedResource(allottedResourceId))
 
         client.connect(allottedResourceUri, nsiServiceUri)
     }
@@ -205,10 +194,7 @@
         String nsiServiceInstanceID = sliceParams.getSuggestNsiId()
         //sliceParams.setServiceId(nsiServiceInstanceID)
 
-        AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                execution.getVariable("globalSubscriberId"),
-                execution.getVariable("subscriptionServiceType"),
-                nsiServiceInstanceID)
+        AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(nsiServiceInstanceID))
 
         try {
             AAIResultWrapper wrapper = client.get(nsiServiceUri, NotFoundException.class)
@@ -220,12 +206,7 @@
                 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
             }
 
-            AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(
-                    AAIObjectType.ALLOTTED_RESOURCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    sliceParams.suggestNsiId, //nsiId
-                    allottedResourceId)
+            AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sliceParams.suggestNsiId).allottedResource(allottedResourceId))
 
             client.connect(allottedResourceUri, nsiServiceUri)
 
@@ -277,10 +258,7 @@
 
         execution.setVariable("communicationServiceInstance", rspi)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                serviceInstanceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
         client.create(uri, rspi)
 
         execution.setVariable("sliceTaskParams", sliceParams)
@@ -308,11 +286,11 @@
         sliceProfile.setProfileId(profileId)
         sliceProfile.setCoverageAreaTAList(anSliceProfile.coverageAreaTAList as String)
         //todo:...
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                sliceTaskInfo.sliceInstanceId,
-                profileId
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.business().customer(globalSubscriberId)
+            .serviceSubscription(subscriptionServiceType)
+            .serviceInstance(sliceTaskInfo.sliceInstanceId)
+            .sliceProfile(profileId)
         )
         client.create(uri, sliceProfile)
         execution.setVariable("sliceTaskParams", sliceParams)
@@ -400,10 +378,7 @@
 
         execution.setVariable("communicationServiceInstance", rspi)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                serviceInstanceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
         client.create(uri, rspi)
         execution.setVariable("sliceTaskParams", sliceParams)
     }
@@ -431,12 +406,7 @@
         sliceProfile.setProfileId(profileId)
         sliceProfile.setCoverageAreaTAList(cnSliceProfile.coverageAreaTAList as String)
         //todo:...
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                sliceTaskInfo.sliceInstanceId,
-                profileId
-        )
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(sliceTaskInfo.sliceInstanceId).sliceProfile(profileId))
         client.create(uri, sliceProfile)
         execution.setVariable("sliceTaskParams", sliceParams)
     }
@@ -524,10 +494,7 @@
 
         execution.setVariable("communicationServiceInstance", rspi)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                serviceInstanceId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
         client.create(uri, rspi)
 
         execution.setVariable("sliceTaskParams", sliceParams)
@@ -554,12 +521,7 @@
         SliceProfile sliceProfile = new SliceProfile()
         sliceProfile.setProfileId(profileId)
         //todo:...
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE,
-                globalSubscriberId,
-                subscriptionServiceType,
-                sliceTaskInfo.sliceInstanceId,
-                profileId
-        )
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(sliceTaskInfo.sliceInstanceId).sliceProfile(profileId))
         client.create(uri, sliceProfile)
 
         execution.setVariable("sliceTaskParams", sliceParams)
@@ -706,20 +668,14 @@
         //relation ship
         Relationship relationship = new Relationship()
 
-        AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                execution.getVariable("globalSubscriberId"),
-                execution.getVariable("subscriptionServiceType"),
-                targetId)
+        AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(targetId))
 
         logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri)
 
         relationship.setRelatedLink(nsiServiceUri.build().toString())
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                execution.getVariable("globalSubscriberId"),
-                execution.getVariable("subscriptionServiceType"),
-                sourceId).relationshipAPI()
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sourceId).relationshipAPI())
         client.create(uri, relationship)
     }
 
-}
\ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
index 9aa044a..35f7257 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy
@@ -14,6 +14,13 @@
 import org.onap.so.bpmn.core.domain.ModelInfo
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.springframework.http.ResponseEntity
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy
index 00746d4..e225c36 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy
@@ -36,6 +36,8 @@
 import org.onap.aaiclient.client.aai.entities.Relationships
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -103,7 +105,7 @@
 
         String nssiId = currentNSSI['nssiId']
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
         Optional<ServiceInstance> nssiOpt = client.get(ServiceInstance.class, nssiUri)
 
         if (nssiOpt.isPresent()) {
@@ -139,7 +141,7 @@
         Optional<Relationships> relationships = wrapper.getRelationships()
 
         if (relationships.isPresent()) {
-            for (AAIResourceUri networkServiceInstanceUri : relationships.get().getRelatedAAIUris(AAIObjectType.SERVICE_INSTANCE)) {
+            for (AAIResourceUri networkServiceInstanceUri : relationships.get().getRelatedUris(Types.SERVICE_INSTANCE)) {
                 Optional<ServiceInstance> networkServiceInstanceOpt = client.get(ServiceInstance.class, networkServiceInstanceUri)
                 if (networkServiceInstanceOpt.isPresent()) {
                     networkServiceInstance = networkServiceInstanceOpt.get()
@@ -187,7 +189,7 @@
         AAIResultWrapper wrapper = client.get(networkServiceInstanceUri);
         Optional<Relationships> relationships = wrapper.getRelationships()
         if (relationships.isPresent()) {
-            for (AAIResourceUri constituteVnfUri : relationships.get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)) {
+            for (AAIResourceUri constituteVnfUri : relationships.get().getRelatedUris(Types.GENERIC_VNF)) {
                 currentNSSI['constituteVnfUri'] = constituteVnfUri
                 Optional<GenericVnf> constituteVnfOpt = client.get(GenericVnf.class, constituteVnfUri)
                 if(constituteVnfOpt.isPresent()) {
@@ -407,7 +409,7 @@
 
         AAIResourcesClient client = getAAIClient()
 
-        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, networkServiceInstance.getModelInvariantId(), networkServiceInstance.getModelVersionId())
+        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(networkServiceInstance.getModelInvariantId()).modelVer(networkServiceInstance.getModelVersionId()))
         Optional<ModelVer> modelVerOpt = client.get(ModelVer.class, modelVerUrl)
 
         if (modelVerOpt.isPresent()) {
@@ -445,7 +447,7 @@
         AAIResultWrapper wrapper = client.get(networkServiceInstanceUri)
         Optional<Relationships> serviceSubscriptionRelationshipsOps = wrapper.getRelationships()
         if(serviceSubscriptionRelationshipsOps.isPresent()) {
-            List<AAIResourceUri> serviceSubscriptionRelatedAAIUris = serviceSubscriptionRelationshipsOps.get().getRelatedAAIUris(AAIObjectType.SERVICE_SUBSCRIPTION)
+            List<AAIResourceUri> serviceSubscriptionRelatedAAIUris = serviceSubscriptionRelationshipsOps.get().getRelatedUris(Types.SERVICE_SUBSCRIPTION)
             if(!(serviceSubscriptionRelatedAAIUris == null || serviceSubscriptionRelatedAAIUris.isEmpty())) {
                 AAIResourceUri serviceSubscriptionUri = serviceSubscriptionRelatedAAIUris.get(0) // Many-To-One relation
                 Optional<ServiceSubscription> serviceSubscriptionOpt = client.get(ServiceSubscription.class, serviceSubscriptionUri)
@@ -457,7 +459,7 @@
                 wrapper = client.get(serviceSubscriptionUri)
                 Optional<Relationships> customerRelationshipsOps = wrapper.getRelationships()
                 if(customerRelationshipsOps.isPresent()) {
-                    List<AAIResourceUri> customerRelatedAAIUris = customerRelationshipsOps.get().getRelatedAAIUris(AAIObjectType.CUSTOMER)
+                    List<AAIResourceUri> customerRelatedAAIUris = customerRelationshipsOps.get().getRelatedUris(Types.CUSTOMER)
                     if(!(customerRelatedAAIUris == null || customerRelatedAAIUris.isEmpty())) {
                         Optional<Customer> customerOpt = client.get(Customer.class, customerRelatedAAIUris.get(0)) // Many-To-One relation
                         if(customerOpt.isPresent()) {
@@ -532,7 +534,7 @@
         Optional<Relationships> cloudRegionRelationshipsOps = wrapper.getRelationships()
 
         if(cloudRegionRelationshipsOps.isPresent()) {
-            List<AAIResourceUri> cloudRegionRelatedAAIUris = cloudRegionRelationshipsOps.get().getRelatedAAIUris(AAIObjectType.CLOUD_REGION)
+            List<AAIResourceUri> cloudRegionRelatedAAIUris = cloudRegionRelationshipsOps.get().getRelatedUris(Types.CLOUD_REGION)
             if (!(cloudRegionRelatedAAIUris == null || cloudRegionRelatedAAIUris.isEmpty())) {
                 AAIResourceUri cloudRegionRelatedAAIUri = cloudRegionRelatedAAIUris.get(0)
                 currentNSSI['cloudRegionRelatedAAIUri'] = cloudRegionRelatedAAIUri
@@ -574,7 +576,7 @@
             vfModuleModelInfo.setModelInvariantUuid(vfModule.getModelInvariantId())
             vfModuleModelInfo.setModelCustomizationId(vfModule.getModelCustomizationId())
 
-            AAIResourceUri vfModuleUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, vfModule.getModelInvariantId(), vfModule.getModelVersionId())
+            AAIResourceUri vfModuleUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(vfModule.getModelInvariantId()).modelVer(vfModule.getModelVersionId()))
 
             Optional<ModelVer> vfModuleModelVerOpt = client.get(ModelVer.class, vfModuleUrl)
 
@@ -609,7 +611,7 @@
         vnfModelInfo.setModelCustomizationId(constituteVnf.getModelCustomizationId())
         vnfModelInfo.setModelInstanceName(constituteVnf.getVnfName())
 
-        AAIResourceUri vnfModelUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, constituteVnf.getModelInvariantId(), constituteVnf.getModelVersionId())
+        AAIResourceUri vnfModelUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(constituteVnf.getModelInvariantId()).modelVer(constituteVnf.getModelVersionId()))
 
         Optional<ModelVer> vnfModelVerOpt = client.get(ModelVer.class, vnfModelUrl)
 
@@ -779,7 +781,7 @@
         AAIResultWrapper wrapper = client.get(networkServiceInstanceUri)
         Optional<Relationships> owningEntityRelationshipsOps = wrapper.getRelationships()
         if (owningEntityRelationshipsOps.isPresent()) {
-            List<AAIResourceUri> owningEntityRelatedAAIUris = owningEntityRelationshipsOps.get().getRelatedAAIUris(AAIObjectType.OWNING_ENTITY)
+            List<AAIResourceUri> owningEntityRelatedAAIUris = owningEntityRelationshipsOps.get().getRelatedUris(Types.OWNING_ENTITY)
 
             if (!(owningEntityRelatedAAIUris == null || owningEntityRelatedAAIUris.isEmpty())) {
                 Optional<org.onap.aai.domain.yang.OwningEntity> owningEntityOpt = client.get(org.onap.aai.domain.yang.OwningEntity.class, owningEntityRelatedAAIUris.get(0)) // Many-To-One relation
@@ -813,7 +815,7 @@
             AAIResultWrapper wrapper = client.get(cloudRegionRelatedAAIUri)
             Optional<Relationships> cloudRegionOps = wrapper.getRelationships()
             if (cloudRegionOps.isPresent()) {
-                List<AAIResourceUri> projectAAIUris = cloudRegionOps.get().getRelatedAAIUris(AAIObjectType.PROJECT)
+                List<AAIResourceUri> projectAAIUris = cloudRegionOps.get().getRelatedUris(Types.PROJECT)
                 if (!(projectAAIUris == null || projectAAIUris.isEmpty())) {
                     Optional<org.onap.aai.domain.yang.Project> projectOpt = client.get(org.onap.aai.domain.yang.Project.class, projectAAIUris.get(0))
                     if (projectOpt.isPresent()) {
@@ -928,7 +930,7 @@
         ServiceInstance nssi = (ServiceInstance)currentNSSI['nssi']
 
         String nssiId = currentNSSI['nssiId']
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
 
         List<SliceProfile> associatedProfiles = nssi.getSliceProfiles().getSliceProfile()
 
@@ -964,7 +966,7 @@
         String nssiId = currentNSSI['nssiId']
 
         // global-customer-id, service-type, service-instance-id, profile-id
-        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiId, sliceProfileContainsSNSSAI.getProfileId())
+        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiId).sliceProfile(sliceProfileContainsSNSSAI.getProfileId()))
 
         try {
             getAAIClient().delete(sliceProfileUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
index 8cd9dee..47e059c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
@@ -42,6 +42,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -142,7 +144,7 @@
 			String serviceType = execution.getVariable('serviceType')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
 
 			Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateCommunicationService.groovy
index 7cdb084..9f2ad5b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateCommunicationService.groovy
@@ -31,6 +31,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -123,12 +125,7 @@
 
             execution.setVariable("communicationServiceInstanceProfile", csp)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_SERVICE_PROFILE,
-                    globalSubscriberId,
-                    subscriptionServiceType,
-                    serviceInstanceId,
-                    profileId
-            )
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId).communicationServiceProfile(profileId))
             client.create(uri, csp)
 
 
@@ -188,7 +185,7 @@
 
             execution.setVariable("communicationServiceInstance", csi)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
             client.create(uri, csi)
 
         } catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index b90a34e..d1e61ac 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -22,40 +22,36 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.fasterxml.jackson.databind.ObjectMapper
-import com.fasterxml.jackson.databind.SerializationFeature
-
-import org.onap.so.logger.LoggingAnchor
-import org.onap.logging.filter.base.ErrorCode
-
 import static org.apache.commons.lang3.StringUtils.*
-
 import javax.ws.rs.NotFoundException
-
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.Relationship
 import org.onap.aai.domain.yang.ServiceInstance
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.core.domain.Resource
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
+import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-
 import org.springframework.web.util.UriUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
+import com.fasterxml.jackson.databind.ObjectMapper
+import com.fasterxml.jackson.databind.SerializationFeature
 
 /**
  * This groovy class supports the <class>DoCreateServiceInstance.bpmn</class> process.
@@ -272,7 +268,7 @@
 			org.onap.aai.domain.yang.ServiceInstance si = execution.getVariable("serviceInstanceData")
 
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(serviceInstanceId))
 			client.create(uri, si)
 
 		} catch (BpmnError e) {
@@ -345,7 +341,7 @@
 		try {
 			String serviceInstanceId = execution.getVariable("serviceInstanceId")
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), serviceInstanceId).relationshipAPI()
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(serviceInstanceId)).relationshipAPI()
 			client.create(uri, relationship)
 
 		} catch (BpmnError e) {
@@ -402,7 +398,7 @@
 			String serviceType = execution.getVariable('subscriptionServiceType')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
 
 			Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
index 3638d89..bb6697b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
@@ -40,6 +40,8 @@
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 
@@ -190,7 +192,7 @@
 			String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient();
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			resourceClient.delete(serviceInstanceUri)
 
 			logger.trace("Completed Delete Service Instance")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
index 22e5819..cc142ca 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -33,7 +33,6 @@
 import org.onap.aai.domain.yang.RouteTarget
 import org.onap.aai.domain.yang.Subnet
 import org.onap.aai.domain.yang.VpnBinding
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
@@ -42,6 +41,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -335,7 +335,7 @@
             String serviceInstanceId = execution.getVariable('CRENWKI_serviceInstanceId')
 
             AAIResourcesClient resourceClient = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
             if(!resourceClient.exists(uri)){
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
@@ -367,7 +367,7 @@
             String networkName   = utils.getNodeText(networkInputs, "network-name")
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName)
+            AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks()).queryParam("network-name", networkName)
             L3Networks networks = client.get(uri, NotFoundException.class).asBean(L3Networks.class).get()
             L3Network network = networks.getL3Network().get(0)
 
@@ -405,7 +405,7 @@
             // Prepare AA&I url
             AaiUtil aaiUtil = new AaiUtil(this)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
             def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
             execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
@@ -478,7 +478,7 @@
             execution.setVariable(Prefix + "networkName", networkName)
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ONE)
             L3Network network = client.get(uri, NotFoundException.class).asBean(L3Network.class).get()
 
             execution.setVariable(Prefix + "queryIdAAIResponse", network)
@@ -514,7 +514,7 @@
             String netId = networkId
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ONE)
             L3Network network = client.get(uri, NotFoundException.class).asBean(L3Network.class).get()
 
             execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
@@ -553,10 +553,10 @@
         try {
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, execution.getVariable(Prefix + "networkId"))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(execution.getVariable(Prefix + "networkId")))
             Optional<Relationships> relationships = client.get(uri, NotFoundException.class).getRelationships()
             if(relationships.isPresent()){
-                List<AAIResourceUri> uris = relationships.get().getRelatedAAIUris(AAIObjectType.VPN_BINDING)
+                List<AAIResourceUri> uris = relationships.get().getRelatedUris(Types.VPN_BINDING)
 
                 logger.debug(Prefix + "vpnCount - " + uris.size())
 
@@ -625,10 +625,10 @@
 
         try {
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, execution.getVariable(Prefix + "networkId"))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(execution.getVariable(Prefix + "networkId")))
             Optional<Relationships> relationships = client.get(uri, NotFoundException.class).getRelationships()
             if(relationships.isPresent()){
-                List<AAIResourceUri> uris = relationships.get().getRelatedAAIUris(AAIObjectType.NETWORK_POLICY)
+                List<AAIResourceUri> uris = relationships.get().getRelatedUris(Types.NETWORK_POLICY)
 
                 execution.setVariable(Prefix + "networkPolicyCount", uris.size())
                 logger.debug(Prefix + "networkPolicyCount - " + uris.size())
@@ -692,10 +692,10 @@
         try {
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, execution.getVariable(Prefix + "networkId"))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(execution.getVariable(Prefix + "networkId")))
             Optional<Relationships> relationships = client.get(uri, NotFoundException.class).getRelationships()
             if(relationships.isPresent()){
-                List<AAIResourceUri> uris = relationships.get().getRelatedAAIUris(AAIObjectType.ROUTE_TABLE_REFERENCE)
+                List<AAIResourceUri> uris = relationships.get().getRelatedUris(Types.ROUTE_TABLE_REFERENCE)
 
                 execution.setVariable(Prefix + "networkTableRefCount", uris.size())
                 logger.debug(Prefix + "networkTableRefCount - " + uris.size())
@@ -791,7 +791,7 @@
             logger.debug("Updating l3-network in AAI" )
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId))
             client.update(uri, l3Network)
 
             if(requeryIdAAIResponse.getSubnets() != null){
@@ -807,7 +807,7 @@
                     }
 
                     logger.debug("Updating subnet in AAI" )
-                    AAIResourceUri subUri = AAIUriFactory.createResourceUri(AAIObjectType.SUBNET, networkId, subnetId)
+                    AAIResourceUri subUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId).subnet(subnetId))
                     client.update(subUri, subnet)
 
                 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
index fce12e5..94aca5f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -44,6 +44,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -291,7 +293,7 @@
 			String globalCustomerId = execution.getVariable("globalSubscriberId") //VID to AAI name map
 			logger.debug(" ***** getAAICustomerById ***** globalCustomerId:" + globalCustomerId)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, globalCustomerId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId))
 			if(!getAAIClient().exists(uri)){
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "GlobalCustomerId:" + globalCustomerId + " not found (404) in AAI")
 			}
@@ -352,7 +354,7 @@
 			si.setWorkloadContext(workloadContext)
 
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(serviceInstanceId))
 			client.create(uri, si)
 
 		} catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
index 181e9d0..f64f5e8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy
@@ -20,22 +20,22 @@
 package org.onap.so.bpmn.infrastructure.scripts
 
 
-import org.onap.aai.domain.yang.AllottedResource
-import org.onap.aai.domain.yang.ServiceInstance
-import org.onap.so.beans.nsmf.SliceTaskParamsAdapter
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.aai.domain.yang.ServiceProfile
+import org.onap.aai.domain.yang.AllottedResource
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aai.domain.yang.ServiceProfile;
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.so.beans.nsmf.SliceTaskParamsAdapter
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.domain.ModelInfo
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
@@ -121,10 +121,7 @@
             ss.setEnvironmentContext(snssai)
             ss.setServiceRole(serviceRole)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    ssInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(ssInstanceId))
             client.create(uri, ss)
         } catch (BpmnError e) {
             throw e
@@ -188,11 +185,11 @@
         serviceProfile.setTrafficDensity(0)
         serviceProfile.setConnDensity(0)
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    serviceProfileInstanceId,
-                    serviceProfileId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId"))
+                .serviceSubscription(execution.getVariable("subscriptionServiceType"))
+                .serviceInstance(serviceProfileInstanceId)
+                .serviceProfile(serviceProfileId))
             client.create(uri, serviceProfile)
             execution.setVariable("sliceTaskParams", sliceParams)
 
@@ -221,11 +218,7 @@
             for(org.onap.so.bpmn.core.domain.AllottedResource allottedResource : allottedResourceList) {
                 String allottedResourceId = UUID.randomUUID().toString()
 
-                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE,
-                        execution.getVariable("globalSubscriberId"),
-                        execution.getVariable("subscriptionServiceType"),
-                        execution.getVariable("serviceInstanceId"),
-                        allottedResourceId)
+                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("serviceInstanceId")).allottedResource(allottedResourceId))
 
                 execution.setVariable("allottedResourceUri", allottedResourceUri)
                 String arType = allottedResource.getAllottedResourceType()
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
index 5cde856..161b920 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
@@ -42,7 +42,15 @@
 import org.onap.so.bpmn.core.domain.ModelInfo
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.json.JsonUtils
-
+import org.onap.so.client.HttpClient
+import org.onap.so.client.HttpClientFactory
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.springframework.http.ResponseEntity
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
index 534467f..0f1bf0d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
@@ -27,6 +27,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.core.json.JsonUtils
@@ -81,9 +83,7 @@
         sliceProfile.setReliability(new Object())
         try {
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, execution.getVariable
-                    ("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"), sliceserviceInstanceId, sliceProfileId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sliceserviceInstanceId).sliceProfile(sliceProfileId))
             client.create(uri, sliceProfile)
 
         } catch (BpmnError e) {
@@ -120,7 +120,7 @@
             ss.setEnvironmentContext(snssai)
             ss.setServiceRole(serviceRole)
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), ssInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(ssInstanceId))
             client.create(uri, ss)
         } catch (BpmnError e) {
             throw e
@@ -136,16 +136,14 @@
         String serviceInstanceId = execution.getVariable('sliceServiceInstanceId')
 
         AAIResourcesClient resourceClient = getAAIClient()
-        AAIResourceUri ssServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+        AAIResourceUri ssServiceuri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
         try {
             List<String> networkStrList = jsonUtil.StringArrayToList(execution.getVariable("transportSliceNetworks"))
 
             for (String networkStr : networkStrList) {
                 String allottedResourceId = UUID.randomUUID().toString()
-                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE,
-                        execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"),
-                        execution.getVariable("sliceserviceInstanceId"), allottedResourceId)
+                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("sliceserviceInstanceId")).allottedResource(allottedResourceId))
                 execution.setVariable("allottedResourceUri", allottedResourceUri)
                 String modelInvariantId = execution.getVariable("modelInvariantUuid")
                 String modelVersionId = execution.getVariable("modelUuid")
@@ -157,7 +155,7 @@
                 resource.setModelInvariantId(modelInvariantId)
                 resource.setModelVersionId(modelVersionId)
                 getAAIClient().create(allottedResourceUri, resource)
-                //AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath(ssServiceuri).build())
+                //AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath(ssServiceuri).build())
                 //getAAIClient().connect(allottedResourceUri,ssServiceuri)
                 //execution.setVariable("aaiARPath", allottedResourceUri.build().toString());
 
@@ -191,7 +189,7 @@
                 resource.setModelInvariantId(modelInvariantId)
                 resource.setModelVersionId(modelVersionId)
 
-                AAIResourceUri logicalLinkUri = AAIUriFactory.createResourceUri(AAIObjectType.LOGICAL_LINK, logicalLinkId)
+                AAIResourceUri logicalLinkUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().logicalLink(logicalLinkId))
                 getAAIClient().create(logicalLinkUri, resource)
             }
         } catch (Exception ex) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
index d5469c8..8eded75 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
@@ -26,7 +26,9 @@
 import org.onap.so.client.HttpClientFactory
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -228,8 +230,8 @@
         String serviceType = execution.getVariable("serviceType")
         String serviceId = execution.getVariable("serviceId")
 
-        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,globalSubscriberId,serviceType,nsInstanceId)
-        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,globalSubscriberId,serviceType,serviceId)
+        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nsInstanceId))
+        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceId))
 
         try{
             getAAIClient().connect(nsUri,relatedServiceUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 366cdfd..f19d064 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -32,6 +32,14 @@
 import org.json.JSONObject
 import org.onap.aai.domain.yang.GenericVnf
 import org.onap.aai.domain.yang.NetworkPolicy
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.logging.filter.base.ONAPComponents;
 import org.onap.so.bpmn.common.scripts.AaiUtil
@@ -51,14 +59,6 @@
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.client.HttpClient
 import org.onap.so.client.HttpClientFactory
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.so.constants.Defaults
 import org.onap.so.db.catalog.beans.HomingInstance
 import org.onap.so.logger.LoggingAnchor
@@ -303,7 +303,7 @@
 				}
 
 				try{
-					AAIResourceUri serviceInstanceURI = AAIUriFactory.create(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,serviceType,serviceInstanceId)
+					AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 					AAIResourcesClient aaiRC = new AAIResourcesClient()
 					AAIResultWrapper aaiRW = aaiRC.get(serviceInstanceURI)
 					Map<String, Object> aaiJson = aaiRW.asMap()
@@ -690,7 +690,7 @@
 			def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
 
 			AaiUtil aaiUriUtil = new AaiUtil(this)
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
 			String endPoint = aaiUriUtil.createAaiUri(uri)
 
 			try {
@@ -774,7 +774,7 @@
 			def vfModuleName = execution.getVariable('DCVFM_vfModuleName')
 
 			AaiUtil aaiUriUtil = new AaiUtil(this)
-			AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, vnfId).queryParam("vf-module-name",vfModuleName)
+			AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModules()).queryParam("vf-module-name",vfModuleName)
 			String endPoint = aaiUriUtil.createAaiUri(uri)
 
 			HttpClient client = httpClientFactory.newXmlClient(new URL(endPoint), ONAPComponents.AAI)
@@ -909,7 +909,7 @@
 			String serviceOperation = ""
 			if (element.equals("vnf")) {
 				AAIResourcesClient resourceClient = new AAIResourcesClient()
-				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, execution.getVariable('DCVFM_vnfId'))
+				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(execution.getVariable('DCVFM_vnfId')))
 				AAIResultWrapper wrapper = resourceClient.get(uri)
 
 				Optional<GenericVnf> vnf = wrapper.asBean(GenericVnf.class)
@@ -1792,7 +1792,7 @@
 			// Prepare AA&I url
 			AaiUtil aaiUtil = new AaiUtil(this)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
 			def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
 			execution.setVariable("DCVFM_queryCloudRegionRequest", queryCloudRegionRequest)
@@ -1923,7 +1923,7 @@
 					String fqdn = fqdnList[i]
 
 					// Query AAI for this network policy FQDN
-					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
 					uri.queryParam("network-policy-fqdn", fqdn)
 
 					AAIResourcesClient resourceClient = new AAIResourcesClient()
@@ -1944,8 +1944,8 @@
 						policy.setNetworkPolicyId(networkPolicyId)
 						policy.setNetworkPolicyFqdn(fqdn)
 						policy.setHeatStackId(execution.getVariable("DCVFM_heatStackId"))
-						
-						AAIResourceUri netUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId)
+
+						AAIResourceUri netUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicyId))
 						resourceClient.create(netUri, policy)
 
 						rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index b3c4698..4b495e3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -34,11 +34,12 @@
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
@@ -507,7 +508,7 @@
 
                     try {
                         // Query AAI for this network policy FQDN
-                        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+                        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
                         uri.queryParam("network-policy-fqdn", fqdn)
                         Optional<NetworkPolicies> networkPolicies = getAAIClient().get(NetworkPolicies.class, uri)
 
@@ -516,7 +517,7 @@
                             NetworkPolicy networkPolicy = networkPolicies.get().getNetworkPolicy().get(0)
 
                             try{
-                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicy.getNetworkPolicyId())
+                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicy.getNetworkPolicyId()))
                                 getAAIClient().delete(delUri)
                                 execution.setVariable(Prefix + "aaiDeleteNetworkPolicyReturnCode", 200)
                                 logger.debug("AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + 200)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
index 80f6e0e..0e153b7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
@@ -23,24 +23,24 @@
 package org.onap.so.bpmn.infrastructure.scripts
 
 
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.VolumeGroups
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.VidUtils
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.constants.Defaults
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.NotFoundException
-
 public class DoCreateVfModuleVolumeRollback extends AbstractServiceTaskProcessor {
     private static final Logger logger = LoggerFactory.getLogger( DoCreateVfModuleVolumeRollback.class);
 
@@ -133,7 +133,7 @@
 			volumeGroupName = testVolumeGroupName
 		}
 
-		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion).queryParam("volume-group-name", volumeGroupName)
+		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroups()).queryParam("volume-group-name", volumeGroupName)
 		try {
 			Optional<VolumeGroups> volumeGroups = getAAIClient().get(VolumeGroups.class, uri)
 			if (volumeGroups.isPresent()) {
@@ -154,7 +154,7 @@
 		String cloudRegion = execution.getVariable("DCVFMODVOLRBK_lcpCloudRegionId")
 		String volumeGroupId = callRESTQueryAAIVolGrpName(execution, cloudRegion)
 
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroup(volumeGroupId))
 		try {
 			getAAIClient().delete(uri)
 		}catch(NotFoundException ignored){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
index b1d909b..d65f144 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -28,6 +28,12 @@
 import org.onap.aai.domain.yang.GenericVnf
 import org.onap.aai.domain.yang.VolumeGroup
 import org.onap.aai.domain.yang.VolumeGroups
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -36,11 +42,6 @@
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.constants.Defaults
 import org.onap.so.db.catalog.beans.OrchestrationStatus
 import org.slf4j.Logger
@@ -148,7 +149,7 @@
             String serviceInstanceId = execution.getVariable('serviceInstanceId')
 
             AAIResourcesClient resourceClient = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
             if(!resourceClient.exists(uri)){
                 (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
@@ -174,7 +175,7 @@
 
         AaiUtil aaiUtil = new AaiUtil(this)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
         def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
         cloudRegion = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
@@ -215,7 +216,7 @@
         def cloudRegion = execution.getVariable('lcpCloudRegionId')
 
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion).queryParam("volume-group-name", volumeGroupName)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroups()).queryParam("volume-group-name", volumeGroupName)
             Optional<VolumeGroups> volumeGroups = getAAIClient().get(VolumeGroups.class,uri)
             if(volumeGroups.isPresent()){
                 VolumeGroup volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
@@ -292,9 +293,9 @@
 
         logger.debug("volumeGroupId to be used: " + volumeGroupId)
 
-        AAIResourceUri volumeGroupUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwner, cloudRegion, volumeGroupId)
-        AAIResourceUri tenantUri = AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId)
-        AAIResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+        AAIResourceUri volumeGroupUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).volumeGroup(volumeGroupId))
+        AAIResourceUri tenantUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId))
+        AAIResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
         try {
             getAAIClient().create(volumeGroupUri, volumeGroup)
             getAAIClient().connect(volumeGroupUri, vnfUri)
@@ -504,7 +505,7 @@
         String cloudOwner = execution.getVariable('cloudOwner')
         String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
         def heatStackID = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwner, cloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).volumeGroup(volumeGroupId))
 
         execution.setVariable(prefix+"heatStackId", heatStackID)
 
@@ -534,7 +535,7 @@
     public void callRESTQueryAAIGenericVnf(DelegateExecution execution, isDebugEnabled) {
 
         def vnfId = execution.getVariable('vnfId')
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
         try {
             Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class, uri)
             if (genericVnf.isPresent()) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 488f2d8..1bb5ad1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -30,6 +30,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -109,7 +110,7 @@
 			String vnfName = execution.getVariable("vnfName")
 			if (vnfName.equals("") || vnfName.equals("null")) {
 				AAIResourcesClient resourceClient = new AAIResourcesClient()
-				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, execution.getVariable("vnfId"))
+				AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(execution.getVariable("vnfId")))
 				if(resourceClient.exists(uri)){
 					exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist.")
 				}
@@ -281,7 +282,7 @@
 			String serviceInstanceId = execution.getVariable('DoCVNF_serviceInstanceId')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
 			if(resourceClient.exists(uri)){
 				Map<String, String> keys = uri.getURIKeys()
@@ -355,10 +356,10 @@
 			payload.put("nf-naming-code", nfNamingCode);
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient();
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			resourceClient.create(uri, payload)
 
-			AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+			AAIResourceUri siUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			resourceClient.connect(uri, siUri)
 
 		}catch(Exception ex) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index 76629dd..4a55550 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -52,6 +52,8 @@
 import org.xml.sax.InputSource
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 
@@ -453,7 +455,7 @@
 			String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			resourceClient.delete(serviceInstanceUri)
 
 			logger.trace("Exited deleteServiceInstance")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index 53a98c2..b9a3eab 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -22,35 +22,32 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
-import org.onap.so.logger.LoggingAnchor
-import org.onap.aai.domain.yang.AllottedResource
-import org.onap.logging.filter.base.ErrorCode
-
-import javax.ws.rs.core.UriBuilder
-
 import static org.apache.commons.lang3.StringUtils.*;
-
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.UriBuilder
 import org.apache.commons.lang3.*
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONArray
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.logger.MessageEnum
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
-
-import org.springframework.web.util.UriUtils;
+import org.json.JSONObject
+import org.onap.aai.domain.yang.AllottedResource
 import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.json.JSONObject
-import javax.ws.rs.NotFoundException
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.LoggingAnchor
+import org.onap.so.logger.MessageEnum
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import org.springframework.web.util.UriUtils;
 import groovy.json.*
 
 
@@ -174,7 +171,7 @@
 			String serviceType = execution.getVariable('serviceType')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
 			String json = wrapper.getJson()
 
@@ -582,7 +579,7 @@
 	private Optional<AllottedResource>  getAaiAr(DelegateExecution execution, String relink) {
 		def method = getClass().getSimpleName() + '.getAaiAr(' +'execution=' + execution.getId() +')'
 		logger.info("Entered " + method)
-		AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(relink).build())
+		AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(relink).build())
         return getAAIClient().get(AllottedResource.class,uri)
 	}
 	/**
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
index 2ca0da4..10a5594 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy
@@ -33,6 +33,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.beans.nsmf.DeAllocateNssi
 import org.onap.so.beans.nsmf.EsrInfo
@@ -54,6 +56,7 @@
 import com.fasterxml.jackson.databind.ObjectMapper
 import com.google.gson.JsonObject
 
+
 /**
  * Internal AN NSSMF to handle NSSI Deallocation
  */
@@ -274,8 +277,7 @@
 		String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, anNfNssiId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(anNfNssiId))
 		if (!client.exists(uri)) {
 			logger.debug("AN NF Service Instance was not found in aai : ${anNfNssiId}")
 		}else {
@@ -294,8 +296,7 @@
 		String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
 
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, anNfNssiId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(anNfNssiId))
 		if (!client.exists(uri)) {
 			logger.debug("AN NF Service Instance was not found in aai : ${anNfNssiId}")
 		}else {
@@ -455,8 +456,7 @@
 		Map<String,ServiceInstance> relatedInstances = new HashMap<>()
 
 		AAIResourcesClient client = getAAIClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, instanceId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(instanceId))
 		if (!client.exists(uri)) {
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai : ${instanceId}")
 		}
@@ -470,8 +470,7 @@
 				String relatioshipurl = relationship.getRelatedLink()
 				String serviceInstanceId =
 						relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length())
-				uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-						globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+				uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
 				if (!client.exists(uri)) {
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
 							"Service Instance was not found in aai: ${serviceInstanceId} related to ${instanceId}")
@@ -545,7 +544,7 @@
 	
 	private void deleteServiceInstanceInAAI(DelegateExecution execution,String instanceId) {
 		try {
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), instanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(instanceId))
 			getAAIClient().delete(serviceInstanceUri)
 			logger.debug("${Prefix} Exited deleteServiceInstance")
 		}catch(Exception e){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy
index 5dd70a0..c94e2dd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy
@@ -33,12 +33,13 @@
 import org.onap.aai.domain.yang.Tenant
 import org.onap.aai.domain.yang.VfModule
 import org.onap.aaiclient.client.aai.AAIClient
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.Relationships
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -356,8 +357,8 @@
         String nssiId = currentNSSI['nssiId']
         String nsiId = currentNSSI['nsiId']
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
-        AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nsiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
+        AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nsiId))
 
         try {
             client.disconnect(nssiUri, nsiUri)
@@ -381,7 +382,7 @@
         def currentNSSI = execution.getVariable("currentNSSI")
 
         String nssiId = currentNSSI['nssiId']
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
 
         try {
             getAAIClient().delete(nssiUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
index 0c795b3..9d6c4a1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
@@ -19,34 +19,26 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.fasterxml.jackson.databind.ObjectMapper
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.logging.filter.base.ONAPComponents
+import org.json.JSONObject
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
 import org.onap.so.beans.nsmf.DeAllocateNssi
-import org.onap.so.beans.nsmf.ServiceInfo
 import org.onap.so.beans.nsmf.EsrInfo
-import org.onap.so.beans.nsmf.JobStatusRequest
-import org.onap.so.beans.nsmf.JobStatusResponse
 import org.onap.so.beans.nsmf.NetworkType
-import org.onap.so.beans.nsmf.NssiDeAllocateRequest
 import org.onap.so.beans.nsmf.NssiResponse
+import org.onap.so.beans.nsmf.ServiceInfo
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
-import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.domain.ServiceArtifact
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.client.HttpClient
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.so.db.request.beans.OperationStatus
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.json.JSONObject
-import javax.ws.rs.core.Response
 
 
 class DoDeallocateNSSI extends AbstractServiceTaskProcessor
@@ -322,7 +314,8 @@
         try
         {
             LOGGER.debug("delete nssiServiceInstanceId:${nssiServiceInstanceId}, profileId:${profileId}")
-            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiServiceInstanceId, profileId)
+            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiServiceInstanceId).sliceProfile(profileId))
             if (!getAAIClient().exists(resourceUri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
             }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
index 7681bf9..a410b93 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
@@ -29,6 +29,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
@@ -111,10 +113,7 @@
     void deleteServiceInstance(DelegateExecution execution) {
         try {
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    execution.getVariable("serviceInstanceID"))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("serviceInstanceID")))
             client.delete(uri)
         } catch (BpmnError e) {
             throw e
@@ -134,7 +133,7 @@
             ServiceInstance si = new ServiceInstance()
             si.setOrchestrationStatus(orchStatus)
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, tnNssiId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(tnNssiId))
             client.update(uri, si)
         } catch (BpmnError e) {
             throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 0a7753e..ef94ff1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -52,6 +52,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.onap.logging.filter.base.ONAPComponents;
@@ -176,7 +178,7 @@
             String globalSubscriberId = execution.getVariable('globalSubscriberId')
             String serviceType = execution.getVariable('serviceType')
             AAIResourcesClient resourceClient = new AAIResourcesClient()
-            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
             if (!resourceClient.exists(serviceInstanceUri)) {
                 exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
             }
@@ -658,7 +660,7 @@
             String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
             AAIResourcesClient resourceClient = new AAIResourcesClient()
-            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+            AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
             resourceClient.delete(serviceInstanceUri)
 
             logger.trace("Exited deleteServiceInstance")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index bee9ad2..0220028 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -32,6 +32,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.logging.filter.base.ONAPComponents;
@@ -256,7 +257,7 @@
         ExceptionUtil exceptionUtil = new ExceptionUtil()
         Boolean isVfRelationshipExist = false
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ALL)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ALL)
             Optional<L3Network> l3Network = getAAIClient().get(L3Network.class,uri);
             AAIResultWrapper wrapper = getAAIClient().get(uri);
             Optional<Relationships> relationships = wrapper.getRelationships()
@@ -266,13 +267,13 @@
                 execution.setVariable(Prefix + "queryAAIResponse", l3Network.get())
                 execution.setVariable(Prefix + "isAAIGood", true)
                 if (relationships.isPresent()){
-                    if(!relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()){
+                    if(!relationships.get().getRelatedUris(Types.VF_MODULE).isEmpty()){
                         execution.setVariable(Prefix + "isVfRelationshipExist", true)
                         isVfRelationshipExist = true
                         String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
                         exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
                     }else{
-                        List<AAIResourceUri> tenantURIList = relationships.get().getRelatedAAIUris(AAIObjectType.TENANT)
+                        List<AAIResourceUri> tenantURIList = relationships.get().getRelatedUris(Types.TENANT)
                         for(AAIResourceUri tenantURI: tenantURIList){
                             if(execution.getVariable(Prefix + "tenantId") == null) {
                                 String tenantId = tenantURI.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
@@ -280,7 +281,7 @@
                                 logger.debug(" Get AAI getTenantId()  : " + tenantId)
                             }
                         }
-                        List<AAIResourceUri> cloudRegionURIList = relationships.get().getRelatedAAIUris(AAIObjectType.CLOUD_REGION)
+                        List<AAIResourceUri> cloudRegionURIList = relationships.get().getRelatedUris(Types.CLOUD_REGION)
                         for(AAIResourceUri tenantURI: cloudRegionURIList){
                             if(execution.getVariable(Prefix + "lcpCloudRegion") == null) {
                                 String lcpCloudRegion = tenantURI.getURIKeys().get(AAIFluentTypeBuilder.Types.CLOUD_REGION.getUriParams().cloudRegionId)
@@ -322,7 +323,7 @@
             // Prepare AA&I url
             AaiUtil aaiUtil = new AaiUtil(this)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
             def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
             execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index cda7c32..85cbf32 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -32,6 +32,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -285,7 +286,7 @@
 			String serviceInstanceId = execution.getVariable('serviceInstanceId')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
 			if(resourceClient.exists(uri)){				
 				execution.setVariable("GENGS_FoundIndicator", true)
@@ -307,9 +308,9 @@
 
 				AAIResultWrapper wrapper = resourceClient.get(uri)
 				if(wrapper.getRelationships().isPresent()){
-					List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
-					uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF))
-					uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
+					List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedUris(Types.ALLOTTED_RESOURCE)
+					uriList.addAll(wrapper.getRelationships().get().getRelatedUris(Types.GENERIC_VNF))
+					uriList.addAll(wrapper.getRelationships().get().getRelatedUris(Types.L3_NETWORK))
 
 					if(uriList.isEmpty()){
 						Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
@@ -372,7 +373,7 @@
 			String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient();
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			resourceClient.delete(serviceInstanceUri)
 
 			logger.trace("Exited deleteServiceInstance")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
index 2f78c3d..c432122 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
@@ -19,6 +19,9 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.AllottedResource
@@ -27,21 +30,20 @@
 import org.onap.aai.domain.yang.ServiceInstance
 import org.onap.aai.domain.yang.ServiceProfile
 import org.onap.aai.domain.yang.ServiceProfiles
+import org.onap.aaiclient.client.aai.AAIObjectName
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.OofUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.client.HttpClient
 import org.onap.so.client.HttpClientFactory
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import javax.ws.rs.core.Response
-import javax.ws.rs.NotFoundException
-
-import static org.apache.commons.lang3.StringUtils.isBlank
 
 /**
  * This groovy class supports the <class>DoDeleteSliceService.bpmn</class> process.
@@ -104,7 +106,7 @@
         try
         {
         String errorMsg = "query e2e slice service from aai failed"
-        AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+        AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
         Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
         if(si.isPresent())
         {
@@ -121,7 +123,7 @@
                 if (relatedTo.toLowerCase() == "service-instance") {
                     String relatioshipurl = relationship.getRelatedLink()
                     String instanceId = relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length())
-                    AAIResultWrapper wrapper1 = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, instanceId, errorMsg)                           
+                    AAIResultWrapper wrapper1 = queryAAI(execution, Types.SERVICE_INSTANCE, instanceId, errorMsg)
                     Optional<ServiceInstance> serviceInstance = wrapper1.asBean(ServiceInstance.class)
                     if (serviceInstance.isPresent()) {
                         ServiceInstance instance = serviceInstance.get()
@@ -156,7 +158,7 @@
         try
         {
             String errorMsg = "query allotted resource from aai failed."
-            AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.ALLOTTED_RESOURCE_ALL, serviceInstanceId, errorMsg)
+            AAIResultWrapper wrapper = queryAAI(execution, Types.ALLOTTED_RESOURCES, serviceInstanceId, errorMsg)
             Optional<AllottedResources> ars = wrapper?.asBean(AllottedResources.class)
             if(ars.isPresent() && ars.get().getAllottedResource())
             {
@@ -191,7 +193,7 @@
         try
         {
             String errorMsg = "query nsi from aai failed."
-            AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nsiId, errorMsg)
+            AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, nsiId, errorMsg)
             Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
             List<String> nssiIdList = []
             String msg = "nsiId:${nsiId},nssiIdList:"
@@ -205,7 +207,7 @@
                     {
                         String relatedLink = relationship.getRelatedLink()?:""
                         String instanceId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
-                        AAIResultWrapper wrapper1 = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, instanceId, errorMsg)
+                        AAIResultWrapper wrapper1 = queryAAI(execution, Types.SERVICE_INSTANCE, instanceId, errorMsg)
                         Optional<ServiceInstance> serviceInstance = wrapper1.asBean(ServiceInstance.class)
                         if (serviceInstance.isPresent()) {
                             ServiceInstance instance = serviceInstance.get()
@@ -245,7 +247,7 @@
         String errorMsg = "query nssi list from aai failed"
         for(String nssiId : nssiIdList)
         {
-            AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nssiId, errorMsg)
+            AAIResultWrapper wrapper = queryAAI(execution, Types.SERVICE_INSTANCE, nssiId, errorMsg)
             Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
             if(si.isPresent())
             {
@@ -329,21 +331,30 @@
     /**
      * query AAI
      * @param execution
-     * @param aaiObjectType
+     * @param aaiObjectName
      * @param instanceId
      * @return AAIResultWrapper
      */
-    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+    private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectName aaiObjectName, String instanceId, String errorMsg)
     {
         LOGGER.trace(" *****${PREFIX} Start queryAAI *****")
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
-        if (!getAAIClient().exists(resourceUri)) {
+        org.onap.aaiclient.client.generated.fluentbuilders.ServiceInstance serviceInstanceType = AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(instanceId)
+        def type
+        if (aaiObjectName == Types.ALLOTTED_RESOURCES) {
+            type = serviceInstanceType.allottedResources()
+        } else if (aaiObjectName == Types.SLICE_PROFILES) {
+            type = serviceInstanceType.sliceProfiles()
+        } else {
+            type = serviceInstanceType
+        }
+        def uri = AAIUriFactory.createResourceUri(type)
+        if (!getAAIClient().exists(uri)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
         }
-        AAIResultWrapper wrapper = getAAIClient().get(resourceUri, NotFoundException.class)
+        AAIResultWrapper wrapper = getAAIClient().get(uri, NotFoundException.class)
         LOGGER.trace(" *****${PREFIX} Exit queryAAI *****")
         return wrapper
     }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
index 42f4cb7..1ec11c6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
@@ -32,6 +32,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.onap.logging.filter.base.ONAPComponents;
@@ -121,8 +123,8 @@
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
         String serviceId = execution.getVariable("serviceId")
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceId)
-        AAIResourceUri nsServiceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, nsInstanceId)
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceId))
+        AAIResourceUri nsServiceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nsInstanceId))
         try {
             getAAIClient().disconnect(serviceInstanceUri, nsServiceInstanceUri)
         }catch(Exception e){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index 33a1ece..3bc8daa 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -39,11 +39,12 @@
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -486,7 +487,7 @@
                 for (i in 0..fqdnCount-1) {
                     String fqdn = fqdnList[i]
                     // Query AAI for this network policy FQDN
-					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
                     uri.queryParam("network-policy-fqdn", fqdn)
                     try {
                         Optional<NetworkPolicies> networkPolicies = getAAIClient().get(NetworkPolicies.class, uri)
@@ -498,7 +499,7 @@
                             def networkPolicyId = networkPolicy.getNetworkPolicyId()
                             logger.debug("Deleting network-policy with network-policy-id " + networkPolicyId)
                             try {
-                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId)
+                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicyId))
                                 getAAIClient().delete(delUri)
                                 execution.setVariable("DoDVfMod_aaiDeleteNetworkPolicyReturnCode", 200)
                             } catch (Exception e) {
@@ -606,7 +607,7 @@
             def vnfId = execution.getVariable('vnfId')
             def vfModuleId = execution.getVariable('vfModuleId')
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId))
 
             try {
                 Optional<org.onap.aai.domain.yang.VfModule> vfModule = getAAIClient().get(org.onap.aai.domain.yang.VfModule.class, uri);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
index 786cd3d..00bebdf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
@@ -41,11 +41,12 @@
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -142,7 +143,7 @@
         try {
             def vnfId = execution.getVariable('vnfId')
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
             try {
                 Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class,uri)
 
@@ -514,7 +515,7 @@
 
                     // Query AAI for this network policy FQDN
 
-					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+					AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
                     uri.queryParam("network-policy-fqdn", fqdn)
 
                     try {
@@ -530,7 +531,7 @@
 
                             // Retrieve the resource version for this network policy
                             try {
-                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId)
+                                AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicyId))
                                 getAAIClient().delete(delUri)
                                 execution.setVariable("DDVFMV_aaiDeleteNetworkPolicyReturnCode", 200)
                                 logger.debug(" ***** AAI delete network policy Response Code, NetworkPolicy #" + counting + " : " + 200)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
index 355b5f7..22b16d0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
@@ -32,6 +32,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -122,7 +123,7 @@
 		String cloudRegion = execution.getVariable('lcpCloudRegionId')
 		AaiUtil aaiUtil = new AaiUtil(this)
 
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
 		def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
 		cloudRegion = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
@@ -159,7 +160,7 @@
 		String cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
 
 		try {
-			AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP , Defaults.CLOUD_OWNER.toString(), cloudRegion,volumeGroupId)
+			AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroup(volumeGroupId))
 			Optional<VolumeGroup> volumeGroupOps = getAAIClient().get(VolumeGroup.class,resourceUri)
             if(volumeGroupOps.present) {
                 VolumeGroup volumeGroup = volumeGroupOps.get()
@@ -173,11 +174,11 @@
 				String volumeGroupTenantId = null
 
 				if(relationships.isPresent()){
-					if(relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE)){
+					if(relationships.get().getRelatedUris(Types.VF_MODULE)){
 						logger.debug('Volume Group ' + volumeGroupId + ' currently in use')
 						exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
 					}
-					for(AAIResourceUri aaiResourceUri: relationships.get().getRelatedAAIUris(AAIObjectType.TENANT)){
+					for(AAIResourceUri aaiResourceUri: relationships.get().getRelatedUris(Types.TENANT)){
 						volumeGroupTenantId = aaiResourceUri.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
 					}
 				}
@@ -264,7 +265,7 @@
 		String cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
 
         try {
-            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId)
+            AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion).volumeGroup(volumeGroupId))
             getAAIClient().delete(resourceUri)
             logger.debug("Volume group $volumeGroupId deleted.")
         }catch (NotFoundException ex) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
index 25fbc93..181e62e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
@@ -40,6 +40,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.w3c.dom.Document
 import org.w3c.dom.Element
 import org.w3c.dom.Node
@@ -104,14 +106,14 @@
 		try {
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, execution.getVariable('vnfId'))
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(execution.getVariable('vnfId')))
 
 			if(resourceClient.exists(uri)){
 				execution.setVariable("GENGV_FoundIndicator", true)
 				AAIResultWrapper wrapper = resourceClient.get(uri.depth(Depth.ONE))
 				if(wrapper.getRelationships().isPresent()){
-					List<AAIResourceUri> relationships = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.CLOUD_REGION)
-					relationships.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
+					List<AAIResourceUri> relationships = wrapper.getRelationships().get().getRelatedUris(Types.CLOUD_REGION)
+					relationships.addAll(wrapper.getRelationships().get().getRelatedUris(Types.L3_NETWORK))
 					if(!relationships.isEmpty()){
 						execution.setVariable("DoDVNF_vnfInUse", true)
 					}else{
@@ -148,7 +150,7 @@
 			String vnfId = execution.getVariable("DoDVNF_vnfId")
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient();
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			resourceClient.delete(uri)
 
 			logger.trace("COMPLETED deleteVnf")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
index 2a0cb5e..5d1e2a2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -44,6 +44,8 @@
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.MessageEnum
@@ -263,7 +265,7 @@
 		try {
 			def vnfId = execution.getVariable('vnfId')
 			
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
 
 			try {
 				Optional<GenericVnf> genericVnfOp = getAAIClient().get(GenericVnf.class,uri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
index 2e7e728..f591855 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
@@ -51,6 +51,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import javax.ws.rs.NotFoundException
 
 class DoModifyAccessNSSI extends AbstractServiceTaskProcessor {
@@ -588,8 +590,7 @@
 		Map<String,ServiceInstance> relatedInstances = new HashMap<>()
 		
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, instanceId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(instanceId))
 		if (!client.exists(uri)) {
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai : ${instanceId}")
 		}
@@ -605,8 +606,7 @@
 						relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length())
 
 				AAIResourcesClient client01 = new AAIResourcesClient()
-				AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-						globalSubscriberId, subscriptionServiceType, serviceInstanceId)
+				AAIResourceUri uri01 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(serviceInstanceId))
 				if (!client.exists(uri01)) {
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
 							"Service Instance was not found in aai: ${serviceInstanceId} related to ${instanceId}")
@@ -631,8 +631,7 @@
 		String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
 		ServiceInstance serviceInstance = new ServiceInstance()
 		AAIResourcesClient client = new AAIResourcesClient()
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-				globalSubscriberId, subscriptionServiceType, instanceId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(subscriptionServiceType).serviceInstance(instanceId))
 		if (!client.exists(uri)) {
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai : ${instanceId}")
 		}
@@ -646,7 +645,7 @@
 	}
 	private void deleteServiceInstanceInAAI(DelegateExecution execution,String instanceId) {
 		try {
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), instanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(instanceId))
 			getAAIClient().delete(serviceInstanceUri)
 			logger.debug("${Prefix} Exited deleteServiceInstance")
 		}catch(Exception e){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSI.groovy
index 1f25c73..ebeab3e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSI.groovy
@@ -39,6 +39,8 @@
 import org.onap.aaiclient.client.aai.entities.Relationships
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -78,7 +80,6 @@
 
     private static final Logger LOGGER = LoggerFactory.getLogger( DoModifyCoreNSSI.class)
 
-
     /**
      * Creates Slice Profile Instance
      * @param execution
@@ -118,7 +119,7 @@
 
         try {
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiId,  sliceProfileID)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiId).sliceProfile(sliceProfileID))
             client.create(uri, sliceProfile)
 
             currentNSSI['createdSliceProfile'] = sliceProfile
@@ -145,8 +146,8 @@
         String serviceType = currentNSSI['serviceType']
         String nssiId = currentNSSI['nssiId']
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
-        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiId, sliceProfileID)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
+        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiId).sliceProfile(sliceProfileID))
 
         try {
             SliceProfile createdSliceProfile = (SliceProfile)currentNSSI['createdSliceProfile']
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssi.groovy
index 0b7a5ff..03a726c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssi.groovy
@@ -30,6 +30,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
@@ -132,10 +134,7 @@
     void deleteServiceInstance(DelegateExecution execution) {
         try {
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    execution.getVariable("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"),
-                    execution.getVariable("serviceInstanceID"))
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("serviceInstanceID")))
             client.delete(uri)
         } catch (BpmnError e) {
             throw e
@@ -151,7 +150,7 @@
         String serviceInstanceId = execution.getVariable("serviceInstanceID")
 
         AAIResourcesClient resourceClient = getAAIClient()
-        AAIResourceUri ssServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+        AAIResourceUri ssServiceuri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
         try {
             if (resourceClient.exists(ssServiceuri)) {
@@ -214,7 +213,7 @@
             ss.setEnvironmentContext(snssai)
             ss.setServiceRole(serviceRole)
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), ssInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(ssInstanceId))
             client.update(uri, ss)
         } catch (BpmnError e) {
             throw e
@@ -243,9 +242,7 @@
         sliceProfile.setReliability(new Object())
         try {
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, execution.getVariable
-                    ("globalSubscriberId"),
-                    execution.getVariable("subscriptionServiceType"), sliceserviceInstanceId, sliceProfileId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(sliceserviceInstanceId).sliceProfile(sliceProfileId))
             client.update(uri, sliceProfile)
 
         } catch (BpmnError e) {
@@ -263,9 +260,7 @@
         List<String> arIdList = execution.getVariable("arIdList")
         try {
             for (String arId : arIdList) {
-                AAIResourceUri arUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE,
-                        execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"),
-                        serviceInstanceId, arId)
+                AAIResourceUri arUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(serviceInstanceId).allottedResource(arId))
 
                 getAAIClient().delete(arUri)
             }
@@ -274,9 +269,7 @@
 
             for (String networkStr : networkStrList) {
                 String allottedResourceId = UUID.randomUUID().toString()
-                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE,
-                        execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"),
-                        execution.getVariable("sliceserviceInstanceId"), allottedResourceId)
+                AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(execution.getVariable("sliceserviceInstanceId")).allottedResource(allottedResourceId))
                 execution.setVariable("allottedResourceUri", allottedResourceUri)
                 String modelInvariantId = execution.getVariable("modelInvariantUuid")
                 String modelVersionId = execution.getVariable("modelUuid")
@@ -319,7 +312,7 @@
                 resource.setModelInvariantId(modelInvariantId)
                 resource.setModelVersionId(modelVersionId)
 
-                AAIResourceUri logicalLinkUri = AAIUriFactory.createResourceUri(AAIObjectType.LOGICAL_LINK, logicalLinkId)
+                AAIResourceUri logicalLinkUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().logicalLink(logicalLinkId))
                 getAAIClient().create(logicalLinkUri, resource)
             }
         } catch (Exception ex) {
@@ -365,7 +358,7 @@
             ServiceInstance si = new ServiceInstance()
             si.setOrchestrationStatus(orchStatus)
             AAIResourcesClient client = getAAIClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, sliceServiceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(sliceServiceInstanceId))
             client.update(uri, si)
         } catch (BpmnError e) {
             throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
index 6b91fec..615afcb 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
@@ -41,6 +41,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.springframework.web.util.UriUtils;
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -315,7 +317,7 @@
 			org.onap.aai.domain.yang.ServiceInstance si = execution.getVariable("serviceInstanceData")
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 			client.update(uri, si)
 
 		} catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
index 154de6b..5b16838 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
@@ -37,6 +37,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
@@ -241,7 +243,7 @@
 			org.onap.aai.domain.yang.ServiceInstance si = execution.getVariable("serviceInstanceData")
 
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 			client.update(uri, si)
 
 		} catch (BpmnError e) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
index cf7bb22..be82562 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -37,6 +37,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -328,7 +329,7 @@
             String serviceInstanceId = execution.getVariable('serviceInstanceId')
 
             AAIResourcesClient resourceClient = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
             if(!resourceClient.exists(uri)){
                 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Service Instance not found in aai")
@@ -361,7 +362,7 @@
             String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
             AaiUtil aaiUtil = new AaiUtil(this)
 
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
             def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
             execution.setVariable(Prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
@@ -409,7 +410,7 @@
             execution.setVariable(Prefix + "networkId", networkId)
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ONE)
             AAIResultWrapper network = client.get(uri, NotFoundException.class)
 
             execution.setVariable(Prefix + "aaiIdReturnCode", "200")
@@ -442,7 +443,7 @@
             String networkId   = utils.getNodeText(networkRequest, "network-id")
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ONE)
             AAIResultWrapper network = client.get(uri, NotFoundException.class)
 
             execution.setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
@@ -483,7 +484,7 @@
             // get variables
             AAIResultWrapper queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
             if(queryIdAAIResponse.getRelationships().isPresent()){
-                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedAAIUris(AAIObjectType.VPN_BINDING)
+                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedUris(Types.VPN_BINDING)
 
                 logger.debug(Prefix + "vpnCount - " + uris.size())
 
@@ -555,7 +556,7 @@
             // get variables
             AAIResultWrapper queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
             if(queryIdAAIResponse.getRelationships().isPresent()){
-                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedAAIUris(AAIObjectType.NETWORK_POLICY)
+                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedUris(Types.NETWORK_POLICY)
 
                 execution.setVariable(Prefix + "networkPolicyCount", uris.size())
                 logger.debug(Prefix + "networkPolicyCount - " + uris.size())
@@ -620,7 +621,7 @@
         try {
             AAIResultWrapper queryIdAAIResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
             if(queryIdAAIResponse.getRelationships().isPresent()){
-                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedAAIUris(AAIObjectType.ROUTE_TABLE_REFERENCE)
+                List<AAIResourceUri> uris = queryIdAAIResponse.getRelationships().get().getRelatedUris(Types.ROUTE_TABLE_REFERENCE)
 
                 execution.setVariable(Prefix + "networkTableRefCount", uris.size())
                 logger.debug(Prefix + "networkTableRefCount - " + uris.size())
@@ -717,7 +718,7 @@
             }
 
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId))
             client.update(uri, l3Network)
 
             List<Subnet> subnets = oldL3Network.getSubnets().getSubnet()
@@ -734,7 +735,7 @@
                     subnet.setOrchestrationStatus("Active")
                 }
 
-                AAIResourceUri subUri = AAIUriFactory.createResourceUri(AAIObjectType.SUBNET, networkId, subnetId)
+                AAIResourceUri subUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId).subnet(subnetId))
                 client.update(subUri, subnet)
             }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index 00cf2a3..b7bbbf9 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -25,6 +25,14 @@
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.GenericVnf
+import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.CatalogDbUtils
@@ -37,12 +45,6 @@
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.so.constants.Defaults
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
@@ -273,7 +275,7 @@
 				}
 
 				try{
-					AAIResourceUri serviceInstanceURI = AAIUriFactory.create(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,serviceType,serviceInstanceId)
+					AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 					AAIResourcesClient aaiRC = new AAIResourcesClient()
 					AAIResultWrapper aaiRW = aaiRC.get(serviceInstanceURI)
 					Map<String, Object> aaiJson = aaiRW.asMap()
@@ -411,7 +413,7 @@
 			// Prepare AA&I url
 			AaiUtil aaiUtil = new AaiUtil(this)
 
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, Defaults.CLOUD_OWNER.toString(), cloudRegion)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegion))
 			def queryCloudRegionRequest = aaiUtil.createAaiUri(uri)
 
 			execution.setVariable(prefix + "queryCloudRegionRequest", queryCloudRegionRequest)
@@ -1018,7 +1020,7 @@
 
 		try {
 			def vnfId = execution.getVariable('DOUPVfMod_vnfId')
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
 
 			try {
 				Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class,uri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
index 7e180ca..0285ae2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -41,7 +41,9 @@
 import org.onap.so.client.HttpClient
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -159,7 +161,7 @@
 			def vnfId = execution.getVariable('vnfId')
 
 			AaiUtil aaiUriUtil = new AaiUtil(this)
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)).depth(Depth.ONE)
 			String endPoint = aaiUriUtil.createAaiUri(uri)
 			logger.debug("AAI endPoint: " + endPoint)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
index 3367920..7d2e536 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnAllocateNssi.groovy
@@ -31,6 +31,8 @@
 import org.onap.aaiclient.client.aai.AAIResourcesClient
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.RequestDBUtil
@@ -302,7 +304,7 @@
             ServiceInstance si = new ServiceInstance()
             si.setOrchestrationStatus(orchStatus)
             AAIResourcesClient client = new AAIResourcesClient()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, sliceServiceInstanceId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(sliceServiceInstanceId))
             client.update(uri, si)
         } catch (BpmnError e) {
             throw e
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
index 282e961..3a19921 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -44,6 +44,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.springframework.web.util.UriUtils
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -178,7 +180,7 @@
 			String serviceType = execution.getVariable('serviceType')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId))
 			AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
 
 			Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
index 148ab18..a50f96a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -33,6 +33,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -185,7 +186,7 @@
 		try {
 			def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
 			def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(),aicCloudRegion,volumeGroupId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
 			AAIResultWrapper wrapper =  getAAIClient().get(uri)
 			Optional<VolumeGroup> volumeGroup = wrapper.asBean(VolumeGroup.class)
 			if(volumeGroup.isPresent()){
@@ -193,7 +194,7 @@
 				execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
 				Optional<Relationships> relationships = wrapper.getRelationships()
 				if(relationships.isPresent()){
-					List<AAIResourceUri> resourceUriList = relationships.get().getRelatedAAIUris(AAIObjectType.TENANT)
+					List<AAIResourceUri> resourceUriList = relationships.get().getRelatedUris(Types.TENANT)
 					if(CollectionUtils.isNotEmpty(resourceUriList)){
 						AAIResourceUri tenantUri = resourceUriList.get(0)
 						String volumeGroupTenantId = tenantUri.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
index b6873a1..b775771 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -29,12 +29,12 @@
 import org.onap.aai.domain.yang.GenericVnf
 import org.onap.aai.domain.yang.VfModule
 import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.Relationships
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -207,14 +207,14 @@
         def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
 
         try {
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
             AAIResultWrapper wrapper = getAAIClient().get(uri)
             Optional<VolumeGroup> volumeGroup = wrapper.asBean(VolumeGroup.class)
             if (volumeGroup.isPresent()) {
                 execution.setVariable('UPDVfModVol_aaiVolumeGroupResponse', volumeGroup.get())
                 Optional<Relationships> relationships = wrapper.getRelationships()
                 if (relationships.isPresent()) {
-                    List<AAIResourceUri> tenantURIList = relationships.get().getRelatedAAIUris(AAIObjectType.TENANT)
+                    List<AAIResourceUri> tenantURIList = relationships.get().getRelatedUris(Types.TENANT)
                     if (!isEmpty(tenantURIList)) {
                         String volumeGroupTenantId = tenantURIList.get(0).getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId)
                         execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
@@ -224,7 +224,7 @@
                         exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
                                 + ", AIC Cloud Region " + aicCloudRegion)
                     }
-                    execution.setVariable('UPDVfModVol_relatedVfModuleLink', relationships.get().getRelatedLinks(AAIObjectType.VF_MODULE).get(0))
+                    execution.setVariable('UPDVfModVol_relatedVfModuleLink', relationships.get().getRelatedLinks(Types.VF_MODULE).get(0))
 
                 } else {
                     exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
@@ -249,7 +249,7 @@
 
         def vnfId = execution.getVariable('vnfId')
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
         try {
             Optional<GenericVnf> genericVnf = getAAIClient().get(GenericVnf.class, uri)
             if (genericVnf.isPresent()) {
@@ -273,7 +273,7 @@
 
         String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
         execution.setVariable('UPDVfModVol_personaModelId', '')
-        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.VF_MODULE, UriBuilder.fromPath(queryAAIVfModuleRequest).build())
+        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.VF_MODULE, UriBuilder.fromPath(queryAAIVfModuleRequest).build())
         try{
            Optional<VfModule> vfModule = getAAIClient().get(VfModule.class,uri)
             if(vfModule.isPresent()){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
index aa35123..c797f92 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -32,6 +32,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.appc.client.lcm.model.Action
 import org.onap.appc.client.lcm.model.ActionIdentifiers
 import org.onap.appc.client.lcm.model.Flags
@@ -218,7 +219,7 @@
             logger.debug("cloudRegionId is: {}", cloudRegionId)
 			
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			// Check if this VNF exists
 			if (!client.exists(genericVnfUri)) {
                 logger.debug("VNF with vnfId {} does not exist in A&AI", vnfId)
@@ -243,7 +244,7 @@
 				Relationships relationships = aaiRW.getRelationships().get()
 				if (relationships != null) {
 						
-					List<AAIResourceUri> vserverUris = relationships.getRelatedAAIUris(AAIObjectType.VSERVER)
+					List<AAIResourceUri> vserverUris = relationships.getRelatedUris(Types.VSERVER)
 					JSONArray vserverIds = new JSONArray()
 					JSONArray vserverSelfLinks = new JSONArray()
 				
@@ -436,7 +437,7 @@
 			def vnfId = execution.getVariable("vnfId")
             logger.debug("vnfId is: {}", vnfId)
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			AAIResultWrapper aaiRW = client.get(genericVnfUri)
 			Map<String, Object> result = aaiRW.asMap()
 			boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
@@ -488,7 +489,7 @@
 			def transactionLoggingUuid = UUID.randomUUID().toString()
 			def vnfId = execution.getVariable("vnfId")
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			
 			Map<String, Boolean> request = new HashMap<>()
 			request.put("is-closed-loop-disabled", setDisabled)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
index ddc80f6..ee173ca 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
@@ -32,6 +32,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -360,7 +362,7 @@
 			def vnfId = execution.getVariable("vnfId")
             logger.debug("vnfId is: {}", vnfId)
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			AAIResultWrapper aaiRW = client.get(genericVnfUri)
 			Map<String, Object> result = aaiRW.asMap()
 			boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
@@ -412,7 +414,7 @@
 			def transactionLoggingUuid = UUID.randomUUID().toString()
 			def vnfId = execution.getVariable("vnfId")
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 
 			Map<String, Boolean> request = new HashMap<>()
 			request.put("is-closed-loop-disabled", setDisabled)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
index 603d5e4..4fad3c3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
@@ -35,6 +35,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.client.appc.ApplicationControllerClient
 import org.onap.so.client.appc.ApplicationControllerSupport
 import org.onap.so.logger.LoggingAnchor
@@ -380,7 +382,7 @@
 			def vnfId = execution.getVariable("vnfId")
 			logger.debug("vnfId is: " + vnfId)
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 			AAIResultWrapper aaiRW = client.get(genericVnfUri)
 			Map<String, Object> result = aaiRW.asMap()
 			boolean isClosedLoopDisabled = result.getOrDefault("is-closed-loop-disabled", false)
@@ -431,7 +433,7 @@
 			def transactionLoggingUuid = UUID.randomUUID().toString()
 			def vnfId = execution.getVariable("vnfId")
 			AAIResourcesClient client = new AAIResourcesClient()
-			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+			AAIResourceUri genericVnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 
 			Map<String, Boolean> request = new HashMap<>()
 			request.put("is-closed-loop-disabled", setDisabled)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
index dd1dae6..236e9d6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
@@ -31,6 +31,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -205,7 +206,7 @@
 			String serviceInstanceId = execution.getVariable('serviceInstanceId')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
 			if(resourceClient.exists(uri)){
 				AAIResultWrapper wrapper = resourceClient.get(uri, NotFoundException.class)
@@ -217,13 +218,13 @@
 
 				if(relationships.isPresent()){
 
-					List<AAIResourceUri> vnfUris = relationships.get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)
+					List<AAIResourceUri> vnfUris = relationships.get().getRelatedUris(Types.GENERIC_VNF)
 					for(AAIResourceUri u:vnfUris){
 						Map<String, String> keys = u.getURIKeys()
 						String vnfId = keys.get(AAIFluentTypeBuilder.Types.GENERIC_VNF.getUriParams().vnfId)
 						relatedVnfIdList.add(vnfId)
 					}
-					List<AAIResourceUri> arUris = relationships.get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+					List<AAIResourceUri> arUris = relationships.get().getRelatedUris(Types.ALLOTTED_RESOURCE)
 					for(AAIResourceUri u:arUris){
 						String ar = resourceClient.get(u).getJson()
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index 683b82e..87c2f67 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -27,16 +27,17 @@
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.AllottedResource
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.*
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
@@ -168,7 +169,7 @@
 			String serviceInstanceId = execution.getVariable('serviceInstanceId')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
 			if(resourceClient.exists(uri)){
 				execution.setVariable("CSI_resourceLink", uri.build().toString())
@@ -230,7 +231,7 @@
 			String serviceInstanceId = execution.getVariable('parentServiceInstanceId')
 
 			AAIResourcesClient resourceClient = new AAIResourcesClient()
-			AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+			AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
 
 				//just to make sure the serviceInstance exists
 				if (resourceClient.exists(uri)) {
@@ -265,7 +266,7 @@
 
 			AAIResourceUri siResourceLink= execution.getVariable("PSI_resourceLink")
 
-			AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
+			AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, Types.ALLOTTED_RESOURCE.getFragment(allottedResourceId))
 
 			execution.setVariable("aaiARPath", allottedResourceUri.build().toString());
 			String arType = execution.getVariable("allottedResourceType")
@@ -283,7 +284,7 @@
 			resource.setModelInvariantId(modelInvariantId)
 			resource.setModelVersionId(modelVersionId)
 			getAAIClient().create(allottedResourceUri, resource)
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath(CSI_resourceLink).build())
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath(CSI_resourceLink).build())
 			getAAIClient().connect(allottedResourceUri,serviceInstanceUri)
 		}catch (Exception ex) {
 			exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception in createAaiAR " + ex.getMessage())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index 9782440..69ce713 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -22,26 +22,26 @@
 
 package org.onap.so.bpmn.vcpe.scripts
 
-import org.onap.so.logger.LoggingAnchor
+import static org.apache.commons.lang3.StringUtils.isBlank
+import javax.ws.rs.core.UriBuilder
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.AllottedResource
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.logging.filter.base.ErrorCode
 import org.onap.so.bpmn.common.scripts.*;
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.logging.filter.base.ErrorCode
+import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-import javax.ws.rs.core.UriBuilder
-import static org.apache.commons.lang3.StringUtils.isBlank
-
 /**
  * This groovy class supports the <class>DoCreateAllottedResourceTXC.bpmn</class> process.
  *
@@ -206,7 +206,7 @@
 
 			AAIResourceUri siResourceLink= execution.getVariable("PSI_resourceLink")
 
-			AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
+			AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, Types.ALLOTTED_RESOURCE.getFragment(allottedResourceId))
 
 			execution.setVariable("aaiARPath", allottedResourceUri.build().toString());
 			String arType = execution.getVariable("allottedResourceType")
@@ -224,7 +224,7 @@
 			resource.setModelInvariantId(modelInvariantId)
 			resource.setModelVersionId(modelVersionId)
 			getAAIClient().create(allottedResourceUri, resource)
-			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath(CSI_resourceLink).build())
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath(CSI_resourceLink).build())
 			getAAIClient().connect(allottedResourceUri,serviceInstanceUri)
 
 		}catch (Exception ex) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResources.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResources.java
index 1cc6895..3021852 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResources.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResources.java
@@ -23,11 +23,12 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,17 +37,19 @@
     private static final Logger logger = LoggerFactory.getLogger(AAICreateResources.class);
 
     public void createAAIProject(String projectName, String serviceInstance) {
-        AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, projectName);
+        AAIResourceUri projectURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(projectName));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         getAaiClient().createIfNotExists(projectURI, Optional.empty()).connect(projectURI, serviceInstanceURI);
 
     }
 
     public void createAAIOwningEntity(String owningEntityId, String owningEntityName, String serviceInstance) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         Map<String, String> hashMap = new HashMap<>();
         hashMap.put("owning-entity-name", owningEntityName);
         getAaiClient().createIfNotExists(owningEntityURI, Optional.of(hashMap)).connect(owningEntityURI,
@@ -54,39 +57,44 @@
     }
 
     public boolean existsOwningEntity(String owningEntityId) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         return getAaiClient().exists(owningEntityURI);
     }
 
     public void connectOwningEntityandServiceInstance(String owningEntityId, String serviceInstance) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         getAaiClient().connect(owningEntityURI, serviceInstanceURI);
     }
 
     public void createAAIPlatform(String platformName, String vnfId) {
-        AAIResourceUri platformURI = AAIUriFactory.createResourceUri(AAIObjectType.PLATFORM, platformName);
-        AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        AAIResourceUri platformURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().platform(platformName));
+        AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         getAaiClient().createIfNotExists(platformURI, Optional.empty()).connect(platformURI, genericVnfURI);
     }
 
     public void createAAILineOfBusiness(String lineOfBusiness, String vnfId) {
         AAIResourceUri lineOfBusinessURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.LINE_OF_BUSINESS, lineOfBusiness);
-        AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness));
+        AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         getAaiClient().createIfNotExists(lineOfBusinessURI, Optional.empty()).connect(lineOfBusinessURI, genericVnfURI);
     }
 
     public void createAAIServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId) {
-        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalCustomerId, serviceType, serviceInstanceId);
+        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                .customer(globalCustomerId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
         getAaiClient().createIfNotExists(serviceInstanceURI, Optional.empty());
     }
 
     public Optional<GenericVnf> getVnfInstance(String vnfId) {
         try {
-            AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+            AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
             AAIResultWrapper aaiResponse = getAaiClient().get(vnfURI);
             Optional<GenericVnf> vnf = aaiResponse.asBean(GenericVnf.class);
             return vnf;
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstance.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstance.java
index 2216648..97adc4d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstance.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstance.java
@@ -22,10 +22,10 @@
 
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.onap.so.bpmn.common.scripts.ExceptionUtil;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,7 +43,7 @@
         try {
             String serviceInstanceId = (String) execution.getVariable("serviceInstanceId");
             AAIResourceUri serviceInstanceURI =
-                    AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                    AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
             getAaiClient().delete(serviceInstanceURI);
             execution.setVariable("GENDS_SuccessIndicator", true);
         } catch (Exception ex) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
index c2e2a3c..cc7eefc 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
@@ -27,11 +27,11 @@
 import java.util.Optional;
 import org.onap.aai.domain.yang.OwningEntities;
 import org.onap.aai.domain.yang.OwningEntity;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -40,18 +40,20 @@
     private static final Logger logger = LoggerFactory.getLogger(AAICreateResources.class);
 
     public void createAAIProject(String projectName, String serviceInstance) {
-        AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, projectName);
+        AAIResourceUri projectURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(projectName));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.createIfNotExists(projectURI, Optional.empty()).connect(projectURI, serviceInstanceURI);
 
     }
 
     public void createAAIOwningEntity(String owningEntityId, String owningEntityName, String serviceInstance) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createNodesUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         Map<String, String> hashMap = new HashMap<>();
         hashMap.put("owning-entity-name", owningEntityName);
         AAIResourcesClient aaiRC = new AAIResourcesClient();
@@ -59,7 +61,8 @@
     }
 
     public boolean existsOwningEntity(String owningEntityId) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         return aaiRC.exists(owningEntityURI);
     }
@@ -67,8 +70,10 @@
     protected OwningEntities getOwningEntityName(String owningEntityName) {
 
         AAIResourcesClient aaiRC = new AAIResourcesClient();
-        return aaiRC.get(OwningEntities.class, AAIUriFactory.createResourceUri(AAIObjectPlurals.OWNING_ENTITY)
-                .queryParam("owning-entity-name", owningEntityName)).orElseGet(() -> {
+        return aaiRC.get(OwningEntities.class,
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntities())
+                        .queryParam("owning-entity-name", owningEntityName))
+                .orElseGet(() -> {
                     logger.debug("No Owning Entity matched by name");
                     return null;
                 });
@@ -91,31 +96,35 @@
     }
 
     public void connectOwningEntityandServiceInstance(String owningEntityId, String serviceInstance) {
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.connect(owningEntityURI, serviceInstanceURI);
     }
 
     public void createAAIPlatform(String platformName, String vnfId) {
-        AAIResourceUri platformURI = AAIUriFactory.createResourceUri(AAIObjectType.PLATFORM, platformName);
-        AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        AAIResourceUri platformURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().platform(platformName));
+        AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.createIfNotExists(platformURI, Optional.empty()).connect(platformURI, genericVnfURI);
     }
 
     public void createAAILineOfBusiness(String lineOfBusiness, String vnfId) {
         AAIResourceUri lineOfBusinessURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.LINE_OF_BUSINESS, lineOfBusiness);
-        AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness));
+        AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.createIfNotExists(lineOfBusinessURI, Optional.empty()).connect(lineOfBusinessURI, genericVnfURI);
     }
 
     public void createAAIServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId) {
-        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalCustomerId, serviceType, serviceInstanceId);
+        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                .customer(globalCustomerId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.createIfNotExists(serviceInstanceURI, Optional.empty());
     }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAIDeleteServiceInstance.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAIDeleteServiceInstance.java
index bb7415d..df42e96 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAIDeleteServiceInstance.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAIDeleteServiceInstance.java
@@ -22,11 +22,11 @@
 
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.onap.so.bpmn.common.scripts.ExceptionUtil;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -42,7 +42,7 @@
         try {
             String serviceInstanceId = (String) execution.getVariable("serviceInstanceId");
             AAIResourceUri serviceInstanceURI =
-                    AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                    AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
             AAIResourcesClient aaiRC = new AAIResourcesClient();
             aaiRC.delete(serviceInstanceURI);
             execution.setVariable("GENDS_SuccessIndicator", true);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
index 001e166..03ff55b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
@@ -22,11 +22,12 @@
 
 import java.util.Optional;
 import org.onap.aai.domain.yang.Pnf;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.AAIRestClientImpl;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.springframework.stereotype.Component;
 
 @Component
@@ -52,8 +53,8 @@
     @Override
     public void createRelation(String serviceInstanceId, String pnfName) {
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
-        AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfName);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+        AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfName));
         new AAIResourcesClient().connect(serviceInstanceURI, pnfUri);
     }
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index 99ed7b1..d1fc0a6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -54,19 +54,19 @@
 import org.onap.aai.domain.yang.PInterface;
 import org.onap.aai.domain.yang.Pnf;
 import org.onap.aai.domain.yang.Relationship;
-import org.onap.logging.filter.base.ErrorCode;
-import org.onap.so.bpmn.core.UrnPropertiesReader;
-import org.onap.so.bpmn.core.domain.Resource;
-import org.onap.so.bpmn.core.domain.ServiceDecomposition;
-import org.onap.so.bpmn.core.json.JsonUtils;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.logging.filter.base.ErrorCode;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.bpmn.core.domain.Resource;
+import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.json.JsonUtils;
 import org.onap.so.logger.MessageEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -448,7 +448,7 @@
     public Map getTPsfromAAI(String serviceName) {
         Map<String, Object> tpInfo = new HashMap<>();
 
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.LOGICAL_LINK);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().logicalLinks());
         AAIResourcesClient client = new AAIResourcesClient();
         Optional<LogicalLinks> result = client.get(LogicalLinks.class, uri);
 
@@ -464,10 +464,10 @@
                 List<AAIResourceUri> pInterfaces = new ArrayList<>();
                 if (optRelationships.isPresent()) {
                     Relationships relationships = optRelationships.get();
-                    if (!relationships.getRelatedAAIUris(AAIObjectType.EXT_AAI_NETWORK).isEmpty()) {
+                    if (!relationships.getRelatedUris(Types.EXT_AAI_NETWORK).isEmpty()) {
                         isRemoteLink = true;
                     }
-                    pInterfaces.addAll(relationships.getRelatedAAIUris(AAIObjectType.P_INTERFACE));
+                    pInterfaces.addAll(relationships.getRelatedUris(Types.P_INTERFACE));
                     if (isRemoteLink) {
                         // find remote p interface
                         AAIResourceUri localTP = null;
@@ -502,8 +502,8 @@
             tpInfo.put("local-access-node-id", localNodeId);
 
             logger.info("Get info for local TP :{}", localNodeId);
-            Optional<Pnf> optLocalPnf =
-                    client.get(Pnf.class, AAIUriFactory.createResourceUri(AAIObjectType.PNF, localNodeId));
+            Optional<Pnf> optLocalPnf = client.get(Pnf.class,
+                    AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(localNodeId)));
 
 
             getTpInfoFromLocalTp(tpInfo, optLocalPnf);
@@ -523,8 +523,8 @@
             logger.info("Get info for remote TP:{}", remoteNodeId);
 
             String[] networkRefRemote = intfRemote.getNetworkRef().split("-");
-            Optional<Pnf> optRemotePnf =
-                    client.get(Pnf.class, AAIUriFactory.createResourceUri(AAIObjectType.PNF, remoteNodeId));
+            Optional<Pnf> optRemotePnf = client.get(Pnf.class,
+                    AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(remoteNodeId)));
 
             getTpInfoFromRemoteTp(tpInfo, networkRefRemote, optRemotePnf);
 
@@ -584,14 +584,14 @@
         if (uriString != null) {
             // get the pnfname
             String[] token = uriString.split("/");
-            AAIResourceUri parent = AAIUriFactory.createResourceUri(AAIObjectType.PNF, token[4]);
+            AAIResourceUri parent = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(token[4]));
 
             AAIResultWrapper wrapper = client.get(parent);
             Optional<Relationships> optRelationships = wrapper.getRelationships();
             if (optRelationships.isPresent()) {
                 Relationships relationships = optRelationships.get();
 
-                return !relationships.getRelatedAAIUris(AAIObjectType.EXT_AAI_NETWORK).isEmpty();
+                return !relationships.getRelatedUris(Types.EXT_AAI_NETWORK).isEmpty();
             }
         }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResourceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResourceTest.groovy
index 1551533..61b4957 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResourceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResourceTest.groovy
@@ -30,6 +30,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 import javax.ws.rs.NotFoundException
 
@@ -59,8 +61,8 @@
         when(mockExecution.getVariable("nsInstanceId")).thenReturn("nsInstanceId")
         doNothing().when(client).connect(isA(AAIResourceUri.class),isA(AAIResourceUri.class))
         createVFCNSResource.addNSRelationship(mockExecution)
-        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,"globalSubscriberId1","serviceType","nsInstanceId")
-        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,"globalSubscriberId1","serviceType","serviceInstanceId")
+        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("globalSubscriberId1").serviceSubscription("serviceType").serviceInstance("nsInstanceId"))
+        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("globalSubscriberId1").serviceSubscription("serviceType").serviceInstance("serviceInstanceId"))
         Mockito.verify(client).connect(nsUri,relatedServiceUri)
     }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
index 09b1770..c19cdfd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
@@ -38,6 +38,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 import static org.junit.Assert.assertEquals
 import static org.mockito.Mockito.*
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationServiceTest.groovy
index 39d0334..51d64af 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationServiceTest.groovy
@@ -19,29 +19,29 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertNotNull
+import static org.mockito.Mockito.*
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 import org.junit.Before
 import org.junit.Test
 import org.mockito.ArgumentCaptor
 import org.mockito.Captor
 import org.mockito.Mockito
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.logging.filter.base.ONAPComponents
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.client.HttpClient
 import org.onap.so.client.HttpClientFactory
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.NotFoundException
-import javax.ws.rs.core.Response
-
-import static org.junit.Assert.assertEquals
-import static org.junit.Assert.assertNotNull
-import static org.mockito.ArgumentMatchers.eq
-import static org.mockito.Mockito.*
 
 class DeleteCommunicationServiceTest extends MsoGroovyTest {
 
@@ -96,7 +96,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DeleteCommunicationService obj = spy(DeleteCommunicationService.class)
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockQueryCommunicationServiceReturn())
@@ -126,8 +126,8 @@
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockQueryCommunicationServiceProfile())
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_PROFILE_ALL, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
-        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_SERVICE_PROFILE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be", "5G-111111")
+        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be").communicationServiceProfiles())
+        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be").communicationServiceProfile("5G-111111"))
 
         DeleteCommunicationService obj = spy(DeleteCommunicationService.class)
         when(obj.getAAIClient()).thenReturn(client)
@@ -162,7 +162,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DeleteCommunicationService obj = spy(DeleteCommunicationService.class)
         when(obj.getAAIClient()).thenReturn(client)
         doNothing().when(client).delete(serviceInstanceUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceServiceTest.groovy
index 1a9c6bb..75b606c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceServiceTest.groovy
@@ -19,29 +19,27 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Before
-import org.junit.Test
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.NotFoundException
-
 import static org.junit.Assert.assertNotNull
 import static org.mockito.ArgumentMatchers.eq
 import static org.mockito.Mockito.doNothing
 import static org.mockito.Mockito.spy
 import static org.mockito.Mockito.times
 import static org.mockito.Mockito.when
-import static org.mockito.Mockito.when
-import static org.mockito.Mockito.when
+import javax.ws.rs.NotFoundException
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.core.WorkflowException
 
 class DeleteSliceServiceTest extends MsoGroovyTest {
     @Before
@@ -86,7 +84,7 @@
         when(mockExecution.getVariable("progress")).thenReturn("100")
         when(mockExecution.getVariable("operationContent")).thenReturn("NSMF completes slicing service termination.")
 
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DeleteSliceService obj = spy(DeleteSliceService.class)
         when(obj.getAAIClient()).thenReturn(client)
         doNothing().when(client).delete(serviceInstanceUri)
@@ -104,8 +102,8 @@
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockQuerySliceServiceProfile())
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE_ALL, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
-        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be", "5G-2222222")
+        AAIPluralResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be").serviceProfiles())
+        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be").serviceProfile("5G-2222222"))
 
         DeleteSliceService obj = spy(DeleteSliceService.class)
         when(obj.getAAIClient()).thenReturn(client)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
index 7137799..0f0946d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
@@ -39,6 +39,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException
 
 import javax.ws.rs.NotFoundException
@@ -251,7 +253,7 @@
         volumeGroup.setVolumeGroupId("volumeGroupId1")
         when(mockExecution.getVariable("DELVfModVol_queryAAIVolGrpResponse")).thenReturn(volumeGroup)
         when(mockExecution.getVariable("DELVfModVol_aicCloudRegion")).thenReturn("region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "region1","volumeGroupId1")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "region1").volumeGroup("volumeGroupId1"))
         doNothing().when(client).delete(resourceUri)
         deleteVfModuleVolumeInfraV1.deleteVolGrpId(mockExecution, true)
         verify(client).delete(resourceUri)
@@ -263,7 +265,7 @@
         volumeGroup.setVolumeGroupId("volumeGroupId1")
         when(mockExecution.getVariable("DELVfModVol_queryAAIVolGrpResponse")).thenReturn(volumeGroup)
         when(mockExecution.getVariable("DELVfModVol_aicCloudRegion")).thenReturn("region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "region1","volumeGroupId1")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "region1").volumeGroup("volumeGroupId1"))
         doThrow(new NotFoundException("Not Found")).when(client).delete(resourceUri)
         try {
             deleteVfModuleVolumeInfraV1.deleteVolGrpId(mockExecution, true)
@@ -282,7 +284,7 @@
         volumeGroup.setVolumeGroupId("volumeGroupId1")
         when(mockExecution.getVariable("DELVfModVol_queryAAIVolGrpResponse")).thenReturn(volumeGroup)
         when(mockExecution.getVariable("DELVfModVol_aicCloudRegion")).thenReturn("region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "region1","volumeGroupId1")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "region1").volumeGroup("volumeGroupId1"))
         doThrow(new GraphInventoryUriComputationException("Error")).when(client).delete(resourceUri)
         try {
             deleteVfModuleVolumeInfraV1.deleteVolGrpId(mockExecution, true)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSITest.groovy
index a39ca04..6978093 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSITest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateCoreNSSITest.groovy
@@ -34,6 +34,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 import static org.mockito.Mockito.spy
 import static org.mockito.Mockito.times
@@ -81,7 +83,7 @@
 
         DoActivateCoreNSSI obj = spy(DoActivateCoreNSSI.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX")
+        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX"))
         when(client.exists(resourceUri1)).thenReturn(true)
         AAIResultWrapper wrapper1 = new AAIResultWrapper(mockQuerySliceServiceReturn())
         when(client.get(resourceUri1, NotFoundException.class)).thenReturn(wrapper1)
@@ -89,14 +91,14 @@
         //networkServiceInstanceId
         when(mockExecution.getVariable("networkServiceInstanceId")).thenReturn("206535e7-77c9-4036-9387-3f1cf57b4379")
 
-        AAIResourceUri resourceUri2 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "206535e7-77c9-4036-9387-3f1cf57b4379")
+        AAIResourceUri resourceUri2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("206535e7-77c9-4036-9387-3f1cf57b4379"))
         when(client.exists(resourceUri2)).thenReturn(true)
         AAIResultWrapper wrapper2 = new AAIResultWrapper(mockQueryNS())
         when(client.get(resourceUri2, NotFoundException.class)).thenReturn(wrapper2)
 
         //Check Vnf
         when(mockExecution.getVariable("vnfId")).thenReturn("eeb66c6f-36bd-47ad-8294-48f46b1aa912")
-        AAIResourceUri resourceUri3 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "eeb66c6f-36bd-47ad-8294-48f46b1aa912")
+        AAIResourceUri resourceUri3 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("eeb66c6f-36bd-47ad-8294-48f46b1aa912"))
         when(client.exists(resourceUri3)).thenReturn(true)
         AAIResultWrapper wrapper3 = new AAIResultWrapper(mockQueryVnf())
         when(client.get(resourceUri3, NotFoundException.class)).thenReturn(wrapper3)
@@ -104,14 +106,14 @@
 
         //Allotted Resources-1
         //when(mockExecution.getVariable("vnfId")).thenReturn("eeb66c6f-36bd-47ad-8294-48f46b1aa912")
-        AAIResourceUri resourceUri4 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "0d3d3cce-46a8-486d-816a-954e71697c4e")
+        AAIResourceUri resourceUri4 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("0d3d3cce-46a8-486d-816a-954e71697c4e"))
         when(client.exists(resourceUri4)).thenReturn(true)
         AAIResultWrapper wrapper4 = new AAIResultWrapper(mockServiceProfile1())
         when(client.get(resourceUri4, NotFoundException.class)).thenReturn(wrapper4)
 
         //Allotted Resources-2
         //when(mockExecution.getVariable("vnfId")).thenReturn("eeb66c6f-36bd-47ad-8294-48f46b1aa912")
-        AAIResourceUri resourceUri5 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "1c7046f2-a5a3-4d7f-9da8-388ee641a795")
+        AAIResourceUri resourceUri5 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("1c7046f2-a5a3-4d7f-9da8-388ee641a795"))
         when(client.exists(resourceUri5)).thenReturn(true)
         AAIResultWrapper wrapper5 = new AAIResultWrapper(mockServiceProfile2())
         when(client.get(resourceUri5, NotFoundException.class)).thenReturn(wrapper5)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSliceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSliceTest.groovy
index e5799ec..0ac48ad 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSliceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateCoreSharedSliceTest.groovy
@@ -20,8 +20,6 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import static org.junit.Assert.*
-
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 import org.junit.Before
 import org.junit.Test
@@ -33,6 +31,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 import static org.mockito.Mockito.spy
 import static org.mockito.Mockito.times
@@ -137,7 +137,7 @@
 
         DoAllocateCoreSharedSlice obj = spy(DoAllocateCoreSharedSlice.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX")
+        AAIResourceUri resourceUri1 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("NSSI-C-7Q4-HDBNJ-NSSMF-01-A-ZX"))
         when(client.exists(resourceUri1)).thenReturn(true)
         AAIResultWrapper wrapper1 = new AAIResultWrapper(mockQuerySliceServiceReturn())
         when(client.get(resourceUri1, NotFoundException.class)).thenReturn(wrapper1)
@@ -145,27 +145,27 @@
         //networkServiceInstanceId
         when(mockExecution.getVariable("networkServiceInstanceId")).thenReturn("206535e7-77c9-4036-9387-3f1cf57b4379")
 
-        AAIResourceUri resourceUri2 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "206535e7-77c9-4036-9387-3f1cf57b4379")
+        AAIResourceUri resourceUri2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("206535e7-77c9-4036-9387-3f1cf57b4379"))
         when(client.exists(resourceUri2)).thenReturn(true)
         AAIResultWrapper wrapper2 = new AAIResultWrapper(mockQueryNS())
         when(client.get(resourceUri2, NotFoundException.class)).thenReturn(wrapper2)
 
         //Check Vnf
         when(mockExecution.getVariable("vnfId")).thenReturn("eeb66c6f-36bd-47ad-8294-48f46b1aa912")
-        AAIResourceUri resourceUri3 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "eeb66c6f-36bd-47ad-8294-48f46b1aa912")
+        AAIResourceUri resourceUri3 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("eeb66c6f-36bd-47ad-8294-48f46b1aa912"))
         when(client.exists(resourceUri3)).thenReturn(true)
         AAIResultWrapper wrapper3 = new AAIResultWrapper(mockQueryVnf())
         when(client.get(resourceUri3, NotFoundException.class)).thenReturn(wrapper3)
 
 
         //Allotted Resources-1
-        AAIResourceUri resourceUri4 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "0d3d3cce-46a8-486d-816a-954e71697c4e")
+        AAIResourceUri resourceUri4 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("0d3d3cce-46a8-486d-816a-954e71697c4e"))
         when(client.exists(resourceUri4)).thenReturn(true)
         AAIResultWrapper wrapper4 = new AAIResultWrapper(mockServiceProfile1())
         when(client.get(resourceUri4, NotFoundException.class)).thenReturn(wrapper4)
 
         //Allotted Resources-2
-        AAIResourceUri resourceUri5 = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "1c7046f2-a5a3-4d7f-9da8-388ee641a795")
+        AAIResourceUri resourceUri5 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("1c7046f2-a5a3-4d7f-9da8-388ee641a795"))
         when(client.exists(resourceUri5)).thenReturn(true)
         AAIResultWrapper wrapper5 = new AAIResultWrapper(mockServiceProfile2())
         when(client.get(resourceUri5, NotFoundException.class)).thenReturn(wrapper5)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateTnNssiTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateTnNssiTest.groovy
index 33110b6..6ea2be8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateTnNssiTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateTnNssiTest.groovy
@@ -29,6 +29,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 import static org.junit.Assert.assertNotNull
@@ -82,7 +84,7 @@
 //        String sliceProfile = jsonUtil.getJsonValue(mockSliceParams(), "sliceProfile")
 //        when(mockExecution.getVariable("sliceProfile")).thenReturn(sliceProfile)
 
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DoCreateTnNssiInstance obj = spy(DoCreateTnNssiInstance.class)
         when(obj.getAAIClient()).thenReturn(client)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSITest.groovy
index 5d29a72..2c943ff 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSITest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSITest.groovy
@@ -31,6 +31,8 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAISimpleUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.aai.entities.uri.ServiceInstanceUri
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 import org.onap.so.serviceinstancebeans.RequestDetails
@@ -65,8 +67,8 @@
 
         when(mockExecution.getVariable("currentNSSI")).thenReturn(currentNSSI)
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5G-999")
-        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "NS-777")
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("5G-999"))
+        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("NS-777"))
 
         ServiceInstance nssi = new ServiceInstance()
         nssi.setServiceInstanceId("5G-999")
@@ -94,7 +96,7 @@
         when(client.get(nssiUri)).thenReturn(wrapperMock)
         when(wrapperMock.getRelationships()).thenReturn(orsMock)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.SERVICE_INSTANCE)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.SERVICE_INSTANCE)).thenReturn(arus)
         when(client.get(ServiceInstance.class, aru)).thenReturn(networkServiceInstaneOpt)
 
         spy.getNetworkServiceInstance(mockExecution)
@@ -125,10 +127,10 @@
         GenericVnf genericVNF = new GenericVnf()
         genericVNF.setVnfId("VNF-1")
 
-        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, networkServiceInstance.getServiceInstanceId())
+        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(networkServiceInstance.getServiceInstanceId()))
 
         Optional<GenericVnf> genericVnfOpt = Optional.of(genericVNF)
-        AAIResourceUri genericVNFUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVNF.getVnfId())
+        AAIResourceUri genericVNFUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVNF.getVnfId()))
 
         currentNSSI.put("networkServiceInstanceUri", networkServiceInstanceUri)
         currentNSSI.put("networkServiceInstance", networkServiceInstance)
@@ -143,7 +145,7 @@
         when(client.get(networkServiceInstanceUri)).thenReturn(wrapperMock)
         when(wrapperMock.getRelationships()).thenReturn(orsMock)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.GENERIC_VNF)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.GENERIC_VNF)).thenReturn(arus)
         when(client.get(GenericVnf.class, genericVNFUri)).thenReturn(genericVnfOpt)
 
         spy.getConstituteVNFFromNetworkServiceInst(mockExecution)
@@ -239,7 +241,7 @@
 
         currentNSSI.put("nssi", nssi)
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
 
         DoCommonCoreNSSI spy = spy(DoCommonCoreNSSI.class)
 
@@ -293,7 +295,7 @@
         sliceProfile.setSNssai(theSNSSAI)
         sliceProfile.setProfileId("prof-id")
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
 
         currentNSSI.put("sliceProfileS-NSSAI", sliceProfile)
 
@@ -344,9 +346,9 @@
         nssi.setServiceInstanceId("5G-999")
         nssi.setOrchestrationStatus("orchestration-status")
 
-        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "networkServiceInstance.getServiceInstanceId()")
+        AAIResourceUri networkServiceInstanceUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(networkServiceInstance.getServiceInstanceId()))
 
-        AAIResourceUri cloudRegionAAIUri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, "cloud-owner", "cloud-region-id")
+        AAIResourceUri cloudRegionAAIUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion("cloud-owner", "cloud-region-id"))
 
         currentNSSI.put("networkServiceInstanceUri", networkServiceInstanceUri)
 
@@ -402,7 +404,7 @@
 
         currentNSSI.put("constituteVnf", genericVnf)
 
-        AAIResourceUri constituteVNFURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnf.getVnfId())
+        AAIResourceUri constituteVNFURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnf.getVnfId()))
 
         currentNSSI.put("constituteVnfUri", constituteVNFURI)
 
@@ -444,7 +446,7 @@
         AAIResourceUri aru = new AAISimpleUri(cloudRegionAAIUri)
         arus.add(aru)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.PROJECT)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.PROJECT)).thenReturn(arus)
 
         Optional<Project> projectOpt = Optional.of(project)
 
@@ -470,7 +472,7 @@
         AAIResourceUri aru = new AAISimpleUri(networkServiceInstanceUri)
         arus.add(aru)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.OWNING_ENTITY)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.OWNING_ENTITY)).thenReturn(arus)
 
         Optional<OwningEntity> owningEntityOpt = Optional.of(owningEntity)
 
@@ -492,7 +494,7 @@
         AAIResourceUri aru = new AAISimpleUri(cloudRegionAAIUri)
         arus.add(aru)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.CLOUD_REGION)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.CLOUD_REGION)).thenReturn(arus)
 
         CloudRegion cloudRegion = new CloudRegion()
         cloudRegion.setCloudRegionId("cloud-region-id")
@@ -518,14 +520,14 @@
         when(client.get(networkServiceInstanceUri)).thenReturn(wrapperMock)
         when(wrapperMock.getRelationships()).thenReturn(orsMock)
 
-        AAIResourceUri serviceSubscriptionUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_SUBSCRIPTION, "global-customer-id", "service-type")
+        AAIResourceUri serviceSubscriptionUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("global-customer-id").serviceSubscription("service-type"))
 
-        AAIResourceUri customerUri = AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, "global-customer-id")
+        AAIResourceUri customerUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("global-customer-id"))
         List<AAIResourceUri> arus = new ArrayList<>()
 
         arus.add(serviceSubscriptionUri)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.SERVICE_SUBSCRIPTION)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.SERVICE_SUBSCRIPTION)).thenReturn(arus)
 
         ServiceSubscription serviceSubscription = new ServiceSubscription()
         serviceSubscription.setServiceType("service-type")
@@ -535,7 +537,7 @@
 
         when(client.get(networkServiceInstanceUri)).thenReturn(wrapperMock)
 
-        when(rsMock.getRelatedAAIUris(AAIObjectType.CUSTOMER)).thenReturn(arus)
+        when(rsMockgetRelatedUris(Types.CUSTOMER)).thenReturn(arus)
 
         Customer customer = new Customer()
         customer.setSubscriberName("subscriber-name")
@@ -553,7 +555,7 @@
 
         Optional<ModelVer> modelVerOpt = Optional.of(modelVer)
 
-        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, networkServiceInstance.getModelInvariantId(), networkServiceInstance.getModelVersionId())
+        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(networkServiceInstance.getModelInvariantId()).modelVer(networkServiceInstance.getModelVersionId()))
         when(client.get(ModelVer.class, modelVerUrl)).thenReturn(modelVerOpt)
     }
 
@@ -565,7 +567,7 @@
 
         Optional<ModelVer> modelVerOpt = Optional.of(modelVer)
 
-        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, genericVnf.getModelInvariantId(), genericVnf.getModelVersionId())
+        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(genericVnf.getModelInvariantId()).modelVer(genericVnf.getModelVersionId()))
         when(client.get(ModelVer.class, modelVerUrl)).thenReturn(modelVerOpt)
     }
 
@@ -577,7 +579,7 @@
 
         Optional<ModelVer> modelVerOpt = Optional.of(modelVer)
 
-        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIObjectType.MODEL_VER, vfModule.getModelInvariantId(), vfModule.getModelVersionId())
+        AAIResourceUri modelVerUrl = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().model(vfModule.getModelInvariantId()).modelVer(vfModule.getModelVersionId()))
         when(client.get(ModelVer.class, modelVerUrl)).thenReturn(modelVerOpt)
     }
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
index 32ebf09..0de2c8c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
@@ -35,6 +35,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import javax.ws.rs.NotFoundException
 import static org.junit.Assert.assertEquals
 import static org.mockito.ArgumentMatchers.isA
@@ -65,8 +67,8 @@
         when(mockExecution.getVariable("serviceId")).thenReturn("SER12345")
         doNothing().when(client).connect(isA(AAIResourceUri.class),isA(AAIResourceUri.class))
         doCreateVFCNetworkServiceInstance.addNSRelationship(mockExecution);
-        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,"MSO_dev","MSO-dev-service-type","NS12345")
-        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,"MSO_dev","MSO-dev-service-type","SER12345")
+        AAIResourceUri nsUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("MSO_dev").serviceSubscription("MSO-dev-service-type").serviceInstance("NS12345"))
+        AAIResourceUri relatedServiceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("MSO_dev").serviceSubscription("MSO-dev-service-type").serviceInstance("SER12345"))
         Mockito.verify(client).connect(nsUri,relatedServiceUri)
     }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
index b2573f1..1a15f0e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
@@ -43,11 +43,12 @@
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.mock.FileUtil
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException
 
 import javax.ws.rs.NotFoundException
@@ -169,7 +170,7 @@
         fqdnList.add("test")
         when(mockExecution.getVariable(prefix + "createdNetworkPolicyFqdnList")).thenReturn(fqdnList)
 
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         NetworkPolicies networkPolicies = new NetworkPolicies();
         NetworkPolicy networkPolicy = new NetworkPolicy();
@@ -177,7 +178,7 @@
         networkPolicies.getNetworkPolicy().add(networkPolicy)
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
 
-        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicy.getNetworkPolicyId())
+        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicy.getNetworkPolicyId()))
         doNothing().when(client).delete(delUri)
 
         doCreateVfModuleRollback.deleteNetworkPoliciesFromAAI(mockExecution)
@@ -199,7 +200,7 @@
         fqdnList.add("test")
         when(mockExecution.getVariable(prefix + "createdNetworkPolicyFqdnList")).thenReturn(fqdnList)
 
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         NetworkPolicies networkPolicies = new NetworkPolicies();
         NetworkPolicy networkPolicy = new NetworkPolicy();
@@ -207,7 +208,7 @@
         networkPolicies.getNetworkPolicy().add(networkPolicy)
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
 
-        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicy.getNetworkPolicyId())
+        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicy.getNetworkPolicyId()))
         doThrow(new NotFoundException("Not Found!")).when(client).delete(delUri)
 
         doCreateVfModuleRollback.deleteNetworkPoliciesFromAAI(mockExecution)
@@ -229,7 +230,7 @@
         fqdnList.add("test")
         when(mockExecution.getVariable(prefix + "createdNetworkPolicyFqdnList")).thenReturn(fqdnList)
 
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         NetworkPolicies networkPolicies = new NetworkPolicies();
         NetworkPolicy networkPolicy = new NetworkPolicy();
@@ -237,7 +238,7 @@
         networkPolicies.getNetworkPolicy().add(networkPolicy)
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
 
-        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicy.getNetworkPolicyId())
+        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicy.getNetworkPolicyId()))
         doThrow(new GraphInventoryUriComputationException("Error!")).when(client).delete(delUri)
         try {
             doCreateVfModuleRollback.deleteNetworkPoliciesFromAAI(mockExecution)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollbackTest.groovy
index cc52254..1bc6fc5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollbackTest.groovy
@@ -20,20 +20,18 @@
 
 package org.onap.so.bpmn.infrastructure.scripts;
 
-import org.junit.Before;
-import org.junit.Test
-import org.onap.aai.domain.yang.VfModule
-import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.aai.domain.yang.VolumeGroups;
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.constants.Defaults
-
 import static org.mockito.Mockito.spy
 import static org.mockito.Mockito.when;
+import org.junit.Before;
+import org.junit.Test
+import org.onap.aai.domain.yang.VolumeGroup
+import org.onap.aai.domain.yang.VolumeGroups;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.constants.Defaults
 
 public class DoCreateVfModuleVolumeRollbackTest extends MsoGroovyTest {
 
@@ -51,7 +49,7 @@
         String cloudRegionId = "cloudRegionId"
         when(mockExecution.getVariable("DCVFMODVOLRBK_volumeGroupName")).thenReturn(volumeGroupName)
         when(mockExecution.getVariable("DCVFMODVOLRBK_lcpCloudRegionId")).thenReturn(cloudRegionId)
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegionId).queryParam("volume-group-name", volumeGroupName)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), cloudRegionId).volumeGroups()).queryParam("volume-group-name", volumeGroupName)
         VolumeGroup volumeGroup = new VolumeGroup();
         volumeGroup.setVolumeGroupId("volumeGroupId")
         VolumeGroups groups = new VolumeGroups();
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
index 7aa162c..d417abc 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
@@ -20,31 +20,6 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.rules.ExpectedException
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.onap.aai.domain.yang.GenericVnf
-import org.onap.aai.domain.yang.Volume
-import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.aai.domain.yang.VolumeGroups
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.constants.Defaults
-
 import static org.junit.Assert.assertEquals
 import static org.junit.Assert.assertNotNull
 import static org.mockito.ArgumentMatchers.anyObject
@@ -52,6 +27,26 @@
 import static org.mockito.Mockito.times
 import static org.mockito.Mockito.verify
 import static org.mockito.Mockito.when
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.onap.aai.domain.yang.GenericVnf
+import org.onap.aai.domain.yang.VolumeGroup
+import org.onap.aai.domain.yang.VolumeGroups
+import org.onap.aaiclient.client.aai.AAIObjectType
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.constants.Defaults
 
 
 class DoCreateVfModuleVolumeV2Test extends MsoGroovyTest {
@@ -161,7 +156,7 @@
 		String lcpCloudRegionId = "lcpCloudRegionId"
 		when(mockExecution.getVariable(volumeGroupName)).thenReturn(volumeGroupName)
 		when(mockExecution.getVariable(lcpCloudRegionId)).thenReturn(lcpCloudRegionId)
-		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), lcpCloudRegionId).queryParam("volume-group-name", volumeGroupName)
+		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), lcpCloudRegionId).volumeGroups()).queryParam("volume-group-name", volumeGroupName)
 		VolumeGroups volumeGroups = new VolumeGroups();
 		VolumeGroup volumeGroup = new  VolumeGroup()
 		volumeGroup.setVolumeGroupId("volumeGroupId")
@@ -177,7 +172,7 @@
 		String lcpCloudRegionId = "lcpCloudRegionId"
 		when(mockExecution.getVariable(volumeGroupName)).thenReturn(volumeGroupName)
 		when(mockExecution.getVariable(lcpCloudRegionId)).thenReturn(lcpCloudRegionId)
-		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), lcpCloudRegionId).queryParam("volume-group-name", volumeGroupName)
+		AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), lcpCloudRegionId).volumeGroups()).queryParam("volume-group-name", volumeGroupName)
 		when(client.get(VolumeGroup.class,uri)).thenReturn(Optional.empty())
 		thrown.expect(BpmnError.class)
 		doCreateVfModuleVolumeV2.callRESTQueryAAIVolGrpName(mockExecution,null)
@@ -215,7 +210,7 @@
 	void testcallRESTQueryAAIGenericVnf(){
 		String vnfId = "vnfId"
 		when(mockExecution.getVariable(vnfId)).thenReturn(vnfId)
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 		GenericVnf genericVnf = new GenericVnf()
 		genericVnf.setVnfId(vnfId)
 		when(client.get(GenericVnf.class,uri)).thenReturn(Optional.of(genericVnf))
@@ -227,7 +222,7 @@
 	void testcallRESTQueryAAIGenericVnf_NotFound(){
 		String vnfId = "vnfId"
 		when(mockExecution.getVariable(vnfId)).thenReturn(vnfId)
-		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
 		when(client.get(GenericVnf.class,uri)).thenReturn(Optional.empty())
 		thrown.expect(BpmnError.class)
 		doCreateVfModuleVolumeV2.callRESTQueryAAIGenericVnf(mockExecution,null)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2Test.groovy
index a3b2a1c..2cb351c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2Test.groovy
@@ -20,19 +20,20 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.when
+import javax.ws.rs.core.UriBuilder
 import org.junit.Before
 import org.junit.Test
 import org.mockito.Mockito
 import org.mockito.Spy
 import org.onap.aai.domain.yang.AllottedResource
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.so.bpmn.mock.FileUtil
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import javax.ws.rs.core.UriBuilder
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.when
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.mock.FileUtil
 
 class DoCustomDeleteE2EServiceInstanceV2Test extends MsoGroovyTest {
 
@@ -49,7 +50,7 @@
     void testPrepareServiceDeleteResource(){
         when(mockExecution.getVariable("serviceInstance")).thenReturn(FileUtil.readResourceFile("__files/AAI/ServiceInstanceWithAR.json"))
         def relink = "/aai/v11/business/customers/customer/testCustIdInfra/service-subscriptions/service-subscription/HNPORTAL/service-instances/service-instance/testServiceInstanceIdPortalPri/allotted-resources/allotted-resource/testAllottedResourceIdPortalPri"
-        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.ALLOTTED_RESOURCE, UriBuilder.fromPath(relink).build())
+        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.ALLOTTED_RESOURCE, UriBuilder.fromPath(relink).build())
         AllottedResource ar = new AllottedResource();
         ar.setId("ar1")
         ar.setType("ar")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy
index 4a23e80..eae7886 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy
@@ -29,6 +29,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 import static org.junit.Assert.assertNotNull
@@ -229,8 +231,8 @@
         currentNSSI.put("nssiId", nssiId)
         currentNSSI.put("nsiId", nsiId)
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
-        AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nsiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
+        AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nsiId))
 
         doNothing().when(client).disconnect(nssiUri, nsiUri)
 
@@ -249,7 +251,7 @@
 
         currentNSSI.put("nssiId", nssiId)
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
 
         DoDeallocateCoreNSSI spy = spy(DoDeallocateCoreNSSI.class)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSITest.groovy
index 88140d8..852f053 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSITest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSITest.groovy
@@ -38,6 +38,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 
 import javax.ws.rs.core.Response
 
@@ -137,7 +139,7 @@
         currentNSSI.put("serviceType","5G")
         when(mockExecution.getVariable("currentNSSI")).thenReturn(currentNSSI)
 
-        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, "5GCustomer", "5G", "5G-999", "ddf57704-fe8d-417b-882d-2f2a12ddb225")
+        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5G-999").sliceProfile("ddf57704-fe8d-417b-882d-2f2a12ddb225"))
         DoDeallocateNSSI obj = spy(DoDeallocateNSSI.class)
         when(obj.getAAIClient()).thenReturn(client)
         when(client.exists(profileUri)).thenReturn(true)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssiTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssiTest.groovy
index eac79a9..31bd3b5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssiTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssiTest.groovy
@@ -29,12 +29,15 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 import static org.junit.Assert.assertNotNull
 import static org.mockito.ArgumentMatchers.eq
 import static org.mockito.Mockito.*
 
+
 class DoDeallocateTnNssiTest extends MsoGroovyTest {
     @Before
     void init() throws IOException {
@@ -124,7 +127,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("5G")
 
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DoDeallocateTnNssi obj = spy(DoDeallocateTnNssi.class)
         when(obj.getAAIClient()).thenReturn(client)
         doNothing().when(client).delete(serviceInstanceUri)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
index 3b172f3..8510611 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
@@ -45,6 +45,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.so.constants.Defaults
 
@@ -1609,7 +1611,7 @@
             Relationship relationship = new Relationship();
             relationship.setRelatedTo("vf-module")
             l3Network.getRelationshipList().getRelationship().add(relationship)
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ALL)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ALL)
             when(client.get(L3Network.class,uri)).thenReturn(Optional.of(l3Network))
 
 			doDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
@@ -1643,7 +1645,7 @@
 			DoDeleteNetworkInstance doDeleteNetworkInstance = spy(DoDeleteNetworkInstance.class)
 			when(doDeleteNetworkInstance.getAAIClient()).thenReturn(client)
 			L3Network l3Network = getL3Network()
-            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ALL)
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ALL)
 			when(client.get(L3Network.class,uri)).thenReturn(Optional.of(l3Network))
 			doDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
 
@@ -1681,7 +1683,7 @@
         relationship.setRelatedLink("http://localhost:18080/cloud-regions/cloud-region/" + Defaults.CLOUD_OWNER.toString() + "/lcpCloudRegion/")
         relationshipList.getRelationship().add(relationship)
         l3Network.setRelationshipList(relationshipList)
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ALL)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)).depth(Depth.ALL)
         when(client.get(L3Network.class,uri)).thenReturn(Optional.of(l3Network))
         doDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceServiceTest.groovy
index 9dbb6a5..7b65d16 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceServiceTest.groovy
@@ -19,6 +19,14 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.junit.Assert.assertNotNull
+import static org.junit.Assert.assertTrue
+import static org.mockito.ArgumentMatchers.eq
+import static org.mockito.Mockito.spy
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 import org.junit.Before
 import org.junit.Test
@@ -26,23 +34,13 @@
 import org.mockito.Captor
 import org.mockito.Mockito
 import org.onap.aai.domain.yang.ServiceInstance
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.NotFoundException
-
-import static org.junit.Assert.assertEquals
-import static org.junit.Assert.assertNotNull
-import static org.junit.Assert.assertTrue
-import static org.mockito.ArgumentMatchers.eq
-import static org.mockito.Mockito.doNothing
-import static org.mockito.Mockito.spy
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.verify
-import static org.mockito.Mockito.when
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 class DoDeleteSliceServiceTest extends MsoGroovyTest {
     @Before
@@ -73,7 +71,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockQuerySliceServiceReturn())
@@ -92,8 +90,9 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE_ALL, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
-        DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be").allottedResources())
+            DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockQueryAllottedResource())
         when(obj.getAAIClient()).thenReturn(client)
@@ -111,7 +110,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5G-888")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5G-888"))
         DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockNSIReturn())
@@ -133,7 +132,7 @@
         when(mockExecution.getVariable("globalSubscriberId")).thenReturn("5GCustomer")
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5G-999")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5G-999"))
         DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockNSSIReturn())
@@ -181,7 +180,8 @@
         when(mockExecution.getVariable("serviceType")).thenReturn("5G")
 
         AAIResultWrapper wrapper = new AAIResultWrapper(mockSliceProfile())
-        AAIResourceUri profileUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE_ALL, "5GCustomer", "5G", "5G-999")
+        AAIPluralResourceUri profileUri = AAIUriFactory.createResourceUri(
+            AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5G-999").sliceProfiles())
 
         DoDeleteSliceService obj = spy(DoDeleteSliceService.class)
         when(obj.getAAIClient()).thenReturn(client)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstanceTest.groovy
index 0251eab..3780d42 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstanceTest.groovy
@@ -20,24 +20,17 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import static org.mockito.ArgumentMatchers.isA
+import static org.mockito.Mockito.doThrow
+import static org.mockito.Mockito.spy
+import static org.mockito.Mockito.when
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.junit.Before
 import org.junit.Rule
 import org.junit.Test
 import org.junit.rules.ExpectedException
-import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.aai.domain.yang.VolumeGroups
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.constants.Defaults
-
-import static org.mockito.ArgumentMatchers.isA
-import static org.mockito.Mockito.doThrow
-import static org.mockito.Mockito.spy
-import static org.mockito.Mockito.when
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 public class DoDeleteVFCNetworkServiceInstanceTest extends MsoGroovyTest {
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
index daf005e..da68a21 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
@@ -42,11 +42,12 @@
 import org.onap.aai.domain.yang.NetworkPolicy
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 import org.onap.so.bpmn.core.WorkflowException
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 
 import static com.github.tomakehurst.wiremock.client.WireMock.*
@@ -106,7 +107,7 @@
         List fqdnList = new ArrayList()
         fqdnList.add("test")
         when(mockExecution.getVariable("DDVFMV_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         NetworkPolicies networkPolicies = new NetworkPolicies();
         NetworkPolicy networkPolicy = new NetworkPolicy();
@@ -114,7 +115,7 @@
         networkPolicies.getNetworkPolicy().add(networkPolicy)
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
 
-        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicy.getNetworkPolicyId())
+        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicy.getNetworkPolicyId()))
         doNothing().when(client).delete(delUri)
         deleteVfModuleFromVnf.deleteNetworkPoliciesFromAAI(mockExecution)
 
@@ -128,7 +129,7 @@
         List fqdnList = new ArrayList()
         fqdnList.add("test")
         when(mockExecution.getVariable("DDVFMV_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.empty())
         deleteVfModuleFromVnf.deleteNetworkPoliciesFromAAI(mockExecution)
@@ -142,7 +143,7 @@
     void testQueryAAIForVfModule() {
         ExecutionEntity mockExecution = setupMock()
         when(mockExecution.getVariable("vnfId")).thenReturn("12345")
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "12345").depth(Depth.ONE)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("12345")).depth(Depth.ONE)
         GenericVnf genericVnf = new GenericVnf()
         genericVnf.setVnfId("test1")
         when(client.get(GenericVnf.class, uri)).thenReturn(Optional.of(genericVnf))
@@ -156,7 +157,7 @@
     void testQueryAAIForVfModuleNotFound() {
         ExecutionEntity mockExecution = setupMock()
         when(mockExecution.getVariable("vnfId")).thenReturn("12345")
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "12345").depth(Depth.ONE)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("12345")).depth(Depth.ONE)
         when(client.get(GenericVnf.class, uri)).thenReturn(Optional.empty())
         deleteVfModuleFromVnf.queryAAIForVfModule(mockExecution)
         Mockito.verify(mockExecution, atLeastOnce()).setVariable("DDVMFV_getVnfResponseCode", 404)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
index 0e47958..5882f73 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
@@ -20,15 +20,14 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
-import com.github.tomakehurst.wiremock.junit.WireMockRule
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+import javax.ws.rs.NotFoundException
 import org.camunda.bpm.engine.ProcessEngineServices
 import org.camunda.bpm.engine.RepositoryService
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Assert
 import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.mockito.ArgumentCaptor
@@ -40,21 +39,13 @@
 import org.onap.aai.domain.yang.NetworkPolicies
 import org.onap.aai.domain.yang.NetworkPolicy
 import org.onap.aai.domain.yang.VfModule
-import org.onap.aai.domain.yang.VfModules
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.so.bpmn.common.scripts.utils.XmlComparator
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.mock.FileUtil
-import org.onap.aaiclient.client.aai.AAIObjectPlurals
-import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.NotFoundException
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*
-import static org.mockito.Mockito.*
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.mock.FileUtil
 
 @RunWith(MockitoJUnitRunner.class)
 class DoDeleteVfModuleTest extends MsoGroovyTest{
@@ -105,7 +96,7 @@
         NetworkPolicy networkPolicy = new NetworkPolicy()
         networkPolicy.setNetworkPolicyId("NP1")
         networkPolicies.getNetworkPolicy().add(networkPolicy)
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
         doDeleteVfModule.deleteNetworkPoliciesFromAAI(mockExecution)
@@ -121,10 +112,10 @@
         NetworkPolicy networkPolicy = new NetworkPolicy()
         networkPolicy.setNetworkPolicyId("NP1")
         networkPolicies.getNetworkPolicy().add(networkPolicy)
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies())
         uri.queryParam("network-policy-fqdn", "test")
         when(client.get(NetworkPolicies.class, uri)).thenReturn(Optional.of(networkPolicies))
-        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, "NP1")
+        AAIResourceUri delUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy("NP1"))
         doThrow(new NotFoundException(("Not Found !"))).when(client).delete(delUri)
         doDeleteVfModule.deleteNetworkPoliciesFromAAI(mockExecution)
         Mockito.verify(client).delete(delUri)
@@ -135,7 +126,7 @@
         when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
         when(mockExecution.getVariable("vnfId")).thenReturn("12345")
         when(mockExecution.getVariable("vfModuleId")).thenReturn("module-0")
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE,"12345","module-0")
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("12345").vfModule("module-0"))
         VfModule vfModule = new VfModule()
         vfModule.setOrchestrationStatus("Created")
         when(client.get(VfModule.class, uri)).thenReturn(Optional.of(vfModule))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
index dd8601f..84d88ff 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
@@ -53,6 +53,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException
 import org.springframework.core.env.Environment
 import org.springframework.mock.env.MockEnvironment
@@ -182,7 +184,7 @@
         when(mockExecution.getVariable("tenantId")).thenReturn("Tenant123")
         when(mockExecution.getVariable("volumeGroupId")).thenReturn("VolumeGroup123")
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/AAI/VolumeGroupWithTenant.json");
         when(client.get(VolumeGroup.class,resourceUri)).thenReturn(volumeGroup)
         when(client.get(resourceUri)).thenReturn(
@@ -197,7 +199,7 @@
         when(mockExecution.getVariable("tenantId")).thenReturn("Tenant123")
         when(mockExecution.getVariable("volumeGroupId")).thenReturn("VolumeGroup123")
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/aai/VolumeGroup.json");
         when(client.get(VolumeGroup.class,resourceUri)).thenReturn(volumeGroup)
         try {
@@ -212,7 +214,7 @@
         when(mockExecution.getVariable("tenantId")).thenReturn("Tenant12345")
         when(mockExecution.getVariable("volumeGroupId")).thenReturn("VolumeGroup123")
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/AAI/VolumeGroupWithTenant.json");
         when(client.get(VolumeGroup.class,resourceUri)).thenReturn(volumeGroup)
         try {
@@ -227,7 +229,7 @@
         when(mockExecution.getVariable("tenantId")).thenReturn("Tenant123")
         when(mockExecution.getVariable("volumeGroupId")).thenReturn("VolumeGroup123")
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         when(client.get(VolumeGroup.class,resourceUri)).thenReturn(Optional.empty())
         try {
             deleteVfModuleVolumeV2.callRESTQueryAAIForVolumeGroup(mockExecution, "true")
@@ -241,7 +243,7 @@
         when(mockExecution.getVariable("tenantId")).thenReturn("Tenant123")
         when(mockExecution.getVariable("volumeGroupId")).thenReturn("VolumeGroup123")
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/aai/VolumeGroupWithVfModule.json");
         when(client.get(VolumeGroup.class,resourceUri)).thenReturn(volumeGroup)
         try {
@@ -256,7 +258,7 @@
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/aai/VolumeGroup.json");
         when(mockExecution.getVariable("DDVMV_queryAAIVolGrpResponse")).thenReturn(volumeGroup.get())
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         doNothing().when(client).delete(resourceUri)
         deleteVfModuleVolumeV2.callRESTDeleteAAIVolumeGroup(mockExecution,"true")
     }
@@ -266,7 +268,7 @@
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/aai/VolumeGroupWithVfModule.json");
         when(mockExecution.getVariable("DDVMV_queryAAIVolGrpResponse")).thenReturn(volumeGroup.get())
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1",volumeGroup.get().getVolumeGroupId())
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup(volumeGroup.get()).getVolumeGroupId())
         doThrow(new GraphInventoryUriComputationException("Error")).when(client).delete(resourceUri)
         try {
             deleteVfModuleVolumeV2.callRESTDeleteAAIVolumeGroup(mockExecution, "true")
@@ -280,7 +282,7 @@
         Optional<VolumeGroup> volumeGroup = getAAIObjectFromJson(VolumeGroup.class,"__files/aai/VolumeGroup.json");
         when(mockExecution.getVariable("DDVMV_queryAAIVolGrpResponse")).thenReturn(volumeGroup.get())
         when(mockExecution.getVariable("DDVMV_aicCloudRegion")).thenReturn("Region1")
-        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,CLOUD_OWNER, "Region1","VolumeGroup123")
+        AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(CLOUD_OWNER, "Region1").volumeGroup("VolumeGroup123"))
         doThrow(new NotFoundException("VolumeGroup Not found")).when(client).delete(resourceUri)
         try {
             deleteVfModuleVolumeV2.callRESTDeleteAAIVolumeGroup(mockExecution, "true")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
index 2da6eca..e85b813 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
@@ -42,6 +42,8 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException
 import static com.github.tomakehurst.wiremock.client.WireMock.*
@@ -99,7 +101,7 @@
     @Test
     public void testQueryAAIVfModuleNullEndPoint() {
         when(mockExecution.getVariable("vnfId")).thenReturn("12345")
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "12345").depth(Depth.ONE)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("12345")).depth(Depth.ONE)
         doThrow(new GraphInventoryUriComputationException("Error in AAI")).when(client).get(GenericVnf.class,uri)
         try {
             doDeleteVnfAndModules.queryAAIVfModule(mockExecution)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSITest.groovy
index a3c2b46..bbc237f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSITest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyCoreNSSITest.groovy
@@ -30,6 +30,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 import static org.junit.Assert.assertNotNull
@@ -180,7 +182,7 @@
         currentNSSI.put("nssiId", nssiId)
         currentNSSI.put("sliceProfileId", sliceProfileId)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiId, sliceProfileId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiId).sliceProfile(sliceProfileId))
 
         SliceProfile sliceProfile = new SliceProfile()
         sliceProfile.setProfileId(sliceProfileId)
@@ -213,8 +215,8 @@
         String globalSubscriberId = "globalSubscriberId"
         String serviceType = "serviceType"
 
-        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiId)
-        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, globalSubscriberId, serviceType, nssiId, sliceProfileId)
+        AAIResourceUri nssiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nssiId))
+        AAIResourceUri sliceProfileUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(nssiId).sliceProfile(sliceProfileId))
 
         currentNSSI.put("globalSubscriberId", globalSubscriberId)
         currentNSSI.put("serviceType", serviceType)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssiTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssiTest.groovy
index bbbec3b..ef106f8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssiTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyTnNssiTest.groovy
@@ -29,12 +29,15 @@
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.common.scripts.MsoGroovyTest
 
 import static org.junit.Assert.assertNotNull
 import static org.mockito.ArgumentMatchers.eq
 import static org.mockito.Mockito.*
 
+
 class DoModifyTnNssiTest extends MsoGroovyTest {
     @Before
     void init() throws IOException {
@@ -80,7 +83,7 @@
         when(mockExecution.getVariable("modelUuid")).thenReturn("36a3a8ea-49a6-4ac8-b06c-89a54544b9b6")
         when(mockExecution.getVariable("sliceProfile")).thenReturn(mockSliceProfile())
 
-        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "5GCustomer", "5G", "5ad89cf9-0569-4a93-9306-d8324321e2be")
+        AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("5GCustomer").serviceSubscription("5G").serviceInstance("5ad89cf9-0569-4a93-9306-d8324321e2be"))
         DoModifyTnNssi obj = spy(DoModifyTnNssi.class)
         when(obj.getAAIClient()).thenReturn(client)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
index bf877bd..e2010ce 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -23,6 +23,8 @@
 package org.onap.so.bpmn.infrastructure.scripts
 
 
+import static org.mockito.Mockito.*
+import javax.ws.rs.core.UriBuilder
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
 import org.junit.Assert
@@ -38,18 +40,16 @@
 import org.onap.aai.domain.yang.GenericVnf
 import org.onap.aai.domain.yang.VfModule
 import org.onap.aai.domain.yang.VolumeGroup
-import org.onap.so.bpmn.common.scripts.MsoGroovyTest
-import org.onap.so.bpmn.mock.FileUtil
 import org.onap.aaiclient.client.aai.AAIObjectType
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.mock.FileUtil
 import org.onap.so.constants.Defaults
 
-import javax.ws.rs.core.UriBuilder
-
-import static org.mockito.Mockito.*
-
 @RunWith(MockitoJUnitRunner.Silent.class)
 class UpdateVfModuleVolumeInfraV1Test extends MsoGroovyTest{
 
@@ -79,7 +79,7 @@
 
         UpdateVfModuleVolumeInfraV1 obj = spy(UpdateVfModuleVolumeInfraV1.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.VF_MODULE, UriBuilder.fromPath("/aai/v8/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module/12345").build())
+        AAIResourceUri uri = AAIUriFactory.createResourceFromExistingURI(Types.VF_MODULE, UriBuilder.fromPath("/aai/v8/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module/12345").build())
         VfModule vfModule = new VfModule();
         vfModule.setVfModuleId("12345")
         vfModule.setModelInvariantId("ff5256d2-5a33-55df-13ab-12abad84e7ff")
@@ -98,7 +98,7 @@
 
         UpdateVfModuleVolumeInfraV1 obj = spy(UpdateVfModuleVolumeInfraV1.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
         VolumeGroup volumeGroup = new VolumeGroup();
         volumeGroup.setVolumeGroupId(volumeGroupId)
 
@@ -116,7 +116,7 @@
         UpdateVfModuleVolumeInfraV1 obj = spy(UpdateVfModuleVolumeInfraV1.class)
         when(obj.getAAIClient()).thenReturn(client)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
         GenericVnf genericVnf = new GenericVnf()
         genericVnf.setVnfId(vnfId)
         genericVnf.setVnfName("testvnfName")
@@ -133,7 +133,7 @@
         UpdateVfModuleVolumeInfraV1 obj = spy(UpdateVfModuleVolumeInfraV1.class)
         when(obj.getAAIClient()).thenReturn(client)
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
         when(client.get(GenericVnf.class,uri)).thenReturn(Optional.empty())
         thrown.expect(BpmnError.class)
         obj.queryAAIForGenericVnf(mockExecution, "true")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeTest.groovy
index 6a8465e..a505a7c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeTest.groovy
@@ -42,6 +42,8 @@
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.constants.Defaults
 
 import javax.ws.rs.core.UriBuilder
@@ -75,7 +77,7 @@
 
         UpdateVfModuleVolume obj = spy(UpdateVfModuleVolume.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
         VolumeGroup volumeGroup = new VolumeGroup();
         volumeGroup.setVolumeGroupId(volumeGroupId)
 
@@ -94,7 +96,7 @@
 
         UpdateVfModuleVolume obj = spy(UpdateVfModuleVolume.class)
         when(obj.getAAIClient()).thenReturn(client)
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), aicCloudRegion, volumeGroupId)
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(Defaults.CLOUD_OWNER.toString(), aicCloudRegion).volumeGroup(volumeGroupId))
         VolumeGroup volumeGroup = new VolumeGroup();
         volumeGroup.setVolumeGroupId(volumeGroupId)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
index d7f7547..a385143 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
@@ -22,27 +22,26 @@
 
 package org.onap.so.bpmn.vcpe.scripts
 
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.*
-import org.mockito.MockitoAnnotations
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.mock.FileUtil
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.core.UriBuilder
-
 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
 import static com.github.tomakehurst.wiremock.client.WireMock.put
 import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
 import static org.junit.Assert.*
 import static org.mockito.Mockito.*
 import static org.onap.so.bpmn.mock.StubResponseAAI.*
+import javax.ws.rs.core.UriBuilder
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.*
+import org.mockito.MockitoAnnotations
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import com.github.tomakehurst.wiremock.junit.WireMockRule
 
 class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
 
@@ -157,7 +156,7 @@
     public void createAaiAR() {
         ExecutionEntity mockExecution = setupMock()
         AAIResourcesClient client = mock(AAIResourcesClient.class)
-        when(mockExecution.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
+        when(mockExecution.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
         when(mockExecution.getVariable("CSI_resourceLink")).thenReturn("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST)
         when(mockExecution.getVariable("allottedResourceModelInfo")).thenReturn("{\n" +
                 "  \"modelInvariantUuid\":\"modelInvariantUuid\",\n" +
@@ -843,7 +842,7 @@
         when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
         when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
         when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
-        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
+        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
         when(mex.getVariable("allottedResourceType")).thenReturn("BRGt")
         when(mex.getVariable("allottedResourceRole")).thenReturn("BRGr")
         when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/mycsi")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
index 2a68947..0e2c01a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
@@ -22,28 +22,25 @@
 
 package org.onap.so.bpmn.vcpe.scripts
 
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.*
-import org.mockito.MockitoAnnotations
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.mock.FileUtil
-import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-
-import javax.ws.rs.core.UriBuilder
-
 import static org.junit.Assert.*
 import static org.mockito.Mockito.*
 import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
 import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
 import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource
 import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource_500
-
+import javax.ws.rs.core.UriBuilder
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.*
+import org.mockito.MockitoAnnotations
+import org.onap.aaiclient.client.aai.AAIResourcesClient
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types
 import org.onap.so.bpmn.core.RollbackData
-
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
 import com.github.tomakehurst.wiremock.junit.WireMockRule
 
 class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
@@ -157,7 +154,7 @@
     public void createAaiAR() {
         ExecutionEntity mex = setupMock()
         initCreateAaiAr(mex)
-        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
+        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
         when(mex.getVariable("CSI_resourceLink")).thenReturn("/aai/v9/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST)
         when(mex.getVariable("allottedResourceModelInfo")).thenReturn("{\n" +
                 "  \"modelInvariantUuid\":\"modelInvariantUuid\",\n" +
@@ -788,7 +785,7 @@
         when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
         when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
         when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
-        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
+        when(mex.getVariable("PSI_resourceLink")).thenReturn(AAIUriFactory.createResourceFromExistingURI(Types.SERVICE_INSTANCE, UriBuilder.fromPath("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST).build()))
         when(mex.getVariable("allottedResourceType")).thenReturn("TXCt")
         when(mex.getVariable("allottedResourceRole")).thenReturn("TXCr")
         when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/mycsi")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResourcesTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResourcesTest.java
index 978814b..ddc30f8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResourcesTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResourcesTest.java
@@ -35,12 +35,12 @@
 import org.junit.runner.RunWith;
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 
 @RunWith(MockitoJUnitRunner.class)
 public class AAICreateResourcesTest {
@@ -87,7 +87,8 @@
 
         aaiCreateResources.createAAIProject(projectName, serviceInstanceId);
 
-        AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, projectName);
+        AAIResourceUri projectURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(projectName));
 
         verify(aaiResourcesClient, times(1)).createIfNotExists(projectURI, Optional.empty());
         verify(aaiResourcesClient, times(1)).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
@@ -103,7 +104,8 @@
 
         HashMap<String, String> owningEntityMap = new HashMap<>();
         owningEntityMap.put("owning-entity-name", owningEntityName);
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
 
         verify(aaiResourcesClient, times(1)).createIfNotExists(owningEntityURI, Optional.of(owningEntityMap));
         verify(aaiResourcesClient, times(1)).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
@@ -115,7 +117,8 @@
 
         boolean expectedBoolean = aaiCreateResources.existsOwningEntity(owningEntityId);
 
-        AAIResourceUri owningEntityURI = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntityId);
+        AAIResourceUri owningEntityURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
 
         verify(aaiResourcesClient, times(1)).exists(owningEntityURI);
         assertTrue(expectedBoolean);
@@ -138,7 +141,8 @@
 
         aaiCreateResources.createAAIPlatform(platformName, vnfId);
 
-        AAIResourceUri platformURI = AAIUriFactory.createResourceUri(AAIObjectType.PLATFORM, platformName);
+        AAIResourceUri platformURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().platform(platformName));
 
         verify(aaiResourcesClient, times(1)).createIfNotExists(platformURI, Optional.empty());
         verify(aaiResourcesClient, times(1)).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
@@ -153,7 +157,7 @@
         aaiCreateResources.createAAILineOfBusiness(lineOfBusiness, vnfId);
 
         AAIResourceUri lineOfBusinessURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.LINE_OF_BUSINESS, lineOfBusiness);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness));
 
         verify(aaiResourcesClient, times(1)).createIfNotExists(lineOfBusinessURI, Optional.empty());
         verify(aaiResourcesClient, times(1)).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
@@ -166,8 +170,8 @@
 
         aaiCreateResources.createAAIServiceInstance(globalCustomerId, serviceType, serviceInstanceId);
 
-        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalCustomerId, serviceType, serviceInstanceId);
+        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                .customer(globalCustomerId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId));
 
         verify(aaiResourcesClient, times(1)).createIfNotExists(serviceInstanceURI, Optional.empty());
     }
@@ -180,7 +184,7 @@
 
         Optional<GenericVnf> actualVnf = aaiCreateResources.getVnfInstance(vnfId);
 
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
 
         verify(aaiResourcesClient, times(1)).get(vnfURI);
         assertEquals(actualVnf, aaiResultWrapper.asBean(GenericVnf.class));
@@ -192,7 +196,7 @@
 
         Optional<GenericVnf> actualVnf = aaiCreateResources.getVnfInstance(vnfId);
 
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
 
         verify(aaiResourcesClient, times(1)).get(vnfURI);
         assertEquals(actualVnf, Optional.empty());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
index 55edf0b..b554994 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
@@ -32,6 +32,10 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import org.camunda.bpm.engine.delegate.BpmnError;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
@@ -52,9 +56,6 @@
 import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.exception.BBObjectNotFoundException;
 import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.client.orchestration.AAIConfigurationResources;
@@ -66,7 +67,6 @@
 import org.onap.so.client.orchestration.AAIVnfResources;
 import org.onap.so.client.orchestration.AAIVolumeGroupResources;
 import org.onap.so.client.orchestration.AAIVpnBindingResources;
-import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.logger.LoggingAnchor;
 import org.onap.so.logger.MessageEnum;
 import org.slf4j.Logger;
@@ -691,7 +691,8 @@
                 if (fqdnCount > 0) {
                     for (int i = 0; i < fqdnCount; i++) {
                         String fqdn = fqdnList[i];
-                        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY);
+                        AAIPluralResourceUri uri =
+                                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies());
                         uri.queryParam(NETWORK_POLICY_FQDN_PARAM, fqdn);
                         Optional<org.onap.aai.domain.yang.NetworkPolicy> oNetPolicy =
                                 aaiNetworkResources.getNetworkPolicy(uri);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
index 42fb719..d62fc6f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
@@ -27,6 +27,9 @@
 import java.util.Optional;
 import org.onap.aai.domain.yang.NetworkPolicies;
 import org.onap.aai.domain.yang.NetworkPolicy;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
@@ -38,9 +41,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.client.orchestration.AAIConfigurationResources;
 import org.onap.so.client.orchestration.AAIInstanceGroupResources;
@@ -279,7 +279,8 @@
                 if (fqdnCount > 0) {
                     for (int i = 0; i < fqdnCount; i++) {
                         String fqdn = fqdnList[i];
-                        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY);
+                        AAIPluralResourceUri uri =
+                                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies());
                         uri.queryParam(networkPolicyFqdnParam, fqdn);
                         Optional<NetworkPolicies> oNetPolicies = aaiNetworkResources.getNetworkPolicies(uri);
                         if (oNetPolicies.isPresent()) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
index 0912cba..9df9dd3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java
@@ -32,15 +32,15 @@
 import org.onap.aai.domain.yang.RouteTargets;
 import org.onap.aai.domain.yang.Subnet;
 import org.onap.aai.domain.yang.VpnBinding;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.Relationships;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.adapters.nwrest.CreateNetworkRequest;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.Relationships;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.client.orchestration.AAINetworkResources;
 import org.slf4j.Logger;
@@ -76,8 +76,7 @@
             if (!networkRelationships.isPresent()) {
                 throw (new Exception(ERROR_MSG));
             }
-            List<AAIResourceUri> netBindingsUriList =
-                    networkRelationships.get().getRelatedAAIUris(AAIObjectType.VPN_BINDING);
+            List<AAIResourceUri> netBindingsUriList = networkRelationships.get().getRelatedUris(Types.VPN_BINDING);
 
             List<org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding> mappedVpnBindings = new ArrayList<>();
             if (netBindingsUriList != null && !netBindingsUriList.isEmpty()) {
@@ -115,8 +114,7 @@
             if (!networkRelationships.isPresent()) {
                 throw (new Exception(ERROR_MSG));
             }
-            List<AAIResourceUri> netBindingsUriList =
-                    networkRelationships.get().getRelatedAAIUris(AAIObjectType.VPN_BINDING);
+            List<AAIResourceUri> netBindingsUriList = networkRelationships.get().getRelatedUris(Types.VPN_BINDING);
             List<org.onap.so.openstack.beans.RouteTarget> routeTargets = new ArrayList<>();
             for (AAIResourceUri netBindingUri : netBindingsUriList) {
                 logger.info("Get Route Targests");
@@ -168,8 +166,7 @@
             if (!networkRelationships.isPresent()) {
                 throw (new Exception(ERROR_MSG));
             }
-            List<AAIResourceUri> netPoliciesUriList =
-                    networkRelationships.get().getRelatedAAIUris(AAIObjectType.NETWORK_POLICY);
+            List<AAIResourceUri> netPoliciesUriList = networkRelationships.get().getRelatedUris(Types.NETWORK_POLICY);
 
             if (!netPoliciesUriList.isEmpty()) {
                 for (AAIResourceUri netPolicyUri : netPoliciesUriList) {
@@ -201,7 +198,7 @@
                 throw (new Exception(ERROR_MSG));
             }
             List<AAIResourceUri> routeTableUriList =
-                    networkRelationships.get().getRelatedAAIUris(AAIObjectType.ROUTE_TABLE_REFERENCE);
+                    networkRelationships.get().getRelatedUris(Types.ROUTE_TABLE_REFERENCE);
 
             if (!routeTableUriList.isEmpty()) {
                 for (AAIResourceUri routeTableUri : routeTableUriList) {
@@ -241,7 +238,7 @@
             if (!networkRelationships.isPresent()) {
                 throw (new Exception(ERROR_MSG));
             }
-            List<AAIResourceUri> subnetsUriList = networkRelationships.get().getRelatedAAIUris(AAIObjectType.SUBNET);
+            List<AAIResourceUri> subnetsUriList = networkRelationships.get().getRelatedUris(Types.SUBNET);
 
             if (!subnetsUriList.isEmpty()) {
                 for (AAIResourceUri subnetUri : subnetsUriList) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcOrchestratorPreProcessor.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcOrchestratorPreProcessor.java
index 1f05522..2644ae1 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcOrchestratorPreProcessor.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcOrchestratorPreProcessor.java
@@ -6,11 +6,11 @@
 import java.util.Map;
 import java.util.Optional;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.appc.client.lcm.model.Action;
 import org.onap.so.appc.orchestrator.service.beans.ApplicationControllerTaskRequest;
 import org.onap.so.appc.orchestrator.service.beans.ApplicationControllerVm;
@@ -186,7 +186,7 @@
         if (aaiRW != null && aaiRW.getRelationships().isPresent()) {
             Relationships relationships = aaiRW.getRelationships().get();
             if (relationships != null) {
-                List<AAIResourceUri> vserverUris = relationships.getRelatedAAIUris(AAIObjectType.VSERVER);
+                List<AAIResourceUri> vserverUris = relationships.getRelatedUris(Types.VSERVER);
                 ArrayList<String> vserverIds = new ArrayList<String>();
                 ArrayList<String> vserverSelfLinks = new ArrayList<String>();
                 for (AAIResourceUri j : vserverUris) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index 70edc37..de2976f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -30,11 +30,11 @@
 import java.util.Optional;
 import org.json.JSONArray;
 import org.json.JSONObject;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.appc.client.lcm.model.Action;
 import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
@@ -251,7 +251,7 @@
             return;
         }
         Relationships relationships = aaiRW.getRelationships().get();
-        List<AAIResourceUri> vserverUris = relationships.getRelatedAAIUris(AAIObjectType.VSERVER);
+        List<AAIResourceUri> vserverUris = relationships.getRelatedUris(Types.VSERVER);
         JSONArray vserverIds = new JSONArray();
         JSONArray vserverSelfLinks = new JSONArray();
         if (vserverUris != null) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java
index 751e91d..f7c42b9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java
@@ -1,6 +1,14 @@
 package org.onap.so.bpmn.infrastructure.vfmodule;
 
 import java.util.Optional;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.Relationships;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -8,14 +16,6 @@
 import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.Relationships;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.cloud.resource.beans.CloudInformation;
 import org.onap.so.cloud.resource.beans.NodeType;
@@ -60,15 +60,15 @@
     }
 
     protected NodeType getNodeType(CloudRegion cloudRegion) {
-        AAIResourceUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId());
+        AAIResourceUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()));
         AAIResourcesClient client = getAAIClient();
         Optional<Relationships> relationships = client.get(cloudRegionUri).getRelationships();
         if (relationships.isPresent()) {
             AAIPluralResourceUri networkTechsGreenfieldUri = AAIUriFactory
-                    .createResourceUri(AAIObjectType.CLOUD_REGION, cloudRegion.getCloudOwner(),
-                            cloudRegion.getLcpCloudRegionId())
-                    .relatedTo(AAIObjectPlurals.NETWORK_TECHNOLOGY)
+                    .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                            .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()))
+                    .relatedTo(Types.NETWORK_TECHNOLOGIES.getFragment())
                     .queryParam("network-technology-name", NodeType.GREENFIELD.getNetworkTechnologyName());
 
             AAIResultWrapper networkTechsGreenfield = client.get(networkTechsGreenfieldUri);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidation.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidation.java
index 9058628..304cb9f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidation.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidation.java
@@ -23,10 +23,10 @@
 import java.util.List;
 import java.util.Optional;
 import org.onap.aai.domain.yang.L3Network;
-import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
 import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -143,7 +143,7 @@
         AAIResultWrapper networkWrapper = new AAIResultWrapper(aaiLocalNetwork);
         if (networkWrapper.getRelationships().isPresent()) {
             List<AAIResourceUri> vpnBindingUris =
-                    networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING);
+                    networkWrapper.getRelationships().get().getRelatedUris(Types.VPN_BINDING);
             if (!vpnBindingUris.isEmpty()) {
                 Optional<org.onap.aai.domain.yang.VpnBinding> vpnBindingOp =
                         bbInputSetupUtils.getAAIResourceDepthOne(vpnBindingUris.get(0))
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 9b9433a..0f955e2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -50,12 +50,13 @@
 import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aai.domain.yang.VpnBinding;
 import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.aai.AAIObjectName;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.BBConstants;
 import org.onap.so.bpmn.infrastructure.workflow.tasks.utils.WorkflowResourceIdsUtils;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
@@ -485,16 +486,17 @@
     }
 
     protected <T> List<T> getRelatedResourcesInVfModule(String vnfId, String vfModuleId, Class<T> resultClass,
-            AAIObjectType type) {
+            AAIObjectName name) {
         List<T> vnfcs = new ArrayList<>();
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
+        AAIResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
         AAIResultWrapper vfModuleResultsWrapper = bbInputSetupUtils.getAAIResourceDepthOne(uri);
         Optional<Relationships> relationshipsOp = vfModuleResultsWrapper.getRelationships();
         if (!relationshipsOp.isPresent()) {
             logger.debug("No relationships were found for vfModule in AAI");
         } else {
             Relationships relationships = relationshipsOp.get();
-            List<AAIResultWrapper> vnfcResultWrappers = relationships.getByType(type);
+            List<AAIResultWrapper> vnfcResultWrappers = relationships.getByType(name);
             for (AAIResultWrapper vnfcResultWrapper : vnfcResultWrappers) {
                 Optional<T> vnfcOp = vnfcResultWrapper.asBean(resultClass);
                 vnfcOp.ifPresent(vnfcs::add);
@@ -503,9 +505,9 @@
         return vnfcs;
     }
 
-    protected <T> T getRelatedResourcesInVnfc(Vnfc vnfc, Class<T> resultClass, AAIObjectType type) throws Exception {
+    protected <T> T getRelatedResourcesInVnfc(Vnfc vnfc, Class<T> resultClass, AAIObjectName name) throws Exception {
         T configuration = null;
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfc.getVnfcName());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfc.getVnfcName()));
         AAIResultWrapper vnfcResultsWrapper = bbInputSetupUtils.getAAIResourceDepthOne(uri);
         Optional<Relationships> relationshipsOp = vnfcResultsWrapper.getRelationships();
         if (!relationshipsOp.isPresent()) {
@@ -513,7 +515,7 @@
         } else {
             Relationships relationships = relationshipsOp.get();
             List<AAIResultWrapper> configurationResultWrappers =
-                    this.getResultWrappersFromRelationships(relationships, type);
+                    this.getResultWrappersFromRelationships(relationships, name);
             if (configurationResultWrappers.size() > 1) {
                 String multipleRelationshipsError =
                         "Multiple relationships exist from VNFC " + vnfc.getVnfcName() + " to Configurations";
@@ -530,8 +532,8 @@
     }
 
     protected List<AAIResultWrapper> getResultWrappersFromRelationships(Relationships relationships,
-            AAIObjectType type) {
-        return relationships.getByType(type);
+            AAIObjectName name) {
+        return relationships.getByType(name);
     }
 
     protected boolean isConfiguration(List<OrchestrationFlow> orchFlows) {
@@ -565,12 +567,12 @@
             vfModuleCustomizationUUID = aaiVfModule.getModelCustomizationId();
         }
 
-        List<org.onap.aai.domain.yang.Vnfc> vnfcs = getRelatedResourcesInVfModule(vnfId, vfModuleId,
-                org.onap.aai.domain.yang.Vnfc.class, AAIObjectType.VNFC);
+        List<org.onap.aai.domain.yang.Vnfc> vnfcs =
+                getRelatedResourcesInVfModule(vnfId, vfModuleId, org.onap.aai.domain.yang.Vnfc.class, Types.VNFC);
         for (org.onap.aai.domain.yang.Vnfc vnfc : vnfcs) {
             WorkflowResourceIds workflowIdsCopy = SerializationUtils.clone(dataObj.getWorkflowResourceIds());
-            org.onap.aai.domain.yang.Configuration configuration = getRelatedResourcesInVnfc(vnfc,
-                    org.onap.aai.domain.yang.Configuration.class, AAIObjectType.CONFIGURATION);
+            org.onap.aai.domain.yang.Configuration configuration =
+                    getRelatedResourcesInVnfc(vnfc, org.onap.aai.domain.yang.Configuration.class, Types.CONFIGURATION);
             if (configuration == null) {
                 logger.warn(String.format("No configuration found for VNFC %s in AAI", vnfc.getVnfcName()));
                 continue;
@@ -813,7 +815,7 @@
                 new AAICommonObjectMapperProvider().getMapper().writeValueAsString(aaiLocalNetwork)).getRelationships();
         if (relationshipsOp.isPresent()) {
             List<AAIResultWrapper> configurationsRelatedToLocalNetwork =
-                    relationshipsOp.get().getByType(AAIObjectType.CONFIGURATION);
+                    relationshipsOp.get().getByType(Types.CONFIGURATION);
             if (configurationsRelatedToLocalNetwork.size() > 1) {
                 throw new VrfBondingServiceException(
                         "Network: " + aaiLocalNetwork.getNetworkId() + " has more than 1 configuration related to it");
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index 7420df1..5425b2a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -20,12 +20,23 @@
 
 package org.onap.so.bpmn.infrastructure.workflow.tasks;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.stream.Collectors;
+import javax.persistence.EntityNotFoundException;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.onap.aai.domain.yang.*;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.InstanceGroup;
+import org.onap.aai.domain.yang.L3Network;
+import org.onap.aai.domain.yang.ServiceInstance;
+import org.onap.aai.domain.yang.VfModule;
+import org.onap.aai.domain.yang.Vnfc;
+import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aaiclient.client.aai.entities.Configuration;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
 import org.onap.so.bpmn.common.listener.db.RequestsDbListenerRunner;
 import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulatorListenerRunner;
@@ -48,13 +59,8 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
-import javax.persistence.EntityNotFoundException;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.UUID;
-import java.util.stream.Collectors;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 @Component
 public class WorkflowActionBBTasks {
@@ -421,8 +427,7 @@
             String vnfCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnfId).getModelCustomizationId();
             String vfModuleCustomizationUUID =
                     bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId).getModelCustomizationId();
-            List<Vnfc> vnfcs =
-                    workflowAction.getRelatedResourcesInVfModule(vnfId, vfModuleId, Vnfc.class, AAIObjectType.VNFC);
+            List<Vnfc> vnfcs = workflowAction.getRelatedResourcesInVfModule(vnfId, vfModuleId, Vnfc.class, Types.VNFC);
             logger.debug("Vnfc Size: {}", vnfcs.size());
             for (Vnfc vnfc : vnfcs) {
                 String modelCustomizationId = vnfc.getModelCustomizationId();
@@ -461,7 +466,7 @@
 
     protected String getConfigurationId(Vnfc vnfc) throws Exception {
         Configuration configuration =
-                workflowAction.getRelatedResourcesInVnfc(vnfc, Configuration.class, AAIObjectType.CONFIGURATION);
+                workflowAction.getRelatedResourcesInVnfc(vnfc, Configuration.class, Types.CONFIGURATION);
         if (configuration != null) {
             return configuration.getConfigurationId();
         } else {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionExtractResourcesAAI.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionExtractResourcesAAI.java
index de674da..4140692 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionExtractResourcesAAI.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionExtractResourcesAAI.java
@@ -23,12 +23,12 @@
 import java.util.List;
 import java.util.Optional;
 import org.onap.aai.domain.yang.VpnBinding;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
-import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
+import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,7 +42,7 @@
     protected BBInputSetupUtils bbInputSetupUtils;
 
     public Optional<Configuration> extractRelationshipsConfiguration(Relationships relationships) {
-        List<AAIResultWrapper> configurations = relationships.getByType(AAIObjectType.CONFIGURATION);
+        List<AAIResultWrapper> configurations = relationships.getByType(Types.CONFIGURATION);
         for (AAIResultWrapper configWrapper : configurations) {
             Optional<Configuration> config = configWrapper.asBean(Configuration.class);
             if (config.isPresent()) {
@@ -53,7 +53,7 @@
     }
 
     public Optional<VpnBinding> extractRelationshipsVpnBinding(Relationships relationships) {
-        List<AAIResourceUri> configurations = relationships.getRelatedUris(AAIObjectType.VPN_BINDING);
+        List<AAIResourceUri> configurations = relationships.getRelatedUris(Types.VPN_BINDING);
         for (AAIResourceUri vpnBindingUri : configurations) {
             AAIResultWrapper vpnBindingWrapper = bbInputSetupUtils.getAAIResourceDepthOne(vpnBindingUri);
             Optional<VpnBinding> vpnBinding = vpnBindingWrapper.asBean(VpnBinding.class);
@@ -65,7 +65,7 @@
     }
 
     public Optional<Relationships> extractRelationshipsVnfc(Relationships relationships) {
-        List<AAIResultWrapper> vnfcs = relationships.getByType(AAIObjectType.VNFC);
+        List<AAIResultWrapper> vnfcs = relationships.getByType(Types.VNFC);
         for (AAIResultWrapper vnfcWrapper : vnfcs) {
             if (vnfcWrapper.getRelationships().isPresent()) {
                 return vnfcWrapper.getRelationships();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAICollectionResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAICollectionResources.java
index 7386740..78c8cfb 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAICollectionResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAICollectionResources.java
@@ -20,11 +20,11 @@
 
 package org.onap.so.client.orchestration;
 
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +40,7 @@
 
     public void createCollection(Collection collection) {
         AAIResourceUri networkCollectionURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, collection.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()));
         collection.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         org.onap.aai.domain.yang.Collection aaiCollection = aaiObjectMapper.mapCollection(collection);
         injectionHelper.getAaiClient().create(networkCollectionURI, aaiCollection);
@@ -48,13 +48,14 @@
 
     public void updateCollection(Collection collection) {
         AAIResourceUri networkCollectionURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, collection.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()));
         org.onap.aai.domain.yang.Collection aaiCollection = aaiObjectMapper.mapCollection(collection);
         injectionHelper.getAaiClient().update(networkCollectionURI, aaiCollection);
     }
 
     public void deleteCollection(Collection collection) {
-        AAIResourceUri instanceGroupUri = AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, collection.getId());
+        AAIResourceUri instanceGroupUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()));
         injectionHelper.getAaiClient().delete(instanceGroupUri);
     }
 }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
index a832930..1373c2c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
@@ -22,12 +22,13 @@
 
 import java.util.Optional;
 import javax.ws.rs.core.UriBuilder;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,8 +48,8 @@
      * @param configuration
      */
     public void createConfiguration(Configuration configuration) {
-        AAIResourceUri configurationURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
+        AAIResourceUri configurationURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().configuration(configuration.getConfigurationId()));
         configuration.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration);
         injectionHelper.getAaiClient().createIfNotExists(configurationURI, Optional.of(aaiConfiguration));
@@ -61,7 +62,8 @@
      * @return
      */
     public Optional<org.onap.aai.domain.yang.Configuration> getConfiguration(String configurationId) {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.Configuration.class, aaiResourceUri);
     }
 
@@ -71,8 +73,8 @@
      * @param configuration
      */
     public void updateConfiguration(Configuration configuration) {
-        AAIResourceUri configurationURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
+        AAIResourceUri configurationURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().configuration(configuration.getConfigurationId()));
         org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration);
         injectionHelper.getAaiClient().update(configurationURI, aaiConfiguration);
     }
@@ -85,9 +87,10 @@
      */
 
     public void disconnectConfigurationToServiceInstance(String configurationId, String serviceInstanceId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().disconnect(configurationURI, serviceInstanceURI);
     }
 
@@ -99,9 +102,9 @@
      */
     public void connectVrfConfigurationToVnrConfiguration(String vrfConfigurationId, String vnrConfigurationId) {
         AAIResourceUri vnrConfigurationUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, vnrConfigurationId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(vnrConfigurationId));
         AAIResourceUri vrfConfigurationUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, vrfConfigurationId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(vrfConfigurationId));
         injectionHelper.getAaiClient().connect(vrfConfigurationUri, vnrConfigurationUri);
     }
 
@@ -112,8 +115,9 @@
      * @param configurationId
      */
     public void connectConfigurationToPnfObject(String pnfId, String configurationId) {
-        AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId);
-        AAIResourceUri configurationUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfId));
+        AAIResourceUri configurationUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         injectionHelper.getAaiClient().connect(configurationUri, pnfUri);
     }
 
@@ -124,9 +128,10 @@
      * @param serviceInstanceId
      */
     public void connectConfigurationToServiceInstance(String configurationId, String serviceInstanceId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().connect(configurationURI, serviceInstanceURI);
     }
 
@@ -139,9 +144,10 @@
      */
     public void connectConfigurationToServiceInstance(String configurationId, String serviceInstanceId,
             AAIEdgeLabel aaiLabel) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().connect(configurationURI, serviceInstanceURI, aaiLabel);
     }
 
@@ -152,8 +158,10 @@
      * @param genericVnfId
      */
     public void connectConfigurationToGenericVnf(String configurationId, String genericVnfId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
-        AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnfId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
+        AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId));
         injectionHelper.getAaiClient().connect(configurationURI, genericVnfURI);
     }
 
@@ -165,26 +173,33 @@
      *
      */
     public void connectConfigurationToVpnBinding(String configurationId, String vpnId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
-        AAIResourceUri vpnBindingURI = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
+        AAIResourceUri vpnBindingURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBinding(vpnId));
         injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI);
     }
 
     public void connectConfigurationToVfModule(String configurationId, String vnfId, String vfModuleId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
-        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
+        AAIResourceUri vfModuleURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
         injectionHelper.getAaiClient().connect(configurationURI, vfModuleURI);
     }
 
     public void connectConfigurationToVnfc(String configurationId, String vnfcName) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
-        AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfcName);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
+        AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfcName));
         injectionHelper.getAaiClient().connect(configurationURI, vnfcURI);
     }
 
     public void connectConfigurationToL3Network(String configurationId, String networkId) {
-        AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId);
+        AAIResourceUri configurationURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId));
         injectionHelper.getAaiClient().connect(configurationURI, networkURI);
     }
 
@@ -194,7 +209,8 @@
      * @param configurationId
      */
     public void deleteConfiguration(String configurationId) {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         injectionHelper.getAaiClient().delete(aaiResourceUri);
     }
 
@@ -204,8 +220,8 @@
      * @param configuration
      */
     public void deleteConfiguration(Configuration configuration) {
-        AAIResourceUri aaiResourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
+        AAIResourceUri aaiResourceUri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().configuration(configuration.getConfigurationId()));
         injectionHelper.getAaiClient().delete(aaiResourceUri);
     }
 
@@ -217,13 +233,13 @@
      */
     public Optional<org.onap.aai.domain.yang.Configuration> getConfigurationFromRelatedLink(String relatedLink) {
         return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.Configuration.class, AAIUriFactory
-                .createResourceFromExistingURI(AAIObjectType.CONFIGURATION, UriBuilder.fromPath(relatedLink).build()));
+                .createResourceFromExistingURI(Types.CONFIGURATION, UriBuilder.fromPath(relatedLink).build()));
     }
 
     public void updateOrchestrationStatusConfiguration(Configuration configuration,
             OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri aaiResourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
+        AAIResourceUri aaiResourceUri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().configuration(configuration.getConfigurationId()));
         configuration.setOrchestrationStatus(orchestrationStatus);
         org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration);
         injectionHelper.getAaiClient().update(aaiResourceUri, aaiConfiguration);
@@ -231,8 +247,8 @@
 
     public void updateConfigurationOrchestrationStatus(Configuration configuration,
             OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri aaiResourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
+        AAIResourceUri aaiResourceUri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().configuration(configuration.getConfigurationId()));
         org.onap.aai.domain.yang.Configuration aaiConfiguration = new org.onap.aai.domain.yang.Configuration();
         aaiConfiguration.setOrchestrationStatus(orchestrationStatus.name());
         injectionHelper.getAaiClient().update(aaiResourceUri, aaiConfiguration);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIInstanceGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIInstanceGroupResources.java
index 05c8f7d..27fa430 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIInstanceGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIInstanceGroupResources.java
@@ -21,16 +21,16 @@
 package org.onap.so.client.orchestration;
 
 import java.util.Optional;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -45,50 +45,52 @@
 
     public void createInstanceGroup(InstanceGroup instanceGroup) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = aaiObjectMapper.mapInstanceGroup(instanceGroup);
         injectionHelper.getAaiClient().createIfNotExists(instanceGroupUri, Optional.of(aaiInstanceGroup));
     }
 
     public void deleteInstanceGroup(InstanceGroup instanceGroup) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         injectionHelper.getAaiClient().delete(instanceGroupUri);
     }
 
     public void connectInstanceGroupToVnf(InstanceGroup instanceGroup, GenericVnf vnf) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().connect(instanceGroupUri, vnfURI);
     }
 
     public void connectInstanceGroupToVnf(InstanceGroup instanceGroup, GenericVnf vnf, AAIEdgeLabel aaiLabel) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().connect(instanceGroupUri, vnfURI, aaiLabel);
     }
 
     public boolean exists(InstanceGroup instanceGroup) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         return injectionHelper.getAaiClient().exists(instanceGroupUri);
     }
 
     public void createInstanceGroupandConnectServiceInstance(InstanceGroup instanceGroup,
             ServiceInstance serviceInstance) {
         AAIResourceUri instanceGroupUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = aaiObjectMapper.mapInstanceGroup(instanceGroup);
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(instanceGroupUri, Optional.of(aaiInstanceGroup))
                 .connect(instanceGroupUri, serviceInstanceURI);
     }
 
     public boolean checkInstanceGroupNameInUse(String instanceGroupName) {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.INSTANCE_GROUP)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroups())
                 .queryParam("instance-group-name", instanceGroupName);
         return injectionHelper.getAaiClient().exists(uri);
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAINetworkResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAINetworkResources.java
index 611d715..2e8e50a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAINetworkResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAINetworkResources.java
@@ -25,6 +25,15 @@
 import org.onap.aai.domain.yang.NetworkPolicy;
 import org.onap.aai.domain.yang.RouteTableReference;
 import org.onap.aai.domain.yang.VpnBinding;
+import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
@@ -34,16 +43,7 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
-import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -58,46 +58,51 @@
     private AAIObjectMapper aaiObjectMapper;
 
     public void updateNetwork(L3Network network) {
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId());
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         org.onap.aai.domain.yang.L3Network aaiL3Network = aaiObjectMapper.mapNetwork(network);
         injectionHelper.getAaiClient().update(networkURI, aaiL3Network);
     }
 
     public void updateSubnet(L3Network network, Subnet subnet) {
-        AAIResourceUri subnetURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SUBNET, network.getNetworkId(), subnet.getSubnetId());
+        AAIResourceUri subnetURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()).subnet(subnet.getSubnetId()));
         org.onap.aai.domain.yang.Subnet aaiSubnet = aaiObjectMapper.mapSubnet(subnet);
         injectionHelper.getAaiClient().update(subnetURI, aaiSubnet);
     }
 
     public void createNetworkConnectToServiceInstance(L3Network network, ServiceInstance serviceInstance) {
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId());
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.L3Network aaiL3Network = aaiObjectMapper.mapNetwork(network);
         injectionHelper.getAaiClient().createIfNotExists(networkURI, Optional.of(aaiL3Network)).connect(networkURI,
                 serviceInstanceURI);
     }
 
     public void createLineOfBusinessAndConnectNetwork(LineOfBusiness lineOfBusiness, L3Network network) {
-        AAIResourceUri lineOfBusinessURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.LINE_OF_BUSINESS, lineOfBusiness.getLineOfBusinessName());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId());
+        AAIResourceUri lineOfBusinessURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness.getLineOfBusinessName()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         injectionHelper.getAaiClient().createIfNotExists(lineOfBusinessURI, Optional.of(lineOfBusiness))
                 .connect(networkURI, lineOfBusinessURI);
     }
 
     public void createPlatformAndConnectNetwork(Platform platform, L3Network network) {
         AAIResourceUri platformURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.PLATFORM, platform.getPlatformName());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().platform(platform.getPlatformName()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         injectionHelper.getAaiClient().createIfNotExists(platformURI, Optional.of(platform)).connect(networkURI,
                 platformURI);
     }
 
     public void deleteNetwork(L3Network network) {
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId());
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         injectionHelper.getAaiClient().delete(networkURI);
     }
 
@@ -122,115 +127,122 @@
     }
 
     public Optional<org.onap.aai.domain.yang.L3Network> queryNetworkById(L3Network l3network) {
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId()).depth(Depth.ALL);
+        AAIResourceUri uri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId())).depth(Depth.ALL);
         AAIResultWrapper aaiWrapper = injectionHelper.getAaiClient().get(uri);
         return aaiWrapper.asBean(org.onap.aai.domain.yang.L3Network.class);
     }
 
     public AAIResultWrapper queryNetworkWrapperById(L3Network l3network) {
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId()).depth(Depth.ALL);
+        AAIResourceUri uri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId())).depth(Depth.ALL);
         return injectionHelper.getAaiClient().get(uri);
     }
 
     public void createNetworkInstanceGroup(InstanceGroup instanceGroup) {
         AAIResourceUri instanceGroupURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = aaiObjectMapper.mapInstanceGroup(instanceGroup);
         injectionHelper.getAaiClient().create(instanceGroupURI, aaiInstanceGroup);
     }
 
     public void createNetworkCollection(Collection networkCollection) {
         AAIResourceUri networkCollectionURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()));
         networkCollection.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         org.onap.aai.domain.yang.Collection aaiCollection = aaiObjectMapper.mapCollection(networkCollection);
         injectionHelper.getAaiClient().create(networkCollectionURI, aaiCollection);
     }
 
     public void connectNetworkToTenant(L3Network l3network, CloudRegion cloudRegion) {
-        AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), cloudRegion.getTenantId());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId());
+        AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .tenant(cloudRegion.getTenantId()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId()));
         injectionHelper.getAaiClient().connect(tenantURI, networkURI);
     }
 
     public void connectNetworkToCloudRegion(L3Network l3network, CloudRegion cloudRegion) {
-        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId());
+        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId()));
         injectionHelper.getAaiClient().connect(networkURI, cloudRegionURI);
     }
 
     public void connectNetworkToNetworkCollectionInstanceGroup(L3Network l3network, InstanceGroup instanceGroup) {
         AAIResourceUri netwrokCollectionInstanceGroupURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId()));
         injectionHelper.getAaiClient().connect(netwrokCollectionInstanceGroupURI, networkURI);
     }
 
     public void connectNetworkToNetworkCollectionServiceInstance(L3Network l3network,
             ServiceInstance networkCollectionServiceInstance) {
         AAIResourceUri networkCollectionServiceInstanceUri = AAIUriFactory.createResourceUri(
-                AAIObjectType.SERVICE_INSTANCE, networkCollectionServiceInstance.getServiceInstanceId());
-        AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3network.getNetworkId());
+                Types.SERVICE_INSTANCE.getFragment(networkCollectionServiceInstance.getServiceInstanceId()));
+        AAIResourceUri networkURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId()));
         injectionHelper.getAaiClient().connect(networkCollectionServiceInstanceUri, networkURI);
     }
 
     public void connectNetworkCollectionInstanceGroupToNetworkCollection(InstanceGroup instanceGroup,
             Collection networkCollection) {
         AAIResourceUri networkCollectionUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()));
         AAIResourceUri netwrokCollectionInstanceGroupURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         injectionHelper.getAaiClient().connect(networkCollectionUri, netwrokCollectionInstanceGroupURI);
     }
 
     public void connectInstanceGroupToCloudRegion(InstanceGroup instanceGroup, CloudRegion cloudRegion) {
-        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId());
+        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()));
         AAIResourceUri instanceGroupURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         injectionHelper.getAaiClient().connect(instanceGroupURI, cloudRegionURI, AAIEdgeLabel.USES);
     }
 
     public void connectNetworkCollectionToServiceInstance(Collection networkCollection,
             ServiceInstance networkCollectionServiceInstance) {
         AAIResourceUri networkCollectionUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()));
         AAIResourceUri networkCollectionServiceInstanceUri = AAIUriFactory.createResourceUri(
-                AAIObjectType.SERVICE_INSTANCE, networkCollectionServiceInstance.getServiceInstanceId());
+                Types.SERVICE_INSTANCE.getFragment(networkCollectionServiceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().connect(networkCollectionUri, networkCollectionServiceInstanceUri);
     }
 
     public void deleteCollection(Collection collection) {
-        AAIResourceUri collectionURI = AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, collection.getId());
+        AAIResourceUri collectionURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()));
         injectionHelper.getAaiClient().delete(collectionURI);
     }
 
     public void deleteNetworkInstanceGroup(InstanceGroup instanceGroup) {
         AAIResourceUri instanceGroupURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         injectionHelper.getAaiClient().delete(instanceGroupURI);
     }
 
     public void createNetworkPolicy(org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy networkPolicy) {
         NetworkPolicy aaiNetworkPolicy = aaiObjectMapper.mapNetworkPolicy(networkPolicy);
         String networkPolicyId = networkPolicy.getNetworkPolicyId();
-        AAIResourceUri netUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId);
+        AAIResourceUri netUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicyId));
         injectionHelper.getAaiClient().create(netUri, aaiNetworkPolicy);
     }
 
     public void deleteNetworkPolicy(String networkPolicyId) {
         AAIResourceUri networkPolicyURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId);
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy(networkPolicyId));
         injectionHelper.getAaiClient().delete(networkPolicyURI);
     }
 
     public boolean checkNetworkNameInUse(String networkName) {
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks())
+                .queryParam("network-name", networkName);
         return injectionHelper.getAaiClient().exists(uri);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java
index 3da1719..a426c39 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java
@@ -20,24 +20,25 @@
 
 package org.onap.so.client.orchestration;
 
-import com.google.common.base.Strings;
 import java.util.Optional;
 import org.apache.commons.lang3.StringUtils;
 import org.onap.aai.domain.yang.RelatedToProperty;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+import com.google.common.base.Strings;
 
 @Component
 public class AAIPnfResources {
@@ -51,16 +52,16 @@
     private AAIObjectMapper aaiObjectMapper;
 
     public void createPnfAndConnectServiceInstance(Pnf pnf, ServiceInstance serviceInstance) {
-        AAIResourceUri pnfURI = AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnf.getPnfName());
+        AAIResourceUri pnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnf.getPnfName()));
         pnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(pnfURI, Optional.of(aaiObjectMapper.mapPnf(pnf)))
                 .connect(pnfURI, serviceInstanceURI);
     }
 
     public void updateOrchestrationStatusPnf(Pnf pnf, OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri pnfURI = AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnf.getPnfName());
+        AAIResourceUri pnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnf.getPnfName()));
 
         Pnf pnfCopy = pnf.shallowCopyId();
 
@@ -72,7 +73,7 @@
     public void checkIfPnfExistsInAaiAndCanBeUsed(Pnf pnf) throws Exception {
         Optional<org.onap.aai.domain.yang.Pnf> pnfFromAai =
                 injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnf.getPnfName()));
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnf.getPnfName())));
         if (pnfFromAai.isPresent()) {
             checkIfPnfCanBeUsed(pnfFromAai.get());
             updatePnfInAAI(pnf, pnfFromAai.get());
@@ -81,8 +82,8 @@
 
     private void updatePnfInAAI(Pnf pnf, org.onap.aai.domain.yang.Pnf pnfFromAai) {
         updatePnfFields(pnf, pnfFromAai);
-        injectionHelper.getAaiClient().update(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnf.getPnfName()),
-                pnfFromAai);
+        injectionHelper.getAaiClient().update(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnf.getPnfName())), pnfFromAai);
         logger.debug("updatePnfInAAI: {}", pnfFromAai);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
index 424b3ec..cc99f17 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
@@ -27,17 +27,17 @@
 import java.util.List;
 import java.util.Optional;
 import org.onap.aai.domain.yang.OwningEntities;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -53,15 +53,16 @@
     private AAIObjectMapper aaiObjectMapper;
 
     public boolean existsServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         return injectionHelper.getAaiClient().exists(serviceInstanceURI);
     }
 
     public void createServiceInstance(ServiceInstance serviceInstance, Customer customer) {
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, customer.getGlobalCustomerId(),
-                        customer.getServiceSubscription().getServiceType(), serviceInstance.getServiceInstanceId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId())
+                        .serviceSubscription(customer.getServiceSubscription().getServiceType())
+                        .serviceInstance(serviceInstance.getServiceInstanceId()));
         serviceInstance.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         org.onap.aai.domain.yang.ServiceInstance aaiServiceInstance =
                 aaiObjectMapper.mapServiceInstance(serviceInstance);
@@ -74,58 +75,63 @@
      * @param customer
      */
     public void createServiceSubscription(Customer customer) {
-        AAIResourceUri serviceSubscriptionURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_SUBSCRIPTION,
-                customer.getGlobalCustomerId(), customer.getServiceSubscription().getServiceType());
+        AAIResourceUri serviceSubscriptionURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId())
+                        .serviceSubscription(customer.getServiceSubscription().getServiceType()));
         org.onap.aai.domain.yang.ServiceSubscription serviceSubscription =
                 aaiObjectMapper.mapServiceSubscription(customer.getServiceSubscription());
         injectionHelper.getAaiClient().createIfNotExists(serviceSubscriptionURI, Optional.of(serviceSubscription));
     }
 
     public void deleteServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().delete(serviceInstanceURI);
     }
 
     public void createProject(Project project) {
-        AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, project.getProjectName());
+        AAIResourceUri projectURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(project.getProjectName()));
         org.onap.aai.domain.yang.Project aaiProject = aaiObjectMapper.mapProject(project);
         injectionHelper.getAaiClient().createIfNotExists(projectURI, Optional.of(aaiProject));
     }
 
     public void createProjectandConnectServiceInstance(Project project, ServiceInstance serviceInstance) {
-        AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, project.getProjectName());
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri projectURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(project.getProjectName()));
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.Project aaiProject = aaiObjectMapper.mapProject(project);
         injectionHelper.getAaiClient().createIfNotExists(projectURI, Optional.of(aaiProject)).connect(projectURI,
                 serviceInstanceURI);
     }
 
     public void createOwningEntity(OwningEntity owningEntity) {
-        AAIResourceUri owningEntityURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntity.getOwningEntityId());
+        AAIResourceUri owningEntityURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
         org.onap.aai.domain.yang.OwningEntity aaiOwningEntity = aaiObjectMapper.mapOwningEntity(owningEntity);
         injectionHelper.getAaiClient().createIfNotExists(owningEntityURI, Optional.of(aaiOwningEntity));
     }
 
     public boolean existsOwningEntity(OwningEntity owningEntity) {
-        AAIResourceUri owningEntityUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntity.getOwningEntityId());
+        AAIResourceUri owningEntityUri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
         return injectionHelper.getAaiClient().exists(owningEntityUri);
     }
 
     public boolean existsOwningEntityName(String owningEntityName) {
-        AAIPluralResourceUri owningEntityUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.OWNING_ENTITY)
-                .queryParam("owning-entity-name", owningEntityName);
+        AAIPluralResourceUri owningEntityUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntities())
+                        .queryParam("owning-entity-name", owningEntityName);
         AAIResourcesClient aaiRC = injectionHelper.getAaiClient();
         return aaiRC.exists(owningEntityUri);
     }
 
     public org.onap.aai.domain.yang.OwningEntity getOwningEntityByName(String owningEntityName)
             throws AAIEntityNotFoundException {
-        AAIPluralResourceUri owningEntityUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.OWNING_ENTITY)
-                .queryParam("owning-entity-name", owningEntityName);
+        AAIPluralResourceUri owningEntityUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntities())
+                        .queryParam("owning-entity-name", owningEntityName);
         AAIResourcesClient aaiRC = injectionHelper.getAaiClient();
         Optional<OwningEntities> owningEntities = aaiRC.get(OwningEntities.class, owningEntityUri);
         if (owningEntities.isPresent()) {
@@ -142,19 +148,19 @@
     }
 
     public void connectOwningEntityandServiceInstance(OwningEntity owningEntity, ServiceInstance serviceInstance) {
-        AAIResourceUri owningEntityURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntity.getOwningEntityId());
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri owningEntityURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().connect(owningEntityURI, serviceInstanceURI);
     }
 
     public void createOwningEntityandConnectServiceInstance(OwningEntity owningEntity,
             ServiceInstance serviceInstance) {
-        AAIResourceUri owningEntityURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, owningEntity.getOwningEntityId());
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri owningEntityURI = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.OwningEntity aaiOwningEntity = aaiObjectMapper.mapOwningEntity(owningEntity);
         injectionHelper.getAaiClient().createIfNotExists(owningEntityURI, Optional.of(aaiOwningEntity))
                 .connect(owningEntityURI, serviceInstanceURI);
@@ -171,15 +177,15 @@
     }
 
     public void updateServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.ServiceInstance aaiServiceInstance =
                 aaiObjectMapper.mapServiceInstance(serviceInstance);
         injectionHelper.getAaiClient().update(serviceInstanceURI, aaiServiceInstance);
     }
 
     public boolean checkInstanceServiceNameInUse(ServiceInstance serviceInstance) {
-        AAIPluralResourceUri uriSI = AAIUriFactory.createNodesUri(AAIObjectPlurals.SERVICE_INSTANCE)
+        AAIPluralResourceUri uriSI = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
                 .queryParam("service-instance-name", serviceInstance.getServiceInstanceName());
         return injectionHelper.getAaiClient().exists(uriSI);
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
index d5d0b08..72c9b7c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
@@ -23,16 +23,16 @@
 package org.onap.so.client.orchestration;
 
 import java.util.Optional;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -48,23 +48,23 @@
     private AAIObjectMapper aaiObjectMapper;
 
     public void createVfModule(VfModule vfModule, GenericVnf vnf) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         vfModule.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         injectionHelper.getAaiClient().createIfNotExists(vfModuleURI,
                 Optional.of(aaiObjectMapper.mapVfModule(vfModule)));
     }
 
     public void deleteVfModule(VfModule vfModule, GenericVnf vnf) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         injectionHelper.getAaiClient().delete(vfModuleURI);
     }
 
     public void updateOrchestrationStatusVfModule(VfModule vfModule, GenericVnf vnf,
             OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         VfModule copiedVfModule = vfModule.shallowCopyId();
 
         vfModule.setOrchestrationStatus(orchestrationStatus);
@@ -74,8 +74,8 @@
     }
 
     public void updateHeatStackIdVfModule(VfModule vfModule, GenericVnf vnf) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         VfModule copiedVfModule = vfModule.shallowCopyId();
 
         copiedVfModule.setHeatStackId(vfModule.getHeatStackId());
@@ -84,8 +84,8 @@
     }
 
     public void updateContrailServiceInstanceFqdnVfModule(VfModule vfModule, GenericVnf vnf) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         VfModule copiedVfModule = vfModule.shallowCopyId();
 
         copiedVfModule.setContrailServiceInstanceFqdn(vfModule.getContrailServiceInstanceFqdn());
@@ -94,24 +94,25 @@
     }
 
     public void changeAssignVfModule(VfModule vfModule, GenericVnf vnf) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
         org.onap.aai.domain.yang.VfModule aaiVfModule = aaiObjectMapper.mapVfModule(vfModule);
         injectionHelper.getAaiClient().update(vfModuleURI, aaiVfModule);
     }
 
     public void connectVfModuleToVolumeGroup(GenericVnf vnf, VfModule vfModule, VolumeGroup volumeGroup,
             CloudRegion cloudRegion) {
-        AAIResourceUri vfModuleURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
-        AAIResourceUri volumeGroupURI = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()).vfModule(vfModule.getVfModuleId()));
+        AAIResourceUri volumeGroupURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         injectionHelper.getAaiClient().connect(vfModuleURI, volumeGroupURI);
     }
 
     public boolean checkNameInUse(VfModule vfModule) {
         boolean nameInUse = false;
-        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE)
+        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment())
                 .queryParam("vf-module-name", vfModule.getVfModuleName());
         AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id",
                 vfModule.getModelInfoVfModule().getModelCustomizationUUID());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
index c2e84f6..2f48b1f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
@@ -25,22 +25,22 @@
 import java.io.IOException;
 import java.util.Optional;
 import org.onap.aai.domain.yang.Vserver;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIRestClientImpl;
 import org.onap.aaiclient.client.aai.AAIValidatorImpl;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.client.aai.mapper.AAIObjectMapper;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -57,37 +57,42 @@
     private AAIValidatorImpl aaiValidatorImpl = new AAIValidatorImpl();
 
     public void createVnfandConnectServiceInstance(GenericVnf vnf, ServiceInstance serviceInstance) {
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         vnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstance.getServiceInstanceId());
+        AAIResourceUri serviceInstanceURI = AAIUriFactory
+                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(vnfURI, Optional.of(aaiObjectMapper.mapVnf(vnf)))
                 .connect(vnfURI, serviceInstanceURI);
     }
 
     public void createPlatformandConnectVnf(Platform platform, GenericVnf vnf) {
         AAIResourceUri platformURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.PLATFORM, platform.getPlatformName());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().platform(platform.getPlatformName()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().createIfNotExists(platformURI, Optional.of(platform)).connect(vnfURI,
                 platformURI);
     }
 
     public void createLineOfBusinessandConnectVnf(LineOfBusiness lineOfBusiness, GenericVnf vnf) {
-        AAIResourceUri lineOfBusinessURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.LINE_OF_BUSINESS, lineOfBusiness.getLineOfBusinessName());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri lineOfBusinessURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.business().lineOfBusiness(lineOfBusiness.getLineOfBusinessName()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().createIfNotExists(lineOfBusinessURI, Optional.of(lineOfBusiness)).connect(vnfURI,
                 lineOfBusinessURI);
     }
 
     public void deleteVnf(GenericVnf vnf) {
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().delete(vnfURI);
     }
 
     public void updateOrchestrationStatusVnf(GenericVnf vnf, OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
 
         GenericVnf copiedVnf = vnf.shallowCopyId();
 
@@ -97,7 +102,8 @@
     }
 
     public void updateObjectVnf(GenericVnf vnf) {
-        AAIResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri vnfUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().update(vnfUri, aaiObjectMapper.mapVnf(vnf));
     }
 
@@ -109,7 +115,7 @@
      */
     public Optional<org.onap.aai.domain.yang.GenericVnf> getGenericVnf(String vnfId) {
         return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
     }
 
     /**
@@ -121,29 +127,32 @@
     public boolean checkInMaintFlag(String vnfId) {
         org.onap.aai.domain.yang.GenericVnf vnf = injectionHelper.getAaiClient()
                 .get(org.onap.aai.domain.yang.GenericVnf.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
                 .orElse(new org.onap.aai.domain.yang.GenericVnf());
         return vnf.isInMaint();
     }
 
     public void connectVnfToCloudRegion(GenericVnf vnf, CloudRegion cloudRegion) {
-        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri cloudRegionURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().connect(vnfURI, cloudRegionURI);
     }
 
     public void connectVnfToTenant(GenericVnf vnf, CloudRegion cloudRegion) {
-        AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), cloudRegion.getTenantId());
-        AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
+        AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .tenant(cloudRegion.getTenantId()));
+        AAIResourceUri vnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         injectionHelper.getAaiClient().connect(tenantURI, vnfURI);
     }
 
     public boolean checkVnfClosedLoopDisabledFlag(String vnfId) {
         org.onap.aai.domain.yang.GenericVnf vnf = injectionHelper.getAaiClient()
                 .get(org.onap.aai.domain.yang.GenericVnf.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
                 .orElse(new org.onap.aai.domain.yang.GenericVnf());
         return vnf.isIsClosedLoopDisabled();
     }
@@ -151,7 +160,7 @@
     public boolean checkVnfPserversLockedFlag(String vnfId) throws IOException {
         org.onap.aai.domain.yang.GenericVnf vnf = injectionHelper.getAaiClient()
                 .get(org.onap.aai.domain.yang.GenericVnf.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
                 .orElse(new org.onap.aai.domain.yang.GenericVnf());
         AAIRestClientImpl client = new AAIRestClientImpl();
         aaiValidatorImpl.setClient(client);
@@ -160,14 +169,14 @@
     }
 
     public boolean checkNameInUse(String vnfName) {
-        AAIPluralResourceUri vnfUri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName);
+        AAIPluralResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs())
+                .queryParam("vnf-name", vnfName);
         return injectionHelper.getAaiClient().exists(vnfUri);
     }
 
     public AAIResultWrapper queryVnfWrapperById(GenericVnf vnf) {
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId()).depth(Depth.ALL);
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()))
+                .depth(Depth.ALL);
         return injectionHelper.getAaiClient().get(uri);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
index 886dafe..1fbfe8c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
@@ -22,15 +22,15 @@
 
 package org.onap.so.client.orchestration;
 
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,16 +46,18 @@
     private AAIObjectMapper aaiObjectMapper;
 
     public void createVolumeGroup(VolumeGroup volumeGroup, CloudRegion cloudRegion) {
-        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         volumeGroup.setOrchestrationStatus(OrchestrationStatus.ASSIGNED);
         injectionHelper.getAaiClient().create(uriVolumeGroup, aaiObjectMapper.mapVolumeGroup(volumeGroup));
     }
 
     public void updateOrchestrationStatusVolumeGroup(VolumeGroup volumeGroup, CloudRegion cloudRegion,
             OrchestrationStatus orchestrationStatus) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         VolumeGroup copiedVolumeGroup = volumeGroup.shallowCopyId();
 
         volumeGroup.setOrchestrationStatus(orchestrationStatus);
@@ -65,29 +67,34 @@
 
     public void connectVolumeGroupToVnf(GenericVnf genericVnf, VolumeGroup volumeGroup, CloudRegion cloudRegion) {
         AAIResourceUri uriGenericVnf =
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnf.getVnfId());
-        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnf.getVnfId()));
+        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         injectionHelper.getAaiClient().connect(uriGenericVnf, uriVolumeGroup);
     }
 
     public void connectVolumeGroupToTenant(VolumeGroup volumeGroup, CloudRegion cloudRegion) {
-        AAIResourceUri uriTenant = AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), cloudRegion.getTenantId());
-        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP,
-                cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri uriTenant = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .tenant(cloudRegion.getTenantId()));
+        AAIResourceUri uriVolumeGroup = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         injectionHelper.getAaiClient().connect(uriTenant, uriVolumeGroup);
     }
 
     public void deleteVolumeGroup(VolumeGroup volumeGroup, CloudRegion cloudRegion) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         injectionHelper.getAaiClient().delete(uri);
     }
 
     public void updateHeatStackIdVolumeGroup(VolumeGroup volumeGroup, CloudRegion cloudRegion) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudRegion.getCloudOwner(),
-                cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                .volumeGroup(volumeGroup.getVolumeGroupId()));
         VolumeGroup copiedVolumeGroup = volumeGroup.shallowCopyId();
 
         copiedVolumeGroup.setHeatStackId(volumeGroup.getHeatStackId());
@@ -95,7 +102,7 @@
     }
 
     public boolean checkNameInUse(VolumeGroup volumeGroup) {
-        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VOLUME_GROUP)
+        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(Types.VOLUME_GROUPS.getFragment())
                 .queryParam("volume-group-name", volumeGroup.getVolumeGroupName());
         return injectionHelper.getAaiClient().exists(volumeGroupUri);
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVpnBindingResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVpnBindingResources.java
index 5ce8268..5200be9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVpnBindingResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVpnBindingResources.java
@@ -22,14 +22,13 @@
 
 import java.util.Optional;
 import org.onap.aai.domain.yang.VpnBindings;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -46,8 +45,8 @@
      * @param customer
      */
     public boolean existsCustomer(Customer customer) {
-        AAIResourceUri uriCustomer =
-                AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, customer.getGlobalCustomerId());
+        AAIResourceUri uriCustomer = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId()));
         return injectionHelper.getAaiClient().exists(uriCustomer);
     }
 
@@ -56,8 +55,9 @@
      * @return
      */
     public Optional<VpnBindings> getVpnBindingByCustomerVpnId(String customerVpnId) {
-        AAIPluralResourceUri aaiVpnBindingsResourceUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VPN_BINDING)
-                .queryParam("customer-vpn-id", customerVpnId);
+        AAIPluralResourceUri aaiVpnBindingsResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBindings())
+                        .queryParam("customer-vpn-id", customerVpnId);
         return injectionHelper.getAaiClient().get(VpnBindings.class, aaiVpnBindingsResourceUri);
 
     }
@@ -67,7 +67,7 @@
      */
     public void createVpnBinding(VpnBinding vpnBinding) {
         AAIResourceUri aaiVpnBindingResourceUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnBinding.getVpnId());
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBinding(vpnBinding.getVpnId()));
         injectionHelper.getAaiClient().create(aaiVpnBindingResourceUri, aaiObjectMapper.mapVpnBinding(vpnBinding));
     }
 
@@ -75,8 +75,8 @@
      * @param customer
      */
     public void createCustomer(Customer customer) {
-        AAIResourceUri uriCustomer =
-                AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, customer.getGlobalCustomerId());
+        AAIResourceUri uriCustomer = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId()));
         injectionHelper.getAaiClient().create(uriCustomer, aaiObjectMapper.mapCustomer(customer));
     }
 
@@ -88,7 +88,7 @@
      */
     public Optional<org.onap.aai.domain.yang.VpnBinding> getVpnBinding(String vpnId) {
         return injectionHelper.getAaiClient().get(org.onap.aai.domain.yang.VpnBinding.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBinding(vpnId)));
     }
 
 
@@ -97,8 +97,10 @@
      * @param vpnId
      */
     public void connectCustomerToVpnBinding(String globalSubscriberId, String vpnId) {
-        AAIResourceUri customerURI = AAIUriFactory.createResourceUri(AAIObjectType.CUSTOMER, globalSubscriberId);
-        AAIResourceUri vpnBindingURI = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId);
+        AAIResourceUri customerURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId));
+        AAIResourceUri vpnBindingURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBinding(vpnId));
         injectionHelper.getAaiClient().connect(customerURI, vpnBindingURI);
     }
 }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidationTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidationTest.java
index d9fb7f6..7f9f041 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidationTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/VrfValidationTest.java
@@ -41,10 +41,10 @@
 import org.onap.aai.domain.yang.Subnet;
 import org.onap.aai.domain.yang.Subnets;
 import org.onap.aai.domain.yang.VpnBinding;
-import org.onap.so.bpmn.BaseTaskTest;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.BaseTaskTest;
 import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
 import org.onap.so.db.catalog.beans.Service;
 import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
@@ -205,7 +205,7 @@
         AAIResultWrapper networkWrapper = new AAIResultWrapper(l3Network);
         if (networkWrapper.getRelationships().isPresent()) {
             List<AAIResourceUri> vpnBindingUris =
-                    networkWrapper.getRelationships().get().getRelatedUris(AAIObjectType.VPN_BINDING);
+                    networkWrapper.getRelationships().get().getRelatedUris(Types.VPN_BINDING);
             VpnBinding vpnBinding = new VpnBinding();
             vpnBinding.setRouteTargets(new RouteTargets());
             vpnBinding.getRouteTargets().getRouteTarget().add(new RouteTarget());
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index c1970ec..53d1bea 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -39,7 +39,6 @@
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isA;
-import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.when;
@@ -78,12 +77,12 @@
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VfModules;
 import org.onap.aai.domain.yang.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.BaseTaskTest;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
@@ -1584,11 +1583,11 @@
 
         when(bbSetupUtils.getAAIVfModule(any(), any())).thenReturn(vfModule);
         doReturn(vnfcs).when(SPY_workflowAction).getRelatedResourcesInVfModule(any(), any(),
-                eq(org.onap.aai.domain.yang.Vnfc.class), eq(AAIObjectType.VNFC));
+                eq(org.onap.aai.domain.yang.Vnfc.class), eq(Types.VNFC));
         doReturn(config1).when(SPY_workflowAction).getRelatedResourcesInVnfc(eq(vnfc1),
-                eq(org.onap.aai.domain.yang.Configuration.class), eq(AAIObjectType.CONFIGURATION));
+                eq(org.onap.aai.domain.yang.Configuration.class), eq(Types.CONFIGURATION));
         doReturn(config2).when(SPY_workflowAction).getRelatedResourcesInVnfc(eq(vnfc2),
-                eq(org.onap.aai.domain.yang.Configuration.class), eq(AAIObjectType.CONFIGURATION));
+                eq(org.onap.aai.domain.yang.Configuration.class), eq(Types.CONFIGURATION));
 
         List<ExecuteBuildingBlock> results = SPY_workflowAction.getConfigBuildingBlocks(dataObj);
 
@@ -1659,11 +1658,11 @@
 
         when(bbSetupUtils.getAAIVfModule(any(), any())).thenReturn(vfModule);
         doReturn(vnfcs).when(SPY_workflowAction).getRelatedResourcesInVfModule(any(), any(),
-                eq(org.onap.aai.domain.yang.Vnfc.class), eq(AAIObjectType.VNFC));
+                eq(org.onap.aai.domain.yang.Vnfc.class), eq(Types.VNFC));
         doReturn(config1).when(SPY_workflowAction).getRelatedResourcesInVnfc(eq(vnfc1),
-                eq(org.onap.aai.domain.yang.Configuration.class), eq(AAIObjectType.CONFIGURATION));
+                eq(org.onap.aai.domain.yang.Configuration.class), eq(Types.CONFIGURATION));
         doReturn(config2).when(SPY_workflowAction).getRelatedResourcesInVnfc(eq(vnfc2),
-                eq(org.onap.aai.domain.yang.Configuration.class), eq(AAIObjectType.CONFIGURATION));
+                eq(org.onap.aai.domain.yang.Configuration.class), eq(Types.CONFIGURATION));
 
         List<ExecuteBuildingBlock> results = SPY_workflowAction.getConfigBuildingBlocks(dataObj);
 
@@ -1763,13 +1762,13 @@
         List<AAIResultWrapper> configurationResultWrappers = new ArrayList<AAIResultWrapper>();
         configurationResultWrappers.add(configurationWrapper);
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfc.getVnfcName());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfc.getVnfcName()));
         when(bbSetupUtils.getAAIResourceDepthOne(uri)).thenReturn(vfncWrapper);
 
         doReturn(configurationResultWrappers).when(SPY_workflowAction).getResultWrappersFromRelationships(anyObject(),
                 anyObject());
         org.onap.aai.domain.yang.Configuration configuration = SPY_workflowAction.getRelatedResourcesInVnfc(vnfc,
-                org.onap.aai.domain.yang.Configuration.class, AAIObjectType.CONFIGURATION);
+                org.onap.aai.domain.yang.Configuration.class, Types.CONFIGURATION);
         assertEquals("testConfigurationId", configuration.getConfigurationId());
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java
index 2c7ab92..fcd44e1 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAICollectionResourcesTest.java
@@ -28,18 +28,11 @@
 import static org.mockito.Mockito.verify;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.bpmn.BaseTaskTest;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.common.data.TestDataSetup;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.client.aai.mapper.AAIObjectMapper;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
 public class AAICollectionResourcesTest extends BaseTaskTest {
@@ -65,7 +58,8 @@
 
         assertEquals(OrchestrationStatus.INVENTORIED, networkCollection.getOrchestrationStatus());
         verify(MOCK_aaiResourcesClient, times(1)).create(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId())),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()))),
                 isA(org.onap.aai.domain.yang.Collection.class));
     }
 
@@ -74,15 +68,16 @@
         doReturn(new org.onap.aai.domain.yang.Collection()).when(MOCK_aaiObjectMapper).mapCollection(networkCollection);
         aaiCollectionResources.updateCollection(networkCollection);
         verify(MOCK_aaiResourcesClient, times(1)).update(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId())),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()))),
                 isA(org.onap.aai.domain.yang.Collection.class));
     }
 
     @Test
     public void deleteCollectionTest() throws Exception {
         aaiCollectionResources.deleteCollection(networkCollection);
-        verify(MOCK_aaiResourcesClient, times(1))
-                .delete(eq(AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, networkCollection.getId())));
+        verify(MOCK_aaiResourcesClient, times(1)).delete(eq(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()))));
     }
 
 }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
index 2bf177e..11694ff 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
@@ -35,6 +35,11 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
@@ -44,11 +49,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
@@ -204,7 +204,8 @@
 
     @Test
     public void getConfigurationTest() {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, "configurationId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration("configurationId"));
         doReturn(Optional.of(new org.onap.aai.domain.yang.Configuration())).when(MOCK_aaiResourcesClient)
                 .get(org.onap.aai.domain.yang.Configuration.class, aaiResourceUri);
         aaiConfigurationResources.getConfiguration("configurationId");
@@ -213,7 +214,8 @@
 
     @Test
     public void deleteConfigurationTest() {
-        AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, "configurationId");
+        AAIResourceUri aaiResourceUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration("configurationId"));
         doNothing().when(MOCK_aaiResourcesClient).delete(aaiResourceUri);
         aaiConfigurationResources.deleteConfiguration("configurationId");
         verify(MOCK_aaiResourcesClient, times(1)).delete(aaiResourceUri);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java
index a73cf81..b2978e6 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIInstanceGroupResourcesTest.java
@@ -36,18 +36,17 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.common.data.TestDataSetup;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.common.data.TestDataSetup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 
 @RunWith(MockitoJUnitRunner.Silent.class)
@@ -83,39 +82,42 @@
                 .mapInstanceGroup(instanceGroup);
         aaiInstanceGroupResources.createInstanceGroup(instanceGroup);
         verify(MOCK_aaiResourcesClient, times(1)).createIfNotExists(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))),
                 isA(Optional.class));
     }
 
     @Test
     public void deleteInstanceGroupTest() throws Exception {
         aaiInstanceGroupResources.deleteInstanceGroup(instanceGroup);
-        verify(MOCK_aaiResourcesClient, times(1))
-                .delete(eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())));
+        verify(MOCK_aaiResourcesClient, times(1)).delete(eq(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))));
     }
 
     @Test
     public void connectInstanceGroupTest() throws Exception {
         aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId())));
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()))));
     }
 
     @Test
     public void connectInstanceGroupWithEdgeTest() throws Exception {
         aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf, AAIEdgeLabel.BELONGS_TO);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId())),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()))),
                 eq(AAIEdgeLabel.BELONGS_TO));
     }
 
     @Test
     public void existsTest() throws Exception {
         aaiInstanceGroupResources.exists(instanceGroup);
-        verify(MOCK_aaiResourcesClient, times(1))
-                .exists(eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())));
+        verify(MOCK_aaiResourcesClient, times(1)).exists(eq(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))));
     }
 
     @Test
@@ -135,7 +137,7 @@
 
     @Test
     public void checkInstanceGroupNameInUseTrueTest() throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.INSTANCE_GROUP)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroups())
                 .queryParam("instance-group-name", "instanceGroupName");
         doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiInstanceGroupResources.checkInstanceGroupNameInUse("instanceGroupName");
@@ -144,7 +146,7 @@
 
     @Test
     public void checkInstanceGroupNameInUseFalseTest() throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.INSTANCE_GROUP)
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroups())
                 .queryParam("instance-group-name", "instanceGroupName");
         doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiInstanceGroupResources.checkInstanceGroupNameInUse("instanceGroupName");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
index 3bc4fc0..535a159 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
@@ -46,6 +46,14 @@
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aai.domain.yang.RouteTableReference;
 import org.onap.aai.domain.yang.VpnBinding;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
+import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
+import org.onap.aaiclient.client.aai.entities.Relationships;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
@@ -55,15 +63,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
-import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.Relationships;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
@@ -167,7 +166,8 @@
                 new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiVpnBinding.json")));
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<VpnBinding> oVpnBinding = Optional.empty();
-        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, "ModelInvariantUUID");
+        AAIResourceUri aaiUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vpnBinding("ModelInvariantUUID"));
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
         oVpnBinding = aaiNetworkResources.getVpnBinding(aaiUri);
@@ -186,7 +186,7 @@
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<org.onap.aai.domain.yang.NetworkPolicy> oNetPolicy = Optional.empty();
         AAIResourceUri netPolicyUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, "ModelInvariantUUID");
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicy("ModelInvariantUUID"));
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
         oNetPolicy = aaiNetworkResources.getNetworkPolicy(netPolicyUri);
@@ -204,7 +204,8 @@
                 new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiNetworkPolicies.json")));
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<org.onap.aai.domain.yang.NetworkPolicies> oNetPolicies = Optional.empty();
-        AAIPluralResourceUri netPoliciesUri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY);
+        AAIPluralResourceUri netPoliciesUri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().networkPolicies());
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIPluralResourceUri.class));
         oNetPolicies = aaiNetworkResources.getNetworkPolicies(netPoliciesUri);
@@ -222,8 +223,8 @@
                 new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiNetworkTableRefs.json")));
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<RouteTableReference> oRtref = Optional.empty();
-        AAIResourceUri rTRefUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.ROUTE_TABLE_REFERENCE, "ModelInvariantUUID");
+        AAIResourceUri rTRefUri = AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().routeTableReference("ModelInvariantUUID"));
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
         oRtref = aaiNetworkResources.getRouteTable(rTRefUri);
@@ -310,41 +311,45 @@
     public void connectNetworkToNetworkCollectionInstanceGroupTest() throws Exception {
         aaiNetworkResources.connectNetworkToNetworkCollectionInstanceGroup(network, instanceGroup);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId())));
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()))));
     }
 
     @Test
     public void connectNetworkToNetworkCollectionServiceInstanceTest() throws Exception {
         aaiNetworkResources.connectNetworkToNetworkCollectionServiceInstance(network, serviceInstance);
         verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()))));
     }
 
     @Test
     public void connectNetworkToCloudRegionTest() throws Exception {
         aaiNetworkResources.connectNetworkToCloudRegion(network, cloudRegion);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, cloudRegion.getCloudOwner(),
-                        cloudRegion.getLcpCloudRegionId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()))));
     }
 
     @Test
     public void connectNetworkToTenantTest() throws Exception {
         aaiNetworkResources.connectNetworkToTenant(network, cloudRegion);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudRegion.getCloudOwner(),
-                        cloudRegion.getLcpCloudRegionId(), cloudRegion.getTenantId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, network.getNetworkId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                        .tenant(cloudRegion.getTenantId()))),
+                (eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId())))));
     }
 
     @Test
     public void connectNetworkCollectionInstanceGroupToNetworkCollectionTest() throws Exception {
         aaiNetworkResources.connectNetworkCollectionInstanceGroupToNetworkCollection(instanceGroup, collection);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, collection.getId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(collection.getId()))),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))));
     }
 
     @Test
@@ -384,9 +389,10 @@
     public void connectInstanceGroupToCloudRegionTest() throws Exception {
         aaiNetworkResources.connectInstanceGroupToCloudRegion(instanceGroup, cloudRegion);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, instanceGroup.getId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, cloudRegion.getCloudOwner(),
-                        cloudRegion.getLcpCloudRegionId())),
+                eq(AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()))),
                 eq(AAIEdgeLabel.USES));
     }
 
@@ -396,8 +402,8 @@
                 new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiSubnetsMapped_to_aai.json")));
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<org.onap.aai.domain.yang.Subnet> oSubnet = Optional.empty();
-        AAIResourceUri subnetUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.SUBNET, "ModelInvariantUUID", "serviceModelVersionId");
+        AAIResourceUri subnetUri = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.network().l3Network("ModelInvariantUUID").subnet("serviceModelVersionId"));
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
         oSubnet = aaiNetworkResources.getSubnet(subnetUri);
@@ -429,8 +435,8 @@
 
     @Test
     public void checkInstanceGroupNameInUseTrueTest() throws Exception {
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", "networkName");
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks())
+                .queryParam("network-name", "networkName");
         doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiNetworkResources.checkNetworkNameInUse("networkName");
         assertTrue(nameInUse);
@@ -438,8 +444,8 @@
 
     @Test
     public void checkInstanceGroupNameInUseFalseTest() throws Exception {
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", "networkName");
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Networks())
+                .queryParam("network-name", "networkName");
         doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiNetworkResources.checkNetworkNameInUse("networkName");
         assertFalse(nameInUse);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java
index b8be045..8547ea5 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIPnfResourcesTest.java
@@ -32,25 +32,25 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.Optional;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import joptsimple.internal.Strings;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoPnf;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import joptsimple.internal.Strings;
 
 @RunWith(MockitoJUnitRunner.Silent.class)
 public class AAIPnfResourcesTest extends TestDataSetup {
@@ -118,7 +118,8 @@
         Pnf pnfTest = createPnfWithDefaultName();
         org.onap.aai.domain.yang.Pnf pnfFromAai = createPnf(OrchestrationStatus.INVENTORIED.toString());
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
         verify(aaiResourcesClientMock, times(1)).update(any(), any());
@@ -131,7 +132,8 @@
         org.onap.aai.domain.yang.Pnf pnfFromAai = createPnf(null);
         pnfTest.setRole("test");
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
         verify(aaiResourcesClientMock, times(1)).update(any(), eq(pnfFromAai));
@@ -143,7 +145,8 @@
         org.onap.aai.domain.yang.Pnf pnfFromAai = createPnf(null);
         Pnf pnfTest = getPnfWithTestValues();
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
         verify(aaiResourcesClientMock, times(1)).update(any(), eq(pnfFromAai));
@@ -181,7 +184,8 @@
         Pnf pnfTest = createPnfWithDefaultName();
         org.onap.aai.domain.yang.Pnf pnfFromAai = createPnf(Strings.EMPTY);
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
     }
@@ -192,7 +196,8 @@
         Pnf pnfTest = createPnfWithDefaultName();
         org.onap.aai.domain.yang.Pnf pnfFromAai = createPnf(OrchestrationStatus.ACTIVE.toString());
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         try {
             testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
@@ -216,7 +221,8 @@
         org.onap.aai.domain.yang.Pnf pnfFromAai =
                 new ObjectMapper().readValue(new File(path), org.onap.aai.domain.yang.Pnf.class);
         when(injectionHelperMock.getAaiClient().get(org.onap.aai.domain.yang.Pnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.PNF, PNF_NAME))).thenReturn(Optional.of(pnfFromAai));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(PNF_NAME))))
+                        .thenReturn(Optional.of(pnfFromAai));
         // when
         try {
             testedObject.checkIfPnfExistsInAaiAndCanBeUsed(pnfTest);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java
index 9f9ac88..8ccb462 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIServiceInstanceResourcesTest.java
@@ -39,6 +39,11 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
@@ -46,11 +51,6 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
@@ -195,7 +195,7 @@
 
     @Test
     public void checkInstanceServiceNameInUseTrueTest() throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(AAIObjectPlurals.SERVICE_INSTANCE)
+        AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
                 .queryParam("service-instance-name", serviceInstance.getServiceInstanceName());
         doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiServiceInstanceResources.checkInstanceServiceNameInUse(serviceInstance);
@@ -204,7 +204,7 @@
 
     @Test
     public void checkInstanceServiceNameInUseFalseTest() throws Exception {
-        AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(AAIObjectPlurals.SERVICE_INSTANCE)
+        AAIPluralResourceUri uri = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
                 .queryParam("service-instance-name", serviceInstance.getServiceInstanceName());
         doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(uri));
         boolean nameInUse = aaiServiceInstanceResources.checkInstanceServiceNameInUse(serviceInstance);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
index 3dbacd2..7cc6282 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
@@ -38,17 +38,17 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
@@ -163,7 +163,7 @@
 
     @Test
     public void checkNameInUseTrueTest() throws Exception {
-        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE)
+        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment())
                 .queryParam("vf-module-name", vfModule.getVfModuleName());
         AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id",
                 vfModule.getModelInfoVfModule().getModelCustomizationUUID());
@@ -175,7 +175,7 @@
 
     @Test
     public void checkNameInUseFalseIsResumeTest() throws Exception {
-        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE)
+        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment())
                 .queryParam("vf-module-name", vfModule.getVfModuleName());
         AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id",
                 vfModule.getModelInfoVfModule().getModelCustomizationUUID());
@@ -186,7 +186,7 @@
 
     @Test
     public void checkNameInUseFalseTest() throws Exception {
-        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VF_MODULE)
+        AAIPluralResourceUri vfModuleUri = AAIUriFactory.createNodesUri(Types.VF_MODULES.getFragment())
                 .queryParam("vf-module-name", vfModule.getVfModuleName());
         AAIPluralResourceUri vfModuleUriWithCustomization = vfModuleUri.clone().queryParam("model-customization-id",
                 vfModule.getModelInfoVfModule().getModelCustomizationUUID());
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
index 7750c8a..bdde1a1 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
@@ -43,15 +43,6 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.bpmn.common.InjectionHelper;
-import org.onap.so.bpmn.common.data.TestDataSetup;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.AAIRestClientImpl;
 import org.onap.aaiclient.client.aai.AAIValidatorImpl;
@@ -59,8 +50,16 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.client.aai.mapper.AAIObjectMapper;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
+import org.onap.so.bpmn.common.InjectionHelper;
+import org.onap.so.bpmn.common.data.TestDataSetup;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
 @RunWith(MockitoJUnitRunner.Silent.class)
@@ -197,18 +196,19 @@
     public void connectVnfToTenantTest() throws Exception {
         aaiVnfResources.connectVnfToTenant(genericVnf, cloudRegion);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudRegion.getCloudOwner(),
-                        cloudRegion.getLcpCloudRegionId(), cloudRegion.getTenantId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnf.getVnfId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())
+                        .tenant(cloudRegion.getTenantId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnf.getVnfId()))));
     }
 
     @Test
     public void connectVnfToCloudRegionTest() throws Exception {
         aaiVnfResources.connectVnfToCloudRegion(genericVnf, cloudRegion);
         verify(MOCK_aaiResourcesClient, times(1)).connect(
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnf.getVnfId())),
-                eq(AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, cloudRegion.getCloudOwner(),
-                        cloudRegion.getLcpCloudRegionId())));
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnf.getVnfId()))),
+                eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId()))));
     }
 
 
@@ -244,8 +244,8 @@
 
     @Test
     public void checkNameInUseTrueTest() {
-        AAIPluralResourceUri vnfUri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", "vnfName");
+        AAIPluralResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs())
+                .queryParam("vnf-name", "vnfName");
         doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(vnfUri));
         boolean nameInUse = aaiVnfResources.checkNameInUse("vnfName");
         assertTrue(nameInUse);
@@ -253,8 +253,8 @@
 
     @Test
     public void checkNameInUseFalseTest() {
-        AAIPluralResourceUri vnfUri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", "vnfName");
+        AAIPluralResourceUri vnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs())
+                .queryParam("vnf-name", "vnfName");
         doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(vnfUri));
         boolean nameInUse = aaiVnfResources.checkNameInUse("vnfName");
         assertFalse(nameInUse);
@@ -262,7 +262,8 @@
 
     @Test
     public void queryVnfWrapperByIdTest() throws Exception {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId").depth(Depth.ALL);
+        AAIResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")).depth(Depth.ALL);
         final String aaiResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiGenericVnf.json")));
         GenericVnf genericVnf = new GenericVnf();
         genericVnf.setVnfId("vnfId");
@@ -279,8 +280,8 @@
                 new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiVserverQueryResponse.json")));
         AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
         Optional<org.onap.aai.domain.yang.Vserver> oVserver = Optional.empty();
-        AAIResourceUri vserverUri = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, "ModelInvariantUUID",
-                "serviceModelVersionId", "abc", "abc");
+        AAIResourceUri vserverUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion("ModelInvariantUUID", "serviceModelVersionId").tenant("abc").vserver("abc"));
 
         doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
         oVserver = aaiVnfResources.getVserver(vserverUri);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
index 0eae6a3..ada5972 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
@@ -37,16 +37,16 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
 import org.onap.so.bpmn.common.data.TestDataSetup;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.client.aai.mapper.AAIObjectMapper;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 
@@ -155,7 +155,7 @@
 
     @Test
     public void checkNameInUseTrueTest() {
-        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VOLUME_GROUP)
+        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(Types.VOLUME_GROUPS.getFragment())
                 .queryParam("volume-group-name", "testVolumeGroupName1");
         doReturn(true).when(MOCK_aaiResourcesClient).exists(eq(volumeGroupUri));
         boolean nameInUse = aaiVolumeGroupResources.checkNameInUse(volumeGroup);
@@ -164,7 +164,7 @@
 
     @Test
     public void checkNameInUseFalseTest() {
-        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(AAIObjectPlurals.VOLUME_GROUP)
+        AAIPluralResourceUri volumeGroupUri = AAIUriFactory.createNodesUri(Types.VOLUME_GROUPS.getFragment())
                 .queryParam("volume-group-name", "testVolumeGroupName1");
         doReturn(false).when(MOCK_aaiResourcesClient).exists(eq(volumeGroupUri));
         boolean nameInUse = aaiVolumeGroupResources.checkNameInUse(volumeGroup);
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java
index 998aea9..ee06fa4 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java
@@ -22,63 +22,12 @@
 
 import java.io.Serializable;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectPlurals;
-import org.onap.so.constants.Defaults;
 import com.google.common.base.CaseFormat;
 
 public class AAIObjectPlurals implements AAIObjectBase, GraphInventoryObjectPlurals, Serializable {
 
     private static final long serialVersionUID = 5312713297525740746L;
 
-    public static final AAIObjectPlurals CUSTOMER =
-            new AAIObjectPlurals(AAIObjectType.CUSTOMER, AAINamespaceConstants.BUSINESS, "/customers");
-    public static final AAIObjectPlurals GENERIC_VNF =
-            new AAIObjectPlurals(AAIObjectType.GENERIC_VNF, AAINamespaceConstants.NETWORK, "/generic-vnfs");
-    public static final AAIObjectPlurals PORT_GROUP =
-            new AAIObjectPlurals(AAIObjectType.PORT_GROUP, AAIObjectType.VCE.uriTemplate(), "/port-groups");
-    public static final AAIObjectPlurals PSERVER =
-            new AAIObjectPlurals(AAIObjectType.PSERVER, AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/pservers");
-    public static final AAIObjectPlurals P_INTERFACE =
-            new AAIObjectPlurals(AAIObjectType.P_INTERFACE, AAIObjectType.PSERVER.uriTemplate(), "/p-interfaces");
-    public static final AAIObjectPlurals L3_NETWORK =
-            new AAIObjectPlurals(AAIObjectType.L3_NETWORK, AAINamespaceConstants.NETWORK, "/l3-networks");
-    public static final AAIObjectPlurals NETWORK_POLICY =
-            new AAIObjectPlurals(AAIObjectType.NETWORK_POLICY, AAINamespaceConstants.NETWORK, "/network-policies");
-    public static final AAIObjectPlurals VPN_BINDING =
-            new AAIObjectPlurals(AAIObjectType.VPN_BINDING, AAINamespaceConstants.NETWORK, "/vpn-bindings");
-    public static final AAIObjectPlurals SERVICE_SUBSCRIPTION = new AAIObjectPlurals(AAIObjectType.SERVICE_SUBSCRIPTION,
-            AAIObjectType.CUSTOMER.uriTemplate(), "/service-subscriptions");
-    public static final AAIObjectPlurals SERVICE_INSTANCE = new AAIObjectPlurals(AAIObjectType.SERVICE_INSTANCE,
-            AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), "/service-instances");
-    public static final AAIObjectPlurals OWNING_ENTITY =
-            new AAIObjectPlurals(AAIObjectType.OWNING_ENTITY, AAINamespaceConstants.BUSINESS, "/owning-entities");
-    public static final AAIObjectPlurals VOLUME_GROUP = new AAIObjectPlurals(AAIObjectType.VOLUME_GROUP,
-            AAIObjectType.CLOUD_REGION.uriTemplate(), "/volume-groups");
-    public static final AAIObjectPlurals AVAILIBILITY_ZONE = new AAIObjectPlurals(AAIObjectType.AVAILIBILITY_ZONE,
-            AAIObjectType.CLOUD_REGION.uriTemplate(), "/availability-zones");
-    public static final AAIObjectPlurals VF_MODULE =
-            new AAIObjectPlurals(AAIObjectType.VF_MODULE, AAIObjectType.GENERIC_VNF.uriTemplate(), "/vf-modules");
-    public static final AAIObjectPlurals CONFIGURATION =
-            new AAIObjectPlurals(AAIObjectType.CONFIGURATION, AAINamespaceConstants.NETWORK, "/configurations");
-    public static final AAIObjectPlurals DEFAULT_TENANT =
-            new AAIObjectPlurals(AAIObjectType.DEFAULT_TENANT, AAINamespaceConstants.CLOUD_INFRASTRUCTURE
-                    + "/cloud-regions/cloud-region/" + Defaults.CLOUD_OWNER + "/AAIAIC25", "/tenants");
-    public static final AAIObjectPlurals NETWORK_TECHNOLOGY = new AAIObjectPlurals(AAIObjectType.NETWORK_TECHNOLOGY,
-            AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/network-technologies");
-    public static final AAIObjectPlurals LOGICAL_LINK =
-            new AAIObjectPlurals(AAIObjectType.LOGICAL_LINK, AAINamespaceConstants.NETWORK, "/logical-links");
-    public static final AAIObjectPlurals L_INTERFACE =
-            new AAIObjectPlurals(AAIObjectType.L_INTERFACE, AAIObjectType.VSERVER.uriTemplate(), "/l-interfaces");
-    public static final AAIObjectPlurals SUB_L_INTERFACE =
-            new AAIObjectPlurals(AAIObjectType.L_INTERFACE, AAIObjectType.L_INTERFACE.uriTemplate(), "/l-interfaces");
-    public static final AAIObjectPlurals INSTANCE_GROUP =
-            new AAIObjectPlurals(AAIObjectType.INSTANCE_GROUP, AAINamespaceConstants.NETWORK, "/instance-groups");
-    public static final AAIObjectPlurals PNF =
-            new AAIObjectPlurals(AAIObjectType.PNF, AAINamespaceConstants.NETWORK, "/pnfs");
-    public static final AAIObjectPlurals PROJECT =
-            new AAIObjectPlurals(AAIObjectType.PROJECT, AAINamespaceConstants.BUSINESS, "/projects");
-    public static final AAIObjectPlurals VSERVER =
-            new AAIObjectPlurals(AAIObjectType.VSERVER, AAIObjectType.TENANT.uriTemplate(), "/vservers");
-
     private final String uriTemplate;
     private final String partialUri;
     private final String name;
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java
index dae5c62..55a487d 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java
@@ -27,175 +27,30 @@
 import java.util.Set;
 import java.util.regex.Pattern;
 import org.onap.aai.annotations.Metadata;
-import org.onap.aai.domain.yang.AggregateRoute;
-import org.onap.aai.domain.yang.AllottedResource;
-import org.onap.aai.domain.yang.AvailabilityZone;
-import org.onap.aai.domain.yang.CloudRegion;
-import org.onap.aai.domain.yang.Collection;
-import org.onap.aai.domain.yang.CommunicationServiceProfile;
-import org.onap.aai.domain.yang.Complex;
-import org.onap.aai.domain.yang.Configuration;
-import org.onap.aai.domain.yang.Connector;
-import org.onap.aai.domain.yang.Customer;
-import org.onap.aai.domain.yang.Device;
-import org.onap.aai.domain.yang.EsrVnfm;
-import org.onap.aai.domain.yang.ExtAaiNetwork;
-import org.onap.aai.domain.yang.Flavor;
-import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aai.domain.yang.Image;
-import org.onap.aai.domain.yang.InstanceGroup;
-import org.onap.aai.domain.yang.L3Network;
-import org.onap.aai.domain.yang.LInterface;
-import org.onap.aai.domain.yang.LagInterface;
-import org.onap.aai.domain.yang.LineOfBusiness;
-import org.onap.aai.domain.yang.LogicalLink;
-import org.onap.aai.domain.yang.ModelVer;
-import org.onap.aai.domain.yang.NetworkPolicy;
-import org.onap.aai.domain.yang.NetworkTechnology;
-import org.onap.aai.domain.yang.OperationalEnvironment;
-import org.onap.aai.domain.yang.OwningEntity;
-import org.onap.aai.domain.yang.PInterface;
-import org.onap.aai.domain.yang.PhysicalLink;
-import org.onap.aai.domain.yang.Platform;
-import org.onap.aai.domain.yang.Pnf;
-import org.onap.aai.domain.yang.PortGroup;
-import org.onap.aai.domain.yang.Project;
-import org.onap.aai.domain.yang.Pserver;
-import org.onap.aai.domain.yang.RouteTableReference;
-import org.onap.aai.domain.yang.Service;
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aai.domain.yang.ServiceProfile;
-import org.onap.aai.domain.yang.ServiceSubscription;
-import org.onap.aai.domain.yang.SliceProfile;
-import org.onap.aai.domain.yang.SpPartner;
-import org.onap.aai.domain.yang.SriovPf;
-import org.onap.aai.domain.yang.SriovVf;
-import org.onap.aai.domain.yang.Subnet;
-import org.onap.aai.domain.yang.Tenant;
-import org.onap.aai.domain.yang.TunnelXconnect;
-import org.onap.aai.domain.yang.Vce;
-import org.onap.aai.domain.yang.VfModule;
-import org.onap.aai.domain.yang.VlanRange;
-import org.onap.aai.domain.yang.VlanTag;
-import org.onap.aai.domain.yang.Vnfc;
-import org.onap.aai.domain.yang.VolumeGroup;
-import org.onap.aai.domain.yang.VpnBinding;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.aai.domain.yang.Zone;
 import org.onap.aaiclient.client.aai.entities.uri.AAIFluentTypeReverseLookup;
+import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectType;
-import org.onap.so.constants.Defaults;
 import org.reflections.Reflections;
 import org.reflections.scanners.SubTypesScanner;
 import org.reflections.util.ClasspathHelper;
 import org.reflections.util.ConfigurationBuilder;
 import com.google.common.base.CaseFormat;
 
-public class AAIObjectType implements AAIObjectBase, GraphInventoryObjectType, Serializable {
+/**
+ * Types are accessed through AAIFluentTypeBuilder and should no longer be added as static members
+ *
+ */
+public class AAIObjectType implements AAIObjectBase, AAIObjectName, GraphInventoryObjectType, Serializable {
 
     private static final long serialVersionUID = -2877184776691514600L;
     private static Map<String, AAIObjectType> map = new HashMap<>();
 
-    public static final AAIObjectType DEFAULT_CLOUD_REGION = new AAIObjectType(
-            AAINamespaceConstants.CLOUD_INFRASTRUCTURE,
-            "/cloud-regions/cloud-region/" + Defaults.CLOUD_OWNER + "/{cloud-region-id}", "default-cloud-region");
-    public static final AAIObjectType CUSTOMER = new AAIObjectType(AAINamespaceConstants.BUSINESS, Customer.class);
     public static final AAIObjectType GENERIC_QUERY = new AAIObjectType("/search", "/generic-query", "generic-query");
     public static final AAIObjectType BULK_PROCESS = new AAIObjectType("/bulkprocess", "", "bulkprocess");
     public static final AAIObjectType SINGLE_TRANSACTION =
             new AAIObjectType("/bulk/single-transaction", "", "single-transaction");
-    public static final AAIObjectType GENERIC_VNF = new AAIObjectType(AAINamespaceConstants.NETWORK, GenericVnf.class);
-    public static final AAIObjectType GENERIC_VNFS =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, "/generic-vnfs", "generic-vnfs");
-    public static final AAIObjectType VF_MODULE =
-            new AAIObjectType(AAIObjectType.GENERIC_VNF.uriTemplate(), VfModule.class);
-    public static final AAIObjectType L3_NETWORK = new AAIObjectType(AAINamespaceConstants.NETWORK, L3Network.class);
-    public static final AAIObjectType NETWORK_POLICY =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, NetworkPolicy.class);
     public static final AAIObjectType NODES_QUERY = new AAIObjectType("/search", "/nodes-query", "nodes-query");
     public static final AAIObjectType CUSTOM_QUERY = new AAIObjectType("/query", "", "query");
-    public static final AAIObjectType ROUTE_TABLE_REFERENCE =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, RouteTableReference.class);
-    public static final AAIObjectType DEFAULT_TENANT =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE + "/cloud-regions/cloud-region/"
-                    + Defaults.CLOUD_OWNER + "/AAIAIC25", "/tenants/tenant/{tenant-id}", "default-tenant");
-    public static final AAIObjectType VCE = new AAIObjectType(AAINamespaceConstants.NETWORK, Vce.class);
-    public static final AAIObjectType PORT_GROUP = new AAIObjectType(AAIObjectType.VCE.uriTemplate(), PortGroup.class);
-    public static final AAIObjectType VPN_BINDING = new AAIObjectType(AAINamespaceConstants.NETWORK, VpnBinding.class);
-    public static final AAIObjectType CONFIGURATION =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, Configuration.class);
-    public static final AAIObjectType PSERVER =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, Pserver.class);
-    public static final AAIObjectType SERVICE_SUBSCRIPTION =
-            new AAIObjectType(AAIObjectType.CUSTOMER.uriTemplate(), ServiceSubscription.class);
-
-    public static final AAIObjectType SERVICE_INSTANCE_METADATA = new AAIObjectType(
-            AAIObjectType.SERVICE_INSTANCE + "/metadata", org.onap.aai.domain.yang.v13.Metadata.class);
-
-    public static final AAIObjectType SERVICE = new AAIObjectType(
-            AAINamespaceConstants.SERVICE_DESIGN_AND_CREATION + "/services/service/{service-id}", Service.class);
-    public static final AAIObjectType SERVICE_INSTANCE =
-            new AAIObjectType(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), ServiceInstance.class);
-    public static final AAIObjectType PROJECT = new AAIObjectType(AAINamespaceConstants.BUSINESS, Project.class);
-    public static final AAIObjectType LINE_OF_BUSINESS =
-            new AAIObjectType(AAINamespaceConstants.BUSINESS, LineOfBusiness.class);
-    public static final AAIObjectType PLATFORM = new AAIObjectType(AAINamespaceConstants.BUSINESS, Platform.class);
-    public static final AAIObjectType OWNING_ENTITY =
-            new AAIObjectType(AAINamespaceConstants.BUSINESS, OwningEntity.class);
-    public static final AAIObjectType ALLOTTED_RESOURCE =
-            new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), AllottedResource.class);
-    public static final AAIObjectType ALLOTTED_RESOURCE_ALL =
-            new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/allotted-resources", "allottedResources");
-    public static final AAIObjectType PNF = new AAIObjectType(AAINamespaceConstants.NETWORK, Pnf.class);
-    public static final AAIObjectType OPERATIONAL_ENVIRONMENT =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, OperationalEnvironment.class);
-    public static final AAIObjectType CLOUD_REGION =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, CloudRegion.class);
-    public static final AAIObjectType TENANT =
-            new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), Tenant.class);
-    public static final AAIObjectType VOLUME_GROUP =
-            new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), VolumeGroup.class);
-    public static final AAIObjectType VSERVER = new AAIObjectType(AAIObjectType.TENANT.uriTemplate(), Vserver.class);
-    public static final AAIObjectType MODEL_VER = new AAIObjectType(
-            AAINamespaceConstants.SERVICE_DESIGN_AND_CREATION + "/models/model/{model-invariant-id}", ModelVer.class);
-    public static final AAIObjectType TUNNEL_XCONNECT =
-            new AAIObjectType(AAIObjectType.ALLOTTED_RESOURCE.uriTemplate(), TunnelXconnect.class);
-    public static final AAIObjectType P_INTERFACE =
-            new AAIObjectType(AAIObjectType.PSERVER.uriTemplate(), PInterface.class);
-    public static final AAIObjectType SRIOV_PF =
-            new AAIObjectType(AAIObjectType.P_INTERFACE.uriTemplate(), SriovPf.class);
-    public static final AAIObjectType LOGICAL_LINK =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, LogicalLink.class);
-    public static final AAIObjectType PHYSICAL_LINK =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, PhysicalLink.class);
-    public static final AAIObjectType INSTANCE_GROUP =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, InstanceGroup.class);
-    public static final AAIObjectType COLLECTION = new AAIObjectType(AAINamespaceConstants.NETWORK, Collection.class);
-    public static final AAIObjectType VNFC = new AAIObjectType(AAINamespaceConstants.NETWORK, Vnfc.class);
-    public static final AAIObjectType VLAN_TAG = new AAIObjectType(AAINamespaceConstants.NETWORK, VlanTag.class);
-    public static final AAIObjectType COMPLEX =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, Complex.class);
-    public static final AAIObjectType CONNECTOR = new AAIObjectType(AAINamespaceConstants.BUSINESS, Connector.class);
-    public static final AAIObjectType NETWORK_TECHNOLOGY =
-            new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, NetworkTechnology.class);
-    public static final AAIObjectType SUBNET = new AAIObjectType(AAIObjectType.L3_NETWORK.uriTemplate(), Subnet.class);
-    public static final AAIObjectType SP_PARTNER = new AAIObjectType(AAINamespaceConstants.BUSINESS, SpPartner.class);
-    public static final AAIObjectType DEVICE = new AAIObjectType(AAINamespaceConstants.NETWORK, Device.class);
-    public static final AAIObjectType EXT_AAI_NETWORK =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, ExtAaiNetwork.class);
-    public static final AAIObjectType AGGREGATE_ROUTE =
-            new AAIObjectType(AAINamespaceConstants.NETWORK, AggregateRoute.class);
-    public static final AAIObjectType L_INTERFACE =
-            new AAIObjectType(AAIObjectType.VSERVER.uriTemplate(), LInterface.class);
-    public static final AAIObjectType SRIOV_VF =
-            new AAIObjectType(AAIObjectType.L_INTERFACE.uriTemplate(), SriovVf.class);
-    public static final AAIObjectType SUB_L_INTERFACE = new AAIObjectType(AAIObjectType.L_INTERFACE.uriTemplate(),
-            "/l-interfaces/l-interface/{sub-interface-name}", "sub-l-interface");
-    public static final AAIObjectType IMAGE = new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), Image.class);
-    public static final AAIObjectType FLAVOR =
-            new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), Flavor.class);
-
-    public static final AAIObjectType VLAN_RANGE = new AAIObjectType(CLOUD_REGION.uriTemplate(), VlanRange.class);
     public static final AAIObjectType UNKNOWN = new AAIObjectType("", "", "unknown") {
 
         private static final long serialVersionUID = 9208984071038447607L;
@@ -206,42 +61,9 @@
         }
     };
     public static final AAIObjectType DSL = new AAIObjectType("/dsl", "", "dsl");
-    public static final AAIObjectType VNFM = new AAIObjectType(
-            AAINamespaceConstants.EXTERNAL_SYSTEM + "/esr-vnfm-list/esr-vnfm/{vnfm-id}", EsrVnfm.class);
-    public static final AAIObjectType VNFM_LIST =
-            new AAIObjectType(AAINamespaceConstants.EXTERNAL_SYSTEM, "/esr-vnfm-list", "vnfm-list");
-    public static final AAIObjectType VNFM_ESR_SYSTEM_INFO_LIST =
-            new AAIObjectType(AAINamespaceConstants.EXTERNAL_SYSTEM + "/esr-vnfm-list",
-                    "/esr-vnfm/{vnfm-id}/esr-system-info-list", "vnfm-esr-system-info-list");
-    public static final AAIObjectType CLOUD_ESR_SYSTEM_INFO_LIST = new AAIObjectType(
-            AAIObjectType.CLOUD_REGION.uriTemplate(), "/esr-system-info-list", "cloud-esr-system-info-list");
-    public static final AAIObjectType ZONE = new AAIObjectType(AAINamespaceConstants.NETWORK, Zone.class);
-    public static final AAIObjectType AVAILIBILITY_ZONE =
-            new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), AvailabilityZone.class);
-    public static final AAIObjectType THIRDPARTY_SDNC_LIST = new AAIObjectType(AAINamespaceConstants.EXTERNAL_SYSTEM,
-            "/esr-thirdparty-sdnc-list", "thirdparty-sdnc-list");
-    public static final AAIObjectType THIRDPARTY_SDNC_SYSTEM_INFO_LIST =
-            new AAIObjectType(AAINamespaceConstants.EXTERNAL_SYSTEM + "/esr-thirdparty-sdnc-list",
-                    "/esr-thirdparty-sdnc/{sdnc-id}/esr-system-info-list", "thirdparty-sdnc-system-info-list");
-    public static final AAIObjectType COMMUNICATION_SERVICE_PROFILE =
-            new AAIObjectType(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), CommunicationServiceProfile.class);
-    public static final AAIObjectType SERVICE_PROFILE =
-            new AAIObjectType(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), ServiceProfile.class);
-    public static final AAIObjectType SERVICE_PROFILE_ALL =
-            new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/service-profiles", "serviceProfiles");
-    public static final AAIObjectType SLICE_PROFILE =
-            new AAIObjectType(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), SliceProfile.class);
-    public static final AAIObjectType SLICE_PROFILE_ALL =
-            new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/slice-profiles", "sliceProfiles");
-    public static final AAIObjectType COMMUNICATION_PROFILE_ALL = new AAIObjectType(
-            AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/communication-service-profiles", "communicationProfiles");
-    public static final AAIObjectType QUERY_ALLOTTED_RESOURCE =
-            new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "?depth=2", "service-Instance");
-
-    public static final AAIObjectType LAG_INTERFACE =
-            new AAIObjectType(AAIObjectType.PSERVER.uriTemplate(), LagInterface.class);
-
-
+    public static final AAIObjectType SUB_L_INTERFACE = new AAIObjectType(
+            "/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}",
+            "/l-interfaces/l-interface/{sub-interface-name}", "sub-l-interface");
 
     private final String uriTemplate;
     private final String parentUri;
@@ -346,8 +168,8 @@
     @Override
     public boolean equals(Object o) {
 
-        if (o instanceof AAIObjectBase) {
-            return this.typeName().equals(((AAIObjectBase) o).typeName());
+        if (o instanceof GraphInventoryObjectName) {
+            return this.typeName().equals(((GraphInventoryObjectName) o).typeName());
         }
 
         return false;
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
index 0aff965..c31d393 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIRestClientImpl.java
@@ -20,8 +20,6 @@
 
 package org.onap.aaiclient.client.aai;
 
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -36,9 +34,12 @@
 import org.onap.aaiclient.client.aai.entities.Results;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.Format;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class AAIRestClientImpl implements AAIRestClientI {
 
@@ -48,7 +49,7 @@
     @Override
     public List<Pserver> getPhysicalServerByVnfId(String vnfId) throws IOException {
         List<AAIResourceUri> startNodes = new ArrayList<>();
-        startNodes.add(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+        startNodes.add(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
         String jsonInput = new AAIQueryClient().query(Format.RESOURCE, new CustomQuery(startNodes, PSERVER_VNF_QUERY));
 
         return this.getListOfPservers(jsonInput);
@@ -70,20 +71,21 @@
     public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint) {
         GenericVnf genericVnf = new GenericVnf();
         genericVnf.setInMaint(inMaint);
-        new AAIResourcesClient().update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId), genericVnf);
+        new AAIResourcesClient()
+                .update(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)), genericVnf);
 
     }
 
     @Override
     public GenericVnf getVnfByName(String vnfId) {
-        return new AAIResourcesClient()
-                .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)).orElse(null);
+        return new AAIResourcesClient().get(GenericVnf.class,
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))).orElse(null);
     }
 
     @Override
     public Optional<Pnf> getPnfByName(String pnfId) {
-        Response response =
-                new AAIResourcesClient().getFullResponse(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId));
+        Response response = new AAIResourcesClient()
+                .getFullResponse(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfId)));
         if (response.getStatus() != 200) {
             return Optional.empty();
         } else {
@@ -93,20 +95,22 @@
 
     @Override
     public void createPnf(String pnfId, Pnf pnf) {
-        new AAIResourcesClient().createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId),
-                Optional.of(pnf));
+        new AAIResourcesClient().createIfNotExists(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfId)), Optional.of(pnf));
     }
 
     @Override
     public void updatePnf(String pnfId, Pnf pnf) {
-        new AAIResourcesClient().update(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId), pnf);
+        new AAIResourcesClient().update(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfId)),
+                pnf);
     }
 
     @Override
     public Optional<ServiceInstance> getServiceInstanceById(String globalSubscriberId, String serviceType,
             String serviceInstanceId) {
-        Response response = new AAIResourcesClient().getFullResponse(AAIUriFactory
-                .createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId));
+        Response response = new AAIResourcesClient().getFullResponse(
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalSubscriberId)
+                        .serviceSubscription(serviceType).serviceInstance(serviceInstanceId)));
         return Optional.ofNullable(response.readEntity(ServiceInstance.class));
     }
 
@@ -114,8 +118,9 @@
     public void updateServiceInstance(String globalSubscriberId, String serviceType, String serviceInstanceId,
             ServiceInstance serviceInstance) {
         try {
-            new AAIResourcesClient().update(AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    globalSubscriberId, serviceType, serviceInstanceId), serviceInstance);
+            new AAIResourcesClient().update(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                    .customer(globalSubscriberId).serviceSubscription(serviceType).serviceInstance(serviceInstanceId)),
+                    serviceInstance);
         } catch (Throwable ex) {
             log.error("Exception happened while updating ServiceInstance, Exception: {}", ex.getLocalizedMessage());
             throw new RuntimeException(ex);
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java
index bd9f4c7..95cb1fe 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java
@@ -1,5 +1,6 @@
 package org.onap.aaiclient.client.aai.entities.uri;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -20,7 +21,7 @@
                     (Class<? extends GraphInventoryFluentType.Info>) Class
                             .forName("org.onap.aaiclient.client.generated.fluentbuilders." + className + "$Info");
 
-            GraphInventoryFluentType.Info type = clazz.newInstance();
+            GraphInventoryFluentType.Info type = clazz.getConstructor().newInstance();
 
             Optional<String> parentTemplate = findParentPath(type, uri);
             if (parentTemplate.isPresent()) {
@@ -29,7 +30,8 @@
                 // fallback to enum lookup
                 return AAIObjectType.fromTypeName(name);
             }
-        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
+        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException
+                | InvocationTargetException | NoSuchMethodException | SecurityException e) {
         }
         return AAIObjectType.UNKNOWN;
     }
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java
index 6bb2cbd..be49535 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java
@@ -21,29 +21,43 @@
 package org.onap.aaiclient.client.aai.entities.uri;
 
 import java.net.URI;
+import org.onap.aaiclient.client.aai.AAIObjectName;
 import org.onap.aaiclient.client.aai.AAIObjectPlurals;
 import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 
 public class AAIUriFactory {
 
+
+    public static final AAIFluentTypeReverseLookup reverseLookup = new AAIFluentTypeReverseLookup();
+
     /**
      * values are filled into the URI template specified in {@link AAIObjectType} in order <br>
-     * There are two special lookups performed on certain types when a single value is specified: <br>
-     * Service Instance and AllottedResources <br>
-     * These can be retrieved without all their required keys but an HTTP call is required to do so
-     * 
+     *
      * @param type
      * @param values
      * @return
      */
     public static AAIResourceUri createResourceUri(AAIObjectType type, Object... values) {
-        if (AAIObjectType.SERVICE_INSTANCE.equals(type)) {
-            return new ServiceInstanceUri(values);
-        } else if (AAIObjectType.ALLOTTED_RESOURCE.equals(type)) {
-            return new AllottedResourceLookupUri(values);
+        return new AAISimpleUri(type, values);
+    }
+
+    /**
+     * These can be retrieved without all their required keys but an HTTP call is required to do so
+     *
+     * @param type
+     * @param values
+     * @return
+     */
+    public static AAIResourceUri createResourceUri(AAISingleFragment fragment) {
+
+        if (Types.SERVICE_INSTANCE.typeName().equals(fragment.get().build().typeName())) {
+            return new ServiceInstanceUri(fragment);
+        } else if (Types.ALLOTTED_RESOURCE.typeName().equals(fragment.get().build().typeName())) {
+            return new AllottedResourceLookupUri(fragment);
         } else {
-            return new AAISimpleUri(type, values);
+            return null;
         }
     }
 
@@ -51,13 +65,16 @@
         return new AAISimpleUri(uri.build(), uri.values());
     }
 
-    public static NodesSingleUri createNodesUri(AAIObjectType type, Object... values) {
+    protected static NodesSingleUri createNodesUri(AAIObjectType type, Object... values) {
         return new NodesSingleUri(type, values);
-
     }
 
-    public static NodesPluralUri createNodesUri(AAIObjectPlurals type) {
-        return new NodesPluralUri(type);
+    public static NodesSingleUri createNodesUri(AAISingleFragment fragment) {
+        return new NodesSingleUri(fragment.get().build(), fragment.get().values());
+    }
+
+    public static NodesPluralUri createNodesUri(AAIPluralFragment fragment) {
+        return new NodesPluralUri(fragment.get().build());
 
     }
 
@@ -68,7 +85,8 @@
      * @param uri
      * @return
      */
-    public static AAISimpleUri createResourceFromExistingURI(AAIObjectType type, URI uri) {
+    public static AAISimpleUri createResourceFromExistingURI(AAIObjectName name, URI uri) {
+        AAIObjectType type = reverseLookup.fromName(name.typeName(), uri.toString());
         return new AAISimpleUri(type, uri);
     }
 
@@ -81,20 +99,19 @@
      * @param childValues
      * @return
      */
-    public static AAISimpleUri createResourceFromParentURI(AAIResourceUri parentUri, AAIObjectType childType,
-            Object... childValues) {
+    public static AAISimpleUri createResourceFromParentURI(AAIResourceUri parentUri, AAISingleFragment fragment) {
 
-        return new AAISimpleUri(parentUri, childType, childValues);
+        return new AAISimpleUri(parentUri, fragment.get().build(), fragment.get().values());
     }
 
-    public static AAISimplePluralUri createResourceFromParentURI(AAIResourceUri parentUri, AAIObjectPlurals childType) {
+    public static AAISimplePluralUri createResourceFromParentURI(AAIResourceUri parentUri, AAIPluralFragment fragment) {
 
-        return new AAISimplePluralUri(parentUri, childType);
+        return new AAISimplePluralUri(parentUri, fragment.get().build());
     }
 
     public static AAISimplePluralUri createResourceUri(AAIFluentPluralType uri) {
 
-        return new AAISimplePluralUri(uri.build());
+        return new AAISimplePluralUri(uri.build(), uri.values());
 
     }
 
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUri.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUri.java
index 7f51835..099f717 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUri.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUri.java
@@ -25,22 +25,25 @@
 import javax.ws.rs.core.UriBuilder;
 import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
 public class AllottedResourceLookupUri extends HttpLookupUri {
 
     private static final long serialVersionUID = -9212594383876793188L;
 
-    protected AllottedResourceLookupUri(Object... values) {
-        super(AAIObjectType.ALLOTTED_RESOURCE, values);
+    protected AllottedResourceLookupUri(AAIObjectType type, UriBuilder builder, Optional<String> cachedValue,
+            Object... values) {
+        super(type, builder, cachedValue, values);
     }
 
-    protected AllottedResourceLookupUri(UriBuilder builder, Optional<String> cachedValue, Object... values) {
-        super(AAIObjectType.ALLOTTED_RESOURCE, builder, cachedValue, values);
+    protected AllottedResourceLookupUri(AAISingleFragment fragment) {
+        super(AAIFluentTypeBuilder.business().customer("").serviceSubscription("").serviceInstance("")
+                .allottedResource("").build(), fragment.get().values());
     }
 
     @Override
     public AllottedResourceLookupUri clone() {
-        return new AllottedResourceLookupUri(this.internalURI.clone(), this.getCachedValue(), values);
+        return new AllottedResourceLookupUri(this.aaiType, this.internalURI.clone(), this.getCachedValue(), values);
     }
 
     public AAIResourcesClient getResourcesClient() {
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/HttpLookupUri.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/HttpLookupUri.java
index c39eb50..42f5256 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/HttpLookupUri.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/HttpLookupUri.java
@@ -45,7 +45,7 @@
 public abstract class HttpLookupUri extends AAISimpleUri implements HttpAwareUri {
 
     private transient Optional<String> cachedValue = Optional.empty();
-    private final AAIObjectType aaiType;
+    protected final AAIObjectType aaiType;
 
     protected HttpLookupUri(AAIObjectType type, Object... values) {
         super(type, values);
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUri.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUri.java
index 96eaac5..366a011 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUri.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUri.java
@@ -25,22 +25,25 @@
 import javax.ws.rs.core.UriBuilder;
 import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
 public class ServiceInstanceUri extends HttpLookupUri {
 
     private static final long serialVersionUID = 2248914170527514548L;
 
-    protected ServiceInstanceUri(Object... values) {
-        super(AAIObjectType.SERVICE_INSTANCE, values);
+    protected ServiceInstanceUri(AAIObjectType type, UriBuilder builder, Optional<String> cachedValue,
+            Object... values) {
+        super(type, builder, cachedValue, values);
     }
 
-    protected ServiceInstanceUri(UriBuilder builder, Optional<String> cachedValue, Object... values) {
-        super(AAIObjectType.SERVICE_INSTANCE, builder, cachedValue, values);
+    protected ServiceInstanceUri(AAISingleFragment fragment) {
+        super(AAIFluentTypeBuilder.business().customer("").serviceSubscription("").serviceInstance("").build(),
+                fragment.get().values());
     }
 
     @Override
     public ServiceInstanceUri clone() {
-        return new ServiceInstanceUri(this.internalURI.clone(), this.getCachedValue(), values);
+        return new ServiceInstanceUri(this.aaiType, this.internalURI.clone(), this.getCachedValue(), values);
     }
 
     public AAIResourcesClient getResourcesClient() {
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java
index 000521b..12051fb 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java
@@ -22,16 +22,15 @@
 
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;
-import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 public class AAIObjectTypeTest {
 
     @Test
     public void fromTypeNameTest() throws IllegalArgumentException, IllegalAccessException, InstantiationException {
-        AAIObjectType type = AAIObjectType.fromTypeName("allotted-resource");
-        assertEquals("allotted-resource", type.typeName());
+        AAIObjectType type = AAIObjectType.fromTypeName("generic-query");
+        assertEquals("generic-query", type.typeName());
 
     }
 
@@ -43,58 +42,14 @@
     }
 
     @Test
-    public void verifyDefaultCase() {
-        assertEquals("default removed for tenant", "tenant", AAIObjectType.DEFAULT_TENANT.typeName());
-        assertEquals("default removed for cloud-region", "cloud-region", AAIObjectType.DEFAULT_CLOUD_REGION.typeName());
-    }
-
-    @Test
-    public void verifyRegularCase() {
-        assertEquals("default removed for tenant", "allotted-resource", AAIObjectType.ALLOTTED_RESOURCE.typeName());
-    }
-
-    @Test
-    public void instanceGroupObjectTypeTest() {
-        final String id = "test1";
-        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, id);
-        assertEquals("/network/instance-groups/instance-group/test1", aaiUri.build().toString());
-    }
-
-    @Test
-    public void collectionObjectTypeTest() {
-        final String id = "test1";
-        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, id);
-        assertEquals("/network/collections/collection/test1", aaiUri.build().toString());
-    }
-
-    @Test
-    public void genericVnfTest() {
-        AAIObjectType type = AAIObjectType.GENERIC_VNF;
-        assertEquals("/network/generic-vnfs/generic-vnf/{vnf-id}", type.uriTemplate());
-        assertEquals("/generic-vnfs/generic-vnf/{vnf-id}", type.partialUri());
-    }
-
-    @Test
-    public void pInterfaceTest() {
-        AAIObjectType type = AAIObjectType.P_INTERFACE;
-        assertEquals("/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}",
-                type.uriTemplate());
-        assertEquals("/p-interfaces/p-interface/{interface-name}", type.partialUri());
-    }
-
-    @Test
-    public void networkPolicyObjectTypeTest() {
-        final String id = "test1";
-        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, id);
-        assertEquals("/network/network-policies/network-policy/test1", aaiUri.build().toString());
-    }
-
-    @Test
     public void equalityTest() {
 
         AAIObjectType genericVnf = AAIFluentTypeBuilder.network().genericVnf("test").build();
+        AAIObjectType genericVnf2 = AAIFluentTypeBuilder.network().genericVnf("test2").build();
 
-        assertEquals(AAIObjectType.GENERIC_VNF, genericVnf);
+        assertEquals(genericVnf2, genericVnf);
+
+        assertEquals(genericVnf, Types.GENERIC_VNF);
 
     }
 
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIQueryClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIQueryClientTest.java
index 15fe03e..29d8624 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIQueryClientTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIQueryClientTest.java
@@ -43,17 +43,18 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aai.domain.yang.Complex;
-import org.onap.so.client.RestClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.CustomQuery;
 import org.onap.aaiclient.client.aai.entities.Results;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.Format;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryClient;
 import org.onap.aaiclient.client.graphinventory.GraphInventorySubgraphType;
 import org.onap.aaiclient.client.graphinventory.entities.Pathed;
 import org.onap.aaiclient.client.graphinventory.entities.ResourceAndUrl;
+import org.onap.so.client.RestClient;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -112,7 +113,7 @@
         doReturn(getJson("single-query-result.json")).when(aaiQueryClient).query(eq(Format.RESOURCE_AND_URL),
                 any(CustomQuery.class));
         List<Complex> result = aaiQueryClient.querySingleResource(
-                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(AAIObjectType.COMPLEX, "test"))),
+                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(Types.COMPLEX.getFragment("test")))),
                 Complex.class);
         assertEquals(2, result.size());
         assertEquals("complex-id-15100-jc689q2", result.get(1).getPhysicalLocationId());
@@ -123,11 +124,10 @@
         doReturn(getJson("single-query-result.json")).when(aaiQueryClient).query(eq(Format.RESOURCE_AND_URL),
                 any(CustomQuery.class));
         List<ResourceAndUrl<AAIResultWrapper>> result = aaiQueryClient.getResourceAndUrl(
-                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(AAIObjectType.COMPLEX, "test"))));
+                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(Types.COMPLEX.getFragment("test")))));
         assertEquals(2, result.size());
 
-        assertEquals(1,
-                result.get(1).getWrapper().getRelationships().get().getRelatedUris(AAIObjectType.PSERVER).size());
+        assertEquals(1, result.get(1).getWrapper().getRelationships().get().getRelatedUris(Types.PSERVER).size());
     }
 
     @Test
@@ -138,7 +138,7 @@
 
 
         List<Pathed> results = aaiQueryClient.queryPathed(
-                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(AAIObjectType.COMPLEX, "test"))));
+                new CustomQuery(Arrays.asList(AAIUriFactory.createNodesUri(Types.COMPLEX.getFragment("test")))));
 
         assertEquals(2, results.size());
         assertEquals("service-instance", results.get(1).getResourceType());
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientTest.java
index ca361f4..36ba1f3 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientTest.java
@@ -55,6 +55,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.defaultproperties.DefaultAAIPropertiesImpl;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryMultipleItemsException;
 import org.onap.so.client.RestClient;
 import com.github.tomakehurst.wiremock.admin.NotFoundException;
@@ -86,7 +87,7 @@
 
     @Test
     public void verifyNotExists() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
                 .willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("hello").withStatus(404)));
         AAIResourcesClient client = aaiClient;
@@ -96,7 +97,7 @@
 
     @Test
     public void verifyDelete() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test2");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test2"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
                 .willReturn(aResponse().withHeader("Content-Type", "application/json")
                         .withBodyFile("aai/resources/mockObject.json").withStatus(200)));
@@ -108,7 +109,7 @@
 
     @Test
     public void verifyBasicAuth() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test3"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build().toString()))
                 .withHeader("Authorization", equalTo("Basic dGVzdDp0ZXN0"))
                 .willReturn(aResponse().withHeader("Content-Type", "application/json")
@@ -119,8 +120,8 @@
 
     @Test
     public void verifyConnect() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test2");
-        AAIResourceUri path2 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test2"));
+        AAIResourceUri path2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test3"));
         wireMockRule.stubFor(
                 put(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build() + "/relationship-list/relationship"))
                         .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(200)));
@@ -133,8 +134,8 @@
 
     @Test
     public void verifyDisconnect() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test2");
-        AAIResourceUri path2 = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test2"));
+        AAIResourceUri path2 = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test3"));
 
         wireMockRule.stubFor(
                 delete(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build() + "/relationship-list/relationship"))
@@ -148,7 +149,7 @@
 
     @Test
     public void verifyPatch() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test2");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test2"));
 
         wireMockRule.stubFor(post(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
                 .willReturn(aResponse().withStatus(200)));
@@ -160,7 +161,7 @@
 
     @Test
     public void verifyNotExistsGet() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
                 .willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("hello").withStatus(404)));
         AAIResourcesClient client = aaiClient;
@@ -170,7 +171,7 @@
 
     @Test
     public void verifyNotExistsGetException() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build()))
                 .willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("hello").withStatus(404)));
         AAIResourcesClient client = aaiClient;
@@ -181,7 +182,7 @@
 
     @Test
     public void verifyFailedCallException() {
-        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+        AAIResourceUri path = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test"));
         wireMockRule.stubFor(get(urlPathEqualTo("/aai/" + AAIVersion.LATEST + path.build())).willReturn(aResponse()
                 .withHeader("Content-Type", "text/plain").withBodyFile("aai/error-message.json").withStatus(400)));
         AAIResourcesClient client = aaiClient;
@@ -195,7 +196,7 @@
     @Test
     public void buildRelationshipTest() {
         AAIResourcesClient client = aaiClient;
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test"));
         Relationship relationship = new Relationship();
         relationship.setRelatedLink(uri.build().toString());
         Relationship actual = client.buildRelationship(uri);
@@ -213,7 +214,7 @@
         vnf.setVnfId("my-vnf-id");
         GenericVnfs vnfs = new GenericVnfs();
         vnfs.getGenericVnf().add(vnf);
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnfs.class)).thenReturn(Optional.of(vnfs));
@@ -232,7 +233,7 @@
         GenericVnfs vnfs = new GenericVnfs();
         vnfs.getGenericVnf().add(vnf);
         vnfs.getGenericVnf().add(vnf2);
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnfs.class)).thenReturn(Optional.of(vnfs));
@@ -250,7 +251,7 @@
         GenericVnfs vnfs = new GenericVnfs();
         vnfs.getGenericVnf().add(vnf);
         vnfs.getGenericVnf().add(vnf2);
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnfs.class)).thenReturn(Optional.of(vnfs));
@@ -266,7 +267,7 @@
         vnf.setVnfId("my-vnf-id");
         GenericVnfs vnfs = new GenericVnfs();
         vnfs.getGenericVnf().add(vnf);
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnfs.class)).thenReturn(Optional.empty());
@@ -282,7 +283,7 @@
         vnf.setVnfId("my-vnf-id");
         GenericVnfs vnfs = new GenericVnfs();
         vnfs.getGenericVnf().add(vnf);
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnfs.class)).thenReturn(Optional.empty());
@@ -295,7 +296,7 @@
     @Test
     public void testGetFirstWrongPluralClass() {
         GenericVnf vnf = new GenericVnf();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         RestClient restClientMock = mock(RestClient.class);
         doReturn(restClientMock).when(client).createClient(uri);
         when(restClientMock.get(GenericVnf.class)).thenReturn(Optional.of(vnf));
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java
index 9e0825b..23c06a6 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java
@@ -45,6 +45,7 @@
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.aai.entities.uri.ServiceInstanceUri;
 import org.onap.aaiclient.client.defaultproperties.DefaultAAIPropertiesImpl;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import com.github.tomakehurst.wiremock.junit.WireMockRule;
 
 @RunWith(MockitoJUnitRunner.class)
@@ -70,7 +71,7 @@
         wireMockRule.stubFor(get(urlMatching("/aai/v[0-9]+/nodes.*")).willReturn(
                 aResponse().withStatus(404).withHeader("Content-Type", "application/json").withHeader("Mock", "true")));
 
-        uri = spy((ServiceInstanceUri) AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "id"));
+        uri = spy((ServiceInstanceUri) AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("id")));
         doReturn(aaiClient).when(uri).getResourcesClient();
     }
 
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java
index 0820397..7035999 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java
@@ -49,6 +49,7 @@
 import org.onap.aaiclient.client.aai.entities.singletransaction.SingleTransactionResponse;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryPatchConverter;
 import org.skyscreamer.jsonassert.JSONAssert;
 import com.fasterxml.jackson.core.JsonParseException;
@@ -60,9 +61,12 @@
 public class AAISingleTransactionClientTest {
 
     private final static String AAI_JSON_FILE_LOCATION = "src/test/resources/__files/aai/singletransaction/";
-    AAIResourceUri uriA = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "pserver-hostname");
-    AAIResourceUri uriB = AAIUriFactory.createResourceUri(AAIObjectType.COMPLEX, "my-complex");
-    AAIResourceUri uriC = AAIUriFactory.createResourceUri(AAIObjectType.COMPLEX, "my-complex2");
+    AAIResourceUri uriA =
+            AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver("pserver-hostname"));
+    AAIResourceUri uriB =
+            AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().complex("my-complex"));
+    AAIResourceUri uriC =
+            AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().complex("my-complex2"));
 
     ObjectMapper mapper;
 
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java
index bf24171..cda119e 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java
@@ -45,6 +45,7 @@
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryPatchConverter;
 import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.core.type.TypeReference;
@@ -56,13 +57,13 @@
 public class AAITransactionalClientTest {
 
     private final static String AAI_JSON_FILE_LOCATION = "src/test/resources/__files/aai/bulkprocess/";
-    AAIResourceUri uriA = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1");
-    AAIResourceUri uriB = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "test2");
-    AAIResourceUri uriC = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test3");
-    AAIResourceUri uriD = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "test4");
-    AAIResourceUri uriE = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test5");
-    AAIResourceUri uriF = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "test6");
-    AAIResourceUri uriG = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test7");
+    AAIResourceUri uriA = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"));
+    AAIResourceUri uriB = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver("test2"));
+    AAIResourceUri uriC = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test3"));
+    AAIResourceUri uriD = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver("test4"));
+    AAIResourceUri uriE = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test5"));
+    AAIResourceUri uriF = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver("test6"));
+    AAIResourceUri uriG = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test7"));
 
     ObjectMapper mapper;
 
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIURITest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIURITest.java
index f2bd188..7fad6f5 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIURITest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIURITest.java
@@ -25,6 +25,7 @@
 import org.junit.Test;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
 public class AAIURITest {
 
@@ -33,8 +34,9 @@
     @Test
     public void verifyTemplateReplacement() {
         final String id = "test1";
-        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, id);
-        String manualReplace = AAIObjectType.CONFIGURATION.toString().replaceAll("\\{configuration-id\\}", id);
+        AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(id));
+        String manualReplace =
+                AAIFluentTypeBuilder.network().configuration(id).uriTemplate().replaceAll("\\{configuration-id\\}", id);
         assertEquals("uri template replaced", aaiUri.build(), UriBuilder.fromPath(manualReplace).build());
 
     }
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/DSLQueryBuilderTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/DSLQueryBuilderTest.java
index b0b0c6a..4b5085e 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/DSLQueryBuilderTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/DSLQueryBuilderTest.java
@@ -23,6 +23,7 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import org.junit.Test;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.DSLNodeKey;
 import org.onap.aaiclient.client.graphinventory.entities.DSLQueryBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.DSLStartNode;
@@ -36,12 +37,11 @@
 
     @Test
     public void whereTest() {
-        DSLQueryBuilder<Start, Start> builder = TraversalBuilder.fragment(new DSLStartNode(AAIObjectType.CLOUD_REGION,
+        DSLQueryBuilder<Start, Start> builder = TraversalBuilder.fragment(new DSLStartNode(Types.CLOUD_REGION,
                 __.key("cloud-owner", "att-nc"), __.key("cloud-region-id", "test")));
 
-        builder.to(__.node(AAIObjectType.VLAN_TAG))
-                .where(__.node(AAIObjectType.OWNING_ENTITY, __.key("owning-entity-name", "name")))
-                .to(__.node(AAIObjectType.VLAN_TAG, __.key("vlan-id-outer", "108")).output());
+        builder.to(__.node(Types.VLAN_TAG)).where(__.node(Types.OWNING_ENTITY, __.key("owning-entity-name", "name")))
+                .to(__.node(Types.VLAN_TAG, __.key("vlan-id-outer", "108")).output());
 
         assertEquals("cloud-region('cloud-owner', 'att-nc')('cloud-region-id', 'test') > "
                 + "vlan-tag (> owning-entity('owning-entity-name', 'name')) > " + "vlan-tag*('vlan-id-outer', '108')",
@@ -50,12 +50,11 @@
 
     @Test
     public void unionTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
 
-        builder.union(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output()),
-                __.node(AAIObjectType.VSERVER)
-                        .to(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output())));
+        builder.union(__.node(Types.PSERVER).output().to(__.node(Types.COMPLEX).output()),
+                __.node(Types.VSERVER).to(__.node(Types.PSERVER).output().to(__.node(Types.COMPLEX).output())));
 
         assertEquals(
                 "generic-vnf*('vnf-id', 'vnfId') > " + "[ pserver* > complex*, " + "vserver > pserver* > complex* ]",
@@ -64,11 +63,11 @@
 
     @Test
     public void whereUnionTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
 
-        builder.where(__.union(__.node(AAIObjectType.PSERVER, __.key("hostname", "hostname1")),
-                __.node(AAIObjectType.VSERVER).to(__.node(AAIObjectType.PSERVER, __.key("hostname", "hostname1")))));
+        builder.where(__.union(__.node(Types.PSERVER, __.key("hostname", "hostname1")),
+                __.node(Types.VSERVER).to(__.node(Types.PSERVER, __.key("hostname", "hostname1")))));
 
         assertEquals("generic-vnf*('vnf-id', 'vnfId') (> [ pserver('hostname', 'hostname1'), "
                 + "vserver > pserver('hostname', 'hostname1') ])", builder.build().get());
@@ -76,38 +75,38 @@
 
     @Test
     public void notNullTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder.traversal(
-                new DSLStartNode(AAIObjectType.CLOUD_REGION, __.key("cloud-owner", "", "null").not()).output());
+        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
+                .traversal(new DSLStartNode(Types.CLOUD_REGION, __.key("cloud-owner", "", "null").not()).output());
 
         assertEquals("cloud-region* !('cloud-owner', ' ', ' null ')", builder.build().get());
     }
 
     @Test
     public void shortCutToTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.PSERVER, __.key("hostname", "my-hostname")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.PSERVER, __.key("hostname", "my-hostname")).output());
 
-        builder.to(AAIObjectType.P_INTERFACE).to(AAIObjectType.SRIOV_PF, __.key("pf-pci-id", "my-id"));
+        builder.to(Types.P_INTERFACE).to(Types.SRIOV_PF, __.key("pf-pci-id", "my-id"));
         assertEquals("pserver*('hostname', 'my-hostname') > p-interface > sriov-pf('pf-pci-id', 'my-id')",
                 builder.build().get());
     }
 
     @Test
     public void limitTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.PSERVER, __.key("hostname", "my-hostname")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.PSERVER, __.key("hostname", "my-hostname")).output());
 
-        builder.to(AAIObjectType.P_INTERFACE).limit(2).to(AAIObjectType.SRIOV_PF, __.key("pf-pci-id", "my-id"));
+        builder.to(Types.P_INTERFACE).limit(2).to(Types.SRIOV_PF, __.key("pf-pci-id", "my-id"));
         assertEquals("pserver*('hostname', 'my-hostname') > p-interface > sriov-pf('pf-pci-id', 'my-id') LIMIT 2",
                 builder.build().get());
     }
 
     @Test
     public void equalsTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.PSERVER, __.key("hostname", "my-hostname")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.PSERVER, __.key("hostname", "my-hostname")).output());
 
-        builder.to(AAIObjectType.P_INTERFACE).to(AAIObjectType.SRIOV_PF, __.key("pf-pci-id", "my-id"));
+        builder.to(Types.P_INTERFACE).to(Types.SRIOV_PF, __.key("pf-pci-id", "my-id"));
         assertTrue(
                 builder.equals("pserver*('hostname', 'my-hostname') > p-interface > sriov-pf('pf-pci-id', 'my-id')"));
         assertTrue(builder.equals(builder));
@@ -115,32 +114,30 @@
 
     @Test
     public void mixedTypeTest() {
-        DSLQueryBuilder<Start, Start> builder = TraversalBuilder.fragment(new DSLStartNode(AAIObjectType.CLOUD_REGION,
-                __.key("cloud-owner", "owner"), __.key("cloud-region-id", "id")));
-        builder.to(__.node(AAIObjectType.VLAN_TAG, __.key("vlan-id-outer", 167), __.key("my-boolean", true)).output());
+        DSLQueryBuilder<Start, Start> builder = TraversalBuilder.fragment(
+                new DSLStartNode(Types.CLOUD_REGION, __.key("cloud-owner", "owner"), __.key("cloud-region-id", "id")));
+        builder.to(__.node(Types.VLAN_TAG, __.key("vlan-id-outer", 167), __.key("my-boolean", true)).output());
         assertTrue(builder.equals(
                 "cloud-region('cloud-owner', 'owner')('cloud-region-id', 'id') > vlan-tag*('vlan-id-outer', 167)('my-boolean', true)"));
     }
 
     @Test
     public void outputOnNodeLambdasTest() {
-        DSLQueryBuilder<Start, Start> builder = TraversalBuilder
-                .fragment(new DSLStartNode(AAIObjectType.L_INTERFACE, new DSLNodeKey("interface-id", "myId")));
+        DSLQueryBuilder<Start, Start> builder =
+                TraversalBuilder.fragment(new DSLStartNode(Types.L_INTERFACE, new DSLNodeKey("interface-id", "myId")));
 
-        builder.to(AAIObjectType.VSERVER, __.key("vserver-name", "myName")).output().to(AAIObjectType.P_INTERFACE)
-                .output();
+        builder.to(Types.VSERVER, __.key("vserver-name", "myName")).output().to(Types.P_INTERFACE).output();
         assertEquals("l-interface('interface-id', 'myId') > vserver*('vserver-name', 'myName') > p-interface*",
                 builder.build().get());
     }
 
     @Test
     public void skipOutputOnUnionTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.GENERIC_VNF, __.key("vnf-id", "vnfId")).output());
 
-        builder.union(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output()),
-                __.node(AAIObjectType.VSERVER)
-                        .to(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output())))
+        builder.union(__.node(Types.PSERVER).output().to(__.node(Types.COMPLEX).output()),
+                __.node(Types.VSERVER).to(__.node(Types.PSERVER).output().to(__.node(Types.COMPLEX).output())))
                 .output();
 
         assertEquals(
@@ -150,10 +147,10 @@
 
     @Test
     public void selectOutputFilterTest() {
-        DSLQueryBuilder<Output, Output> builder = TraversalBuilder
-                .traversal(new DSLStartNode(AAIObjectType.CLOUD_REGION, __.key("cloud-owner", "CloudOwner"))
+        DSLQueryBuilder<Output, Output> builder =
+                TraversalBuilder.traversal(new DSLStartNode(Types.CLOUD_REGION, __.key("cloud-owner", "CloudOwner"))
                         .output("cloud-region-id", "a", "b"));
-        builder.to(__.node(AAIObjectType.PSERVER)).output("x", "y", "z");
+        builder.to(__.node(Types.PSERVER)).output("x", "y", "z");
 
         assertEquals("cloud-region{'cloud-region-id', 'a', 'b'}('cloud-owner', 'CloudOwner') > pserver{'x', 'y', 'z'}",
                 builder.build().toString());
@@ -161,7 +158,7 @@
 
     @Test
     public void selectOutputFilterOnNodeTest() {
-        DSLStartNode node = new DSLStartNode(AAIObjectType.CLOUD_REGION, __.key("cloud-owner", "CloudOwner"));
+        DSLStartNode node = new DSLStartNode(Types.CLOUD_REGION, __.key("cloud-owner", "CloudOwner"));
         DSLQueryBuilder<Start, Node> builder = TraversalBuilder.fragment(node).output("cloud-region-id");
 
         assertEquals("cloud-region{'cloud-region-id'}('cloud-owner', 'CloudOwner')", builder.build().toString());
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/RelationshipsTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/RelationshipsTest.java
index 9e106fa..75dbd4a 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/RelationshipsTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/RelationshipsTest.java
@@ -30,9 +30,10 @@
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 public class RelationshipsTest {
 
@@ -45,12 +46,16 @@
         AAIResultWrapper wrapper = new AAIResultWrapper(content);
         Relationships relationships = wrapper.getRelationships().get();
 
-        List<AAIResourceUri> test = relationships.getRelatedUris(AAIObjectType.VCE);
+        List<AAIResourceUri> test = relationships.getRelatedUris(Types.VCE);
         List<AAIResourceUri> uris = Arrays.asList(
-                AAIUriFactory.createResourceUri(AAIObjectType.VCE, "a9fec18e-1ea3-40e4-a6c0-a89b3de07053"),
-                AAIUriFactory.createResourceUri(AAIObjectType.VCE, "8ae1e5f8-61f1-4c71-913a-b40cc4593cb9"),
-                AAIUriFactory.createResourceUri(AAIObjectType.VCE, "a2935fa9-b743-49f4-9813-a127f13c4e93"),
-                AAIUriFactory.createResourceUri(AAIObjectType.VCE, "c7fe7698-8063-4e26-8bd3-ca3edde0b0d4"));
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().vce("a9fec18e-1ea3-40e4-a6c0-a89b3de07053")),
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().vce("8ae1e5f8-61f1-4c71-913a-b40cc4593cb9")),
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().vce("a2935fa9-b743-49f4-9813-a127f13c4e93")),
+                AAIUriFactory
+                        .createResourceUri(AAIFluentTypeBuilder.network().vce("c7fe7698-8063-4e26-8bd3-ca3edde0b0d4")));
 
         assertTrue(uris.containsAll(test) && test.containsAll(uris));
 
@@ -67,14 +72,14 @@
         ArgumentCaptor<AAIResourceUri> argument = ArgumentCaptor.forClass(AAIResourceUri.class);
         doReturn(new AAIResultWrapper("{}")).when(spy).get(argument.capture());
 
-        spy.getByType(AAIObjectType.VCE, uri -> uri.nodesOnly(true));
+        spy.getByType(Types.VCE, uri -> uri.nodesOnly(true));
 
         assertTrue(argument.getAllValues().stream().allMatch(item -> item.build().toString().contains("nodes-only")));
 
         argument = ArgumentCaptor.forClass(AAIResourceUri.class);
 
         doReturn(new AAIResultWrapper("{}")).when(spy).get(argument.capture());
-        spy.getByType(AAIObjectType.VCE);
+        spy.getByType(Types.VCE);
 
         assertTrue(argument.getAllValues().stream().allMatch(item -> !item.build().toString().contains("?")));
 
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java
index 3823392..e8c84c0 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java
@@ -22,7 +22,8 @@
 
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 public class AAISimpleUriFromParentUriTest {
 
@@ -30,10 +31,10 @@
     @Test
     public void appendChildren() {
 
-        AAIResourceUri parentUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "key1", "key2", "key3");
+        AAIResourceUri parentUri = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.business().customer("key1").serviceSubscription("key2").serviceInstance("key3"));
 
-        AAIResourceUri uri = new AAISimpleUri(parentUri, AAIObjectType.ALLOTTED_RESOURCE, "key4");
+        AAIResourceUri uri = new AAISimpleUri(parentUri, Types.ALLOTTED_RESOURCE.getFragment("").get().build(), "key4");
 
         assertEquals("path appended",
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4",
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java
index 9030789..3c8b2e8 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java
@@ -24,6 +24,7 @@
 import javax.ws.rs.core.UriBuilder;
 import org.junit.Test;
 import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
 public class AAISimpleUriFromUriTest {
 
@@ -66,10 +67,11 @@
     @Test
     public void beforeBuildEquality() {
 
-        AAIResourceUri uri = new AAISimpleUri(AAIObjectType.VCE,
+        AAIResourceUri uri = new AAISimpleUri(AAIFluentTypeBuilder.network().vce("").build(),
                 UriBuilder.fromUri("/network/vces/vce/a9f%20%20ec18e-1ea3-40e4-a6c0-a89b3de07053").build());
 
-        AAIResourceUri uri2 = new AAISimpleUri(AAIObjectType.VCE, "a9f  ec18e-1ea3-40e4-a6c0-a89b3de07053");
+        AAIResourceUri uri2 = new AAISimpleUri(AAIFluentTypeBuilder.network().vce("").build(),
+                "a9f  ec18e-1ea3-40e4-a6c0-a89b3de07053");
         assertEquals("are equal", uri2, uri);
 
     }
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java
index 92e7416..6382be4 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java
@@ -29,8 +29,6 @@
 import java.io.ObjectOutputStream;
 import java.util.Map;
 import org.junit.Test;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
@@ -41,14 +39,14 @@
 
     @Test
     public void relatedToTestPlural() {
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1").relatedTo(AAIObjectPlurals.PSERVER);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
+                .relatedTo(Types.PSERVERS.getFragment());
         String uriOutput = uri.build().toString();
 
         String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers";
         assertEquals(expected, uriOutput);
 
-        uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1")
+        uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
                 .relatedTo(Types.PSERVERS.getFragment());
         uriOutput = uri.build().toString();
         assertEquals(expected, uriOutput);
@@ -56,14 +54,14 @@
 
     @Test
     public void relatedToTestSingular() {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1")
-                .relatedTo(AAIObjectType.PSERVER, "test2");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
+                .relatedTo(Types.PSERVER.getFragment("test2"));
         String uriOutput = uri.build().toString();
 
         String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers/pserver/test2";
         assertEquals(expected, uriOutput);
 
-        uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1")
+        uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
                 .relatedTo(Types.PSERVER.getFragment("test2"));
 
         uriOutput = uri.build().toString();
@@ -74,7 +72,7 @@
 
     @Test
     public void cloneTestSingular() {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"));
         AAIResourceUri cloned = uri.clone();
         assertEquals("/network/generic-vnfs/generic-vnf/test1", cloned.build().toString());
 
@@ -85,31 +83,31 @@
 
     @Test
     public void cloneTestPlural() {
-        AAISimplePluralUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF);
+        AAISimplePluralUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnfs());
         AAISimplePluralUri cloned = uri.clone();
         assertEquals("/network/generic-vnfs", cloned.build().toString());
     }
 
     @Test
     public void cloneTestWithRelatedTo() {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1")
-                .relatedTo(AAIObjectType.PSERVER, "test2");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
+                .relatedTo(Types.PSERVER.getFragment("test2"));
         String uriOutput = uri.clone().build().toString();
         assertEquals("/network/generic-vnfs/generic-vnf/test1/related-to/pservers/pserver/test2", uriOutput);
     }
 
     @Test
     public void cloneTestPluralWithRelatedTo() {
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1").relatedTo(AAIObjectPlurals.PSERVER);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"))
+                .relatedTo(Types.PSERVERS.getFragment());
         String uriOutput = uri.clone().build().toString();
         assertEquals("/network/generic-vnfs/generic-vnf/test1/related-to/pservers", uriOutput);
     }
 
     @Test
     public void getKeysTest() {
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, "cloud1", "cloud2", "tenant1", "vserver1");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .cloudRegion("cloud1", "cloud2").tenant("tenant1").vserver("vserver1"));
         Map<String, String> keys = uri.getURIKeys();
         System.out.println(keys);
         System.out.println(uri.build());
@@ -118,8 +116,8 @@
 
     @Test
     public void getEncodedKeyTest() {
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "test1", "my value", "test3");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer("test1")
+                .serviceSubscription("my value").serviceInstance("test3"));
         Map<String, String> keys = uri.getURIKeys();
 
         assertEquals("my value", keys.get("service-type"));
@@ -127,7 +125,7 @@
 
     @Test
     public void serializeTest() throws IOException, ClassNotFoundException {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1");
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1"));
 
         uri.depth(Depth.ONE);
         uri.limit(1);
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java
index ec40b1b..8751736 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java
@@ -22,15 +22,16 @@
 
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 public class AAIUriFactoryTest {
 
     @Test
     public void testCreateResourceUri() {
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "VIP(VelocitytoIP)");
+        AAIResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("VIP(VelocitytoIP)"));
 
         String expected = "/network/generic-vnfs/generic-vnf/VIP%28VelocitytoIP%29";
         assertEquals(expected, uri.build().toString());
@@ -39,7 +40,7 @@
     @Test
     public void testCreateNodesUri() {
 
-        AAIResourceUri uri = AAIUriFactory.createNodesUri(AAIObjectType.GENERIC_VNF, "VIP(VelocitytoIP)");
+        AAIResourceUri uri = AAIUriFactory.createNodesUri(Types.GENERIC_VNF.getFragment("VIP(VelocitytoIP)"));
 
         String expected = "/nodes/generic-vnfs/generic-vnf/VIP%28VelocitytoIP%29";
         assertEquals(expected, uri.build().toString());
@@ -48,8 +49,9 @@
     @Test
     public void testCreateResourceFromExistingURI() {
 
-        AAIResourceUri uri = new AAISimpleUri(AAIObjectType.GENERIC_VNF, "VIP(VelocitytoIP)");
-        AAIResourceUri uri2 = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.GENERIC_VNF, uri.build());
+        AAIResourceUri uri =
+                new AAISimpleUri(AAIFluentTypeBuilder.network().genericVnf("").build(), "VIP(VelocitytoIP)");
+        AAIResourceUri uri2 = AAIUriFactory.createResourceFromExistingURI(Types.GENERIC_VNF, uri.build());
 
         String expected = "/network/generic-vnfs/generic-vnf/VIP%28VelocitytoIP%29";
         assertEquals(expected, uri2.build().toString());
@@ -58,11 +60,20 @@
     @Test
     public void testCreateResourceURIForPluralsWithValues() {
 
-        AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, "customerId", "serviceType");
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                .customer("customerId").serviceSubscription("serviceType").serviceInstances());
 
         String expected =
                 "/business/customers/customer/customerId/service-subscriptions/service-subscription/serviceType/service-instances";
         assertEquals(expected, uri.build().toString());
     }
+
+    @Test
+    public void testCreateResourceURIForPluralsWithNoValues() {
+
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customers());
+
+        String expected = "/business/customers";
+        assertEquals(expected, uri.build().toString());
+    }
 }
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java
index e6add8c..eb59173 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUriTest.java
@@ -29,6 +29,7 @@
 import java.net.URISyntaxException;
 import javax.ws.rs.core.UriBuilder;
 import org.junit.Test;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryPayloadException;
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriNotFoundException;
 
@@ -38,7 +39,7 @@
     public void oneKey()
             throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
 
-        AllottedResourceLookupUri instance = new AllottedResourceLookupUri("key1");
+        AllottedResourceLookupUri instance = new AllottedResourceLookupUri(Types.ALLOTTED_RESOURCE.getFragment("key1"));
         AllottedResourceLookupUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4")
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java
deleted file mode 100644
index 2cbf5bb..0000000
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.aaiclient.client.aai.entities.uri;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.graphinventory.exceptions.IncorrectNumberOfUriKeys;
-
-public class IncorrectNumberOfUriKeysTest {
-
-    @Rule
-    public ExpectedException thrown = ExpectedException.none();
-
-    @Test
-    public void verifyIncorrectNumberOfKeysSingle() {
-
-        thrown.expect(IncorrectNumberOfUriKeys.class);
-        thrown.expectMessage(equalTo("Expected 3 variables: [cloud-owner, cloud-region-id, volume-group-id]"));
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, "volume-group-id");
-
-    }
-
-    @Test
-    public void verifyIncorrectNumberOfKeysPlural() {
-
-        thrown.expect(IncorrectNumberOfUriKeys.class);
-        AAISimplePluralUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, "my-cloud-owner");
-
-    }
-
-    @Test
-    public void verifyIncorrectNumberOfKeysFromParent() {
-
-        thrown.expect(IncorrectNumberOfUriKeys.class);
-        AAIResourceUri parentUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, "my-cloud-owner", "my-cloud-region-id");
-        AAIResourceUri uri = AAIUriFactory.createResourceFromParentURI(parentUri, AAIObjectType.VOLUME_GROUP);
-    }
-
-    @Test
-    public void verifyIncorrectNumberOfKeysHttpAware() {
-
-        thrown.expect(IncorrectNumberOfUriKeys.class);
-        AAIResourceUri uri =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "customer-id", "subscription-id");
-    }
-}
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java
index 514a349..6a1b459 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUriTest.java
@@ -56,10 +56,10 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aaiclient.client.aai.AAIClient;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.defaultproperties.DefaultAAIPropertiesImpl;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.HttpAwareUri;
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryPayloadException;
 import org.onap.aaiclient.client.graphinventory.exceptions.GraphInventoryUriComputationException;
@@ -93,7 +93,7 @@
         final String content = new String(
                 Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "service-instance-pathed-query.json")));
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key3");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3"));
         final Optional<String> result = instance.extractRelatedLink(content);
         final String expected =
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3";
@@ -105,7 +105,7 @@
     public void oneKey()
             throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3")
@@ -123,7 +123,7 @@
     public void oneKeyQueryParams()
             throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3")
@@ -141,7 +141,7 @@
     public void oneKeyEncoded()
             throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%20space")
@@ -159,7 +159,7 @@
     public void oneKeyGetKeys()
             throws IOException, URISyntaxException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3%28space")
@@ -171,7 +171,7 @@
 
     @Test
     public void oneKeyClone() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         String uri =
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3";
@@ -184,23 +184,11 @@
     }
 
     @Test
-    public void threeKey() throws IOException {
-
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1", "key2", "key3");
-        final URI result = instance.build();
-        final URI expected = UriBuilder.fromPath(
-                "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3")
-                .build();
-        assertEquals("result is equal", expected, result);
-
-    }
-
-    @Test
     public void notfound() throws IOException, GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
         final String content =
                 new String(Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "empty-query-result.json")));
 
-        ServiceInstanceUri instance = new ServiceInstanceUri("key3");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3"));
         ServiceInstanceUri spy = spy(instance);
         AAIResourcesClient mockResourcesClient = mock(AAIResourcesClient.class);
         AAIResultWrapper wrapper = mock(AAIResultWrapper.class);
@@ -214,17 +202,8 @@
     }
 
     @Test
-    public void cloneTest() {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1", "key2", "key3");
-        final URI result = instance.build();
-        final URI result2 = instance.clone().queryParam("something", "new").build();
-        assertEquals("uris are not equal", false, result.toString().equals(result2.toString()));
-
-    }
-
-    @Test
     public void noVertexFound() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key3");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3"));
         ServiceInstanceUri spy = spy(instance);
         AAIResourcesClient client = aaiClient;
         doReturn(client).when(spy).getResourcesClient();
@@ -238,7 +217,7 @@
     @Test
     public void serializeTest() throws IOException, ClassNotFoundException, GraphInventoryUriNotFoundException,
             GraphInventoryPayloadException {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key3");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key3"));
         final String content = new String(
                 Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "service-instance-pathed-query.json")));
 
@@ -274,13 +253,14 @@
 
     @Test
     public void relatedToTest() throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
         doReturn(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3")
                         .when(spy).getObjectById(any(Object.class));
 
-        final URI result = spy.relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", "my-vnf-name").build();
+        final URI result =
+                spy.relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", "my-vnf-name").build();
         final URI expected = UriBuilder.fromUri(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/related-to/generic-vnfs?vnf-name=my-vnf-name")
                 .build();
@@ -290,11 +270,11 @@
     @Test
     public void relatedToEqualityTestBeforeBuildTest()
             throws GraphInventoryUriNotFoundException, GraphInventoryPayloadException {
-        ServiceInstanceUri instance = new ServiceInstanceUri("key1");
+        ServiceInstanceUri instance = new ServiceInstanceUri(Types.SERVICE_INSTANCE.getFragment("key1"));
         ServiceInstanceUri spy = spy(instance);
 
         final AAIPluralResourceUri result =
-                spy.relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", "my-vnf-name");
+                spy.relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", "my-vnf-name");
 
         assertEquals("result is equal", result, result);
     }
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImplTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImplTest.java
index 270aca0..7b3e80f 100644
--- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImplTest.java
+++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImplTest.java
@@ -23,9 +23,7 @@
 import static org.junit.Assert.assertEquals;
 import java.util.Map;
 import org.junit.Test;
-import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.graphinventory.entities.uri.parsers.UriParser;
-import org.onap.aaiclient.client.graphinventory.entities.uri.parsers.UriParserSpringImpl;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
 public class UriParserSpringImplTest {
 
@@ -33,7 +31,8 @@
 
     @Test
     public void reverseTemplate() {
-        final UriParser parser = new UriParserSpringImpl(AAIObjectType.SERVICE_INSTANCE.toString());
+        final UriParser parser = new UriParserSpringImpl(
+                AAIFluentTypeBuilder.business().customer("").serviceSubscription("").serviceInstance("").uriTemplate());
         final String uri =
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3";
 
diff --git a/graph-inventory/fluent-builder-maven-plugin/pom.xml b/graph-inventory/fluent-builder-maven-plugin/pom.xml
index f088475..87f5138 100644
--- a/graph-inventory/fluent-builder-maven-plugin/pom.xml
+++ b/graph-inventory/fluent-builder-maven-plugin/pom.xml
@@ -8,10 +8,6 @@
   </parent>
   <artifactId>fluent-builder-maven-plugin</artifactId>
   <packaging>maven-plugin</packaging>
-  <properties>
-    <maven.compiler.source>1.8</maven.compiler.source>
-    <maven.compiler.target>1.8</maven.compiler.target>
-  </properties>
   <build>
     <plugins>
       <plugin>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
index c7692cb..b09d676 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
@@ -23,7 +23,12 @@
 package org.onap.so.apihandlerinfra;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
@@ -34,14 +39,13 @@
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.*;
+import org.apache.http.HttpStatus;
+import org.json.JSONObject;
 import org.onap.aai.domain.yang.v16.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
-import org.apache.http.HttpStatus;
-import org.json.JSONObject;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.apihandler.camundabeans.CamundaResponse;
 import org.onap.so.apihandler.common.CamundaClient;
@@ -53,6 +57,7 @@
 import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceDeleteRequest;
 import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceRequest;
 import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceScaleRequest;
+import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.E2ESliceServiceActivateRequest;
 import org.onap.so.apihandlerinfra.e2eserviceinstancebeans.GetE2EServiceInstanceResponse;
 import org.onap.so.apihandlerinfra.exceptions.ApiException;
 import org.onap.so.apihandlerinfra.exceptions.BPMNFailureException;
@@ -380,8 +385,9 @@
             // TODO Get the service template model version uuid from AAI.
             String modelVersionId = null;
             AAIResourcesClient client = new AAIResourcesClient();
-            AAIResourceUri url = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    e2eActReq.getGlobalSubscriberId(), e2eActReq.getServiceType(), instanceIdMap.get(SERVICE_ID));
+            AAIResourceUri url = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                    .customer(e2eActReq.getGlobalSubscriberId()).serviceSubscription(e2eActReq.getServiceType())
+                    .serviceInstance(instanceIdMap.get(SERVICE_ID)));
             Optional<ServiceInstance> serviceInstanceOpt = client.get(ServiceInstance.class, url);
             if (serviceInstanceOpt.isPresent()) {
                 modelVersionId = serviceInstanceOpt.get().getModelVersionId();
@@ -469,8 +475,9 @@
             // TODO Get the service template model version uuid from AAI.
             String modelVersionId = null;
             AAIResourcesClient client = new AAIResourcesClient();
-            AAIResourceUri url = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                    e2eDelReq.getGlobalSubscriberId(), e2eDelReq.getServiceType(), instanceIdMap.get(SERVICE_ID));
+            AAIResourceUri url = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business()
+                    .customer(e2eDelReq.getGlobalSubscriberId()).serviceSubscription(e2eDelReq.getServiceType())
+                    .serviceInstance(instanceIdMap.get(SERVICE_ID)));
             Optional<ServiceInstance> serviceInstanceOpt = client.get(ServiceInstance.class, url);
             if (serviceInstanceOpt.isPresent()) {
                 modelVersionId = serviceInstanceOpt.get().getModelVersionId();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
index 70de94a..d8ad82c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
@@ -1,7 +1,6 @@
 package org.onap.so.apihandlerinfra.infra.rest;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -15,14 +14,13 @@
 import org.onap.aai.domain.yang.VfModules;
 import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aai.domain.yang.VolumeGroups;
-import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound;
 import org.onap.aaiclient.client.aai.AAIDSLQueryClient;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.DSLQuery;
 import org.onap.aaiclient.client.graphinventory.entities.DSLQueryBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.DSLStartNode;
@@ -30,6 +28,8 @@
 import org.onap.aaiclient.client.graphinventory.entities.Start;
 import org.onap.aaiclient.client.graphinventory.entities.TraversalBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.__;
+import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
@@ -48,7 +48,7 @@
     public ServiceInstance getServiceInstance(String serviceInstanceId) {
         return this.getAaiResourcesClient()
                 .get(ServiceInstance.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId))
+                        AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId)))
                 .orElseGet(() -> {
                     logger.debug("No Service Instance found in A&AI ServiceInstanceId: {}", serviceInstanceId);
                     return null;
@@ -57,7 +57,9 @@
 
     public VfModule getAAIVfModule(String vnfId, String vfModuleId) {
         return this.getAaiResourcesClient()
-                .get(VfModule.class, AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId))
+                .get(VfModule.class,
+                        AAIUriFactory.createResourceUri(
+                                AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId)))
                 .orElseGet(() -> {
                     logger.debug("No Vf Module found in A&AI VnfId: {}" + ", VfModuleId: {}", vnfId, vfModuleId);
                     return null;
@@ -66,7 +68,8 @@
 
     public GenericVnf getGenericVnf(String vnfId) {
         return this.getAaiResourcesClient()
-                .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+                .get(GenericVnf.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)))
                 .orElseGet(() -> {
                     logger.debug("No Generic VNF found in A&AI VnfId: {}", vnfId);
                     return null;
@@ -74,9 +77,9 @@
     }
 
     public VolumeGroup getVolumeGroup(String vnfId, String volumeGroupId) throws AAIEntityNotFound {
-        AAIResultWrapper wrapper =
-                this.getAaiResourcesClient().get(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                        .relatedTo(AAIObjectType.VOLUME_GROUP, volumeGroupId));
+        AAIResultWrapper wrapper = this.getAaiResourcesClient()
+                .get(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                        .relatedTo(Types.VOLUME_GROUP.getFragment(volumeGroupId)));
         Optional<VolumeGroup> volume = wrapper.asBean(VolumeGroup.class);
         if (volume.isPresent()) {
             return volume.get();
@@ -88,7 +91,8 @@
 
     public L3Network getNetwork(String networkId) {
         return this.getAaiResourcesClient()
-                .get(L3Network.class, AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId))
+                .get(L3Network.class,
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId)))
                 .orElseGet(() -> {
                     logger.debug("No Network found in A&AI NetworkId: {}", networkId);
                     return null;
@@ -96,51 +100,57 @@
     }
 
 
-    public boolean isVolumeGroupRelatedToVFModule(String volumeGroupId) {
-        return this.getAaiResourcesClient().exists(AAIUriFactory
-                .createResourceUri(AAIObjectType.VOLUME_GROUP, volumeGroupId).relatedTo(AAIObjectPlurals.VF_MODULE));
+    public boolean isVolumeGroupRelatedToVFModule(CloudConfiguration cloudConfig, String volumeGroupId) {
+        return this.getAaiResourcesClient()
+                .exists(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                        .cloudRegion(cloudConfig.getCloudOwner(), cloudConfig.getLcpCloudRegionId())
+                        .volumeGroup(volumeGroupId)).relatedTo(Types.VF_MODULES.getFragment()));
     }
 
     public boolean isVnfRelatedToVolumes(String vnfId) {
-        return this.getAaiResourcesClient().exists(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP));
+        return this.getAaiResourcesClient()
+                .exists(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                        .relatedTo(Types.VOLUME_GROUPS.getFragment()));
     }
 
     public boolean isNetworkRelatedToModules(String networkId) {
-        return this.getAaiResourcesClient().exists(AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId)
-                .relatedTo(AAIObjectPlurals.VF_MODULE));
+        return this.getAaiResourcesClient()
+                .exists(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId))
+                        .relatedTo(Types.VF_MODULES.getFragment()));
     }
 
     public boolean isServiceRelatedToNetworks(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                        .relatedTo(AAIObjectPlurals.L3_NETWORK));
+                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.L3_NETWORKS.getFragment()));
     }
 
     public boolean isServiceRelatedToGenericVnf(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                        .relatedTo(AAIObjectPlurals.GENERIC_VNF));
+                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.GENERIC_VNFS.getFragment()));
     }
 
     public boolean isServiceRelatedToConfiguration(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
-                        .relatedTo(AAIObjectPlurals.CONFIGURATION));
+                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                        .relatedTo(Types.CONFIGURATIONS.getFragment()));
     }
 
     public Service getService(String serviceId) {
         return this.getAaiResourcesClient()
-                .get(Service.class, AAIUriFactory.createResourceUri(AAIObjectType.SERVICE, serviceId)).orElseGet(() -> {
+                .get(Service.class,
+                        AAIUriFactory
+                                .createResourceUri(AAIFluentTypeBuilder.serviceDesignAndCreation().service(serviceId)))
+                .orElseGet(() -> {
                     logger.debug("No Service found in A&AI ServiceId: {}", serviceId);
                     return null;
                 });
     }
 
     public Tenant getTenant(String cloudOwner, String cloudRegion, String tenantId) {
-        return this.getAaiResourcesClient()
-                .get(Tenant.class,
-                        AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId))
+        return this.getAaiResourcesClient().get(Tenant.class, AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId)))
                 .orElseGet(() -> {
                     logger.debug("No Tenant found in A&AI TenantId: {}", tenantId);
                     return null;
@@ -148,9 +158,9 @@
     }
 
     public List<LInterface> getLinterfacesOfVnf(String vnfId) {
-        DSLStartNode startNode = new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", vnfId));
-        DSLQueryBuilder<Start, Node> builder = TraversalBuilder.fragment(startNode)
-                .to(__.node(AAIObjectType.VSERVER).to(__.node(AAIObjectType.L_INTERFACE).output()));
+        DSLStartNode startNode = new DSLStartNode(Types.GENERIC_VNF, __.key("vnf-id", vnfId));
+        DSLQueryBuilder<Start, Node> builder =
+                TraversalBuilder.fragment(startNode).to(__.node(Types.VSERVER).to(__.node(Types.L_INTERFACE).output()));
         List<LInterface> linterfaces =
                 getAAIDSLQueryClient().querySingleResource(new DSLQuery(builder.build()), LInterface.class);
         return linterfaces;
@@ -176,7 +186,8 @@
 
     public List<VfModule> getVfModulesOfVnf(String vnfId) {
         List<VfModule> vfModuleList = new ArrayList<VfModule>();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, vnfId);
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModules());
         Optional<VfModules> vfModules = getAaiResourcesClient().get(VfModules.class, uri);
         if (!vfModules.isPresent() || vfModules.get().getVfModule().isEmpty()) {
             logger.debug("No VfModules attached to Vnf in AAI : {}", vnfId);
@@ -198,8 +209,8 @@
 
     public List<VolumeGroup> getVolumeGroupsOfVnf(String vnfId) {
         List<VolumeGroup> volumeGroupList = new ArrayList<VolumeGroup>();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId))
+                .relatedTo(Types.VOLUME_GROUPS.getFragment());
         Optional<VolumeGroups> volumeGroups = getAaiResourcesClient().get(VolumeGroups.class, uri);
         if (!volumeGroups.isPresent() || volumeGroups.get().getVolumeGroup().isEmpty()) {
             logger.debug("No VolumeGroups attached to Vnf in AAI : {}", vnfId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
index 6e7947b..edf17f3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilder.java
@@ -29,9 +29,9 @@
 import org.onap.aai.domain.yang.ServiceInstance;
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound;
 import org.onap.so.apihandlerinfra.infra.rest.exception.CloudConfigurationNotFoundException;
@@ -278,13 +278,13 @@
         String cloudOwner = null;
         String lcpRegionId = null;
         if (relationshipsOpt.isPresent()) {
-            tenantId = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst()
+            tenantId = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst()
                     .map(item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId))
                     .orElse(null);
-            cloudOwner = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst().map(
+            cloudOwner = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst().map(
                     item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.CLOUD_REGION.getUriParams().cloudOwner))
                     .orElse(null);
-            lcpRegionId = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst().map(
+            lcpRegionId = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst().map(
                     item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.CLOUD_REGION.getUriParams().cloudRegionId))
                     .orElse(null);
         }
@@ -323,13 +323,13 @@
         String cloudOwner = null;
         String lcpRegionId = null;
         if (relationshipsOpt.isPresent()) {
-            tenantId = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst()
+            tenantId = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst()
                     .map(item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.TENANT.getUriParams().tenantId))
                     .orElse(null);
-            cloudOwner = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst().map(
+            cloudOwner = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst().map(
                     item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.CLOUD_REGION.getUriParams().cloudOwner))
                     .orElse(null);
-            lcpRegionId = relationshipsOpt.get().getRelatedUris(AAIObjectType.TENANT).stream().findFirst().map(
+            lcpRegionId = relationshipsOpt.get().getRelatedUris(Types.TENANT).stream().findFirst().map(
                     item -> item.getURIKeys().get(AAIFluentTypeBuilder.Types.CLOUD_REGION.getUriParams().cloudRegionId))
                     .orElse(null);
         }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VolumeGroupDeleteValidator.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VolumeGroupDeleteValidator.java
index 550db19..3640baa 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VolumeGroupDeleteValidator.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VolumeGroupDeleteValidator.java
@@ -25,7 +25,8 @@
     @Override
     public Optional<String> validate(Map<String, String> instanceIdMap, ServiceInstancesRequest request,
             Map<String, String> queryParams, Actions action) {
-        if (aaiDataRetrieval.isVolumeGroupRelatedToVFModule(instanceIdMap.get("volumeGroupInstanceId"))) {
+        if (aaiDataRetrieval.isVolumeGroupRelatedToVFModule(request.getRequestDetails().getCloudConfiguration(),
+                instanceIdMap.get("volumeGroupInstanceId"))) {
             return Optional.of("Cannot delete volume group it is related to existing vf-modules");
         } else {
             return Optional.empty();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
index a28298f..33fe9d8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
@@ -27,13 +27,13 @@
 import java.util.Map;
 import javax.ws.rs.NotFoundException;
 import org.onap.aai.domain.yang.OperationalEnvironment;
-import org.onap.so.apihandlerinfra.tenantisolation.exceptions.AAIClientCallFailed;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
+import org.onap.so.apihandlerinfra.tenantisolation.exceptions.AAIClientCallFailed;
 import org.springframework.stereotype.Component;
 
 
@@ -50,7 +50,8 @@
      */
     public AAIResultWrapper getAaiOperationalEnvironment(String id) {
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT, id);
+        AAIResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().operationalEnvironment(id));
         uri.depth(Depth.ZERO);
         AAIResourcesClient client = this.getClient();
         return client.get(uri, NotFoundException.class);
@@ -65,7 +66,8 @@
      */
     public void updateAaiOperationalEnvironment(String id, OperationalEnvironment aaiRequest) {
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT, id);
+        AAIResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().operationalEnvironment(id));
         AAIResourcesClient client = this.getClient();
         client.update(uri, aaiRequest);
 
@@ -75,8 +77,8 @@
     public void updateAaiOperationalEnvironment(String operationalEnvironmentId, Map<String, String> payload)
             throws AAIClientCallFailed {
         try {
-            AAIResourceUri uri =
-                    AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT, operationalEnvironmentId);
+            AAIResourceUri uri = AAIUriFactory.createResourceUri(
+                    AAIFluentTypeBuilder.cloudInfrastructure().operationalEnvironment(operationalEnvironmentId));
             AAIResourcesClient aaiClient = this.getClient();
             aaiClient.update(uri, payload);
         } catch (Exception ex) {
@@ -92,8 +94,8 @@
      */
     public void createOperationalEnvironment(OperationalEnvironment operationalEnvironment) {
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT,
-                operationalEnvironment.getOperationalEnvironmentId());
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .operationalEnvironment(operationalEnvironment.getOperationalEnvironmentId()));
         AAIResourcesClient client = this.getClient();
         client.create(uri, operationalEnvironment);
     }
@@ -107,10 +109,10 @@
      */
     public void createRelationship(String managingEcompOperationalEnvironmentId, String vnfOperationalEnvironmentId) {
 
-        AAIResourceUri ecompEnvUri = AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT,
-                managingEcompOperationalEnvironmentId);
-        AAIResourceUri vnfEnvUri =
-                AAIUriFactory.createResourceUri(AAIObjectType.OPERATIONAL_ENVIRONMENT, vnfOperationalEnvironmentId);
+        AAIResourceUri ecompEnvUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                .operationalEnvironment(managingEcompOperationalEnvironmentId));
+        AAIResourceUri vnfEnvUri = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().operationalEnvironment(vnfOperationalEnvironmentId));
         AAIResourcesClient client = this.getClient();
         client.connect(vnfEnvUri, ecompEnvUri);
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
index d4c66f6..42d5af7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java
@@ -26,11 +26,11 @@
 import org.apache.http.HttpStatus;
 import org.json.JSONObject;
 import org.onap.aai.domain.yang.OperationalEnvironment;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.apihandler.common.ErrorNumbers;
 import org.onap.so.apihandlerinfra.exceptions.ApiException;
@@ -94,8 +94,7 @@
         Optional<Relationships> optRelationships = wrapper.getRelationships();
         if (optRelationships.isPresent()) {
             Relationships relationships = optRelationships.get();
-            List<AAIResourceUri> operationalEnvironments =
-                    relationships.getRelatedAAIUris(AAIObjectType.OPERATIONAL_ENVIRONMENT);
+            List<AAIResourceUri> operationalEnvironments = relationships.getRelatedUris(Types.OPERATIONAL_ENVIRONMENT);
             if (!operationalEnvironments.isEmpty()) {
                 ecompOperationalEnvironmentId = operationalEnvironments.get(0).getURIKeys().get(
                         AAIFluentTypeBuilder.Types.OPERATIONAL_ENVIRONMENT.getUriParams().operationalEnvironmentId);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java
index 9d5d805..61ac542 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrievalTest.java
@@ -24,22 +24,20 @@
 import static org.mockito.Mockito.doReturn;
 import java.util.List;
 import java.util.Optional;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VfModules;
 import org.onap.aai.domain.yang.VolumeGroup;
 import org.onap.aai.domain.yang.VolumeGroups;
-import org.onap.aaiclient.client.aai.AAIObjectPlurals;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
 @RunWith(MockitoJUnitRunner.class)
 public class AAIDataRetrievalTest {
@@ -52,7 +50,8 @@
     @Test
     public void getVfModulesOfVnfTest() {
         VfModules vfModules = getVfModules();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, "vnfId");
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId").vfModules());
         doReturn(Optional.of(vfModules)).when(aaiResourcesClient).get(VfModules.class, uri);
         List<VfModule> vfModulesList = aaiDataRetrieval.getVfModulesOfVnf("vnfId");
         assertEquals("vfm1", vfModulesList.get(0).getVfModuleId());
@@ -64,7 +63,8 @@
     @Test
     public void getVfModulesOfVnfWhenNoneTest() {
         VfModules vfModules = new VfModules();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, "vnfId");
+        AAIPluralResourceUri uri =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId").vfModules());
         doReturn(Optional.of(vfModules)).when(aaiResourcesClient).get(VfModules.class, uri);
         List<VfModule> vfModulesList = aaiDataRetrieval.getVfModulesOfVnf("vnfId");
         assertEquals(true, vfModulesList.isEmpty());
@@ -76,8 +76,8 @@
     @Test
     public void getVolumeGroupsOfVnfTest() throws Exception {
         VolumeGroups volumeGroups = getVolumeGroups();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId")
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId"))
+                .relatedTo(Types.VOLUME_GROUPS.getFragment());
         doReturn(Optional.of(volumeGroups)).when(aaiResourcesClient).get(VolumeGroups.class, uri);
         List<VolumeGroup> volumeGroupList = aaiDataRetrieval.getVolumeGroupsOfVnf("vnfId");
         assertEquals("vg1", volumeGroupList.get(0).getVolumeGroupId());
@@ -88,8 +88,8 @@
     @Test
     public void getVolumeGroupsOfVnfWhenNoneTest() throws Exception {
         VolumeGroups volumeGroups = new VolumeGroups();
-        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId")
-                .relatedTo(AAIObjectPlurals.VOLUME_GROUP);
+        AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId"))
+                .relatedTo(Types.VOLUME_GROUPS.getFragment());
         doReturn(Optional.of(volumeGroups)).when(aaiResourcesClient).get(VolumeGroups.class, uri);
         List<VolumeGroup> volumeGroupList = aaiDataRetrieval.getVolumeGroupsOfVnf("vnfId");
         assertEquals(true, volumeGroupList.isEmpty());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
index 389ff28..912c026 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/BpmnRequestBuilderTest.java
@@ -41,10 +41,11 @@
 import org.onap.aai.domain.yang.ServiceInstance;
 import org.onap.aai.domain.yang.VfModule;
 import org.onap.aai.domain.yang.VolumeGroup;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.so.constants.Status;
 import org.onap.so.db.request.client.RequestsDbClient;
@@ -104,7 +105,7 @@
         GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
 
         doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId"));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")));
 
         ServiceInstancesRequest expectedRequest =
                 mapper.readValue(new File(RESOURCE_PATH + "ExpectedVnfRequest.json"), ServiceInstancesRequest.class);
@@ -117,11 +118,11 @@
         GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
 
         doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId"));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")));
         VfModule vfModule = provider.getMapper().readValue(new File(RESOURCE_PATH + "VfModule.json"), VfModule.class);
 
-        doReturn(Optional.of(vfModule)).when(aaiResourcesClient).get(VfModule.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, "vnfId", "vfModuleId"));
+        doReturn(Optional.of(vfModule)).when(aaiResourcesClient).get(VfModule.class, AAIUriFactory
+                .createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId").vfModule("vfModuleId")));
 
         ServiceInstancesRequest expectedRequest = mapper
                 .readValue(new File(RESOURCE_PATH + "ExpectedVfModuleRequest.json"), ServiceInstancesRequest.class);
@@ -135,13 +136,13 @@
         GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
 
         doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId"));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId")));
         VolumeGroup volumeGroup =
                 provider.getMapper().readValue(new File(RESOURCE_PATH + "VolumeGroup.json"), VolumeGroup.class);
         AAIResultWrapper wrapper = new AAIResultWrapper(volumeGroup);
         doReturn(wrapper).when(aaiResourcesClient)
-                .get(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "vnfId")
-                        .relatedTo(AAIObjectType.VOLUME_GROUP, "volumeGroupId"));
+                .get(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("vnfId"))
+                        .relatedTo(Types.VOLUME_GROUP.getFragment("volumeGroupId")));
 
         ServiceInstancesRequest expectedRequest = mapper
                 .readValue(new File(RESOURCE_PATH + "ExpectedVolumeGroupRequest.json"), ServiceInstancesRequest.class);
@@ -157,7 +158,7 @@
         GenericVnf vnf = provider.getMapper().readValue(new File(RESOURCE_PATH + "Vnf.json"), GenericVnf.class);
 
         doReturn(Optional.of(vnf)).when(aaiResourcesClient).get(GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
 
         CloudConfiguration result = reqBuilder.getCloudConfigurationVfModuleReplace(vnfId, vfModuleId);
         assertEquals("0422ffb57ba042c0800a29dc85ca70f8", result.getTenantId());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/validator/VolumeGroupDeleteValidatorTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/validator/VolumeGroupDeleteValidatorTest.java
index 7aa12a6..1023408 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/validator/VolumeGroupDeleteValidatorTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/infra/rest/validator/VolumeGroupDeleteValidatorTest.java
@@ -1,6 +1,8 @@
 package org.onap.so.apihandlerinfra.infra.rest.validator;
 
 import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
 import java.util.HashMap;
 import java.util.Map;
@@ -14,6 +16,8 @@
 import org.onap.so.apihandlerinfra.Action;
 import org.onap.so.apihandlerinfra.infra.rest.AAIDataRetrieval;
 import org.onap.so.apihandlerinfra.infra.rest.validators.VolumeGroupDeleteValidator;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
+import org.onap.so.serviceinstancebeans.RequestDetails;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 
 
@@ -53,16 +57,24 @@
     @Test
     public void validateSuccessTest() {
         instanceIdMap.put("volumeGroupInstanceId", "1");
-        when(aaiDataRetrieval.isVolumeGroupRelatedToVFModule("1")).thenReturn(false);
-        Optional<String> result = volumeGroupDeleteValidator.validate(instanceIdMap, null, null, null);
+        ServiceInstancesRequest request = new ServiceInstancesRequest();
+        RequestDetails details = new RequestDetails();
+        details.setCloudConfiguration(new CloudConfiguration());
+        request.setRequestDetails(details);
+        when(aaiDataRetrieval.isVolumeGroupRelatedToVFModule(any(CloudConfiguration.class), eq("1"))).thenReturn(false);
+        Optional<String> result = volumeGroupDeleteValidator.validate(instanceIdMap, request, null, null);
         assertEquals(false, result.isPresent());
     }
 
     @Test
     public void validateFailureVnfTest() {
         instanceIdMap.put("volumeGroupInstanceId", "1");
-        when(aaiDataRetrieval.isVolumeGroupRelatedToVFModule("1")).thenReturn(true);
-        Optional<String> result = volumeGroupDeleteValidator.validate(instanceIdMap, null, null, null);
+        ServiceInstancesRequest request = new ServiceInstancesRequest();
+        RequestDetails details = new RequestDetails();
+        details.setCloudConfiguration(new CloudConfiguration());
+        request.setRequestDetails(details);
+        when(aaiDataRetrieval.isVolumeGroupRelatedToVFModule(any(CloudConfiguration.class), eq("1"))).thenReturn(true);
+        Optional<String> result = volumeGroupDeleteValidator.validate(instanceIdMap, request, null, null);
         assertEquals(true, result.isPresent());
     }
 
diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
index 049746c..c48d10b 100644
--- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
+++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/extclients/aai/AaiServiceProviderImpl.java
@@ -22,9 +22,10 @@
 import java.util.Optional;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,8 +48,9 @@
     public void createServiceInstance(final String globalCustomerId, final String serviceType,
             final ServiceInstance aaiServiceInstance) {
         logger.info("Creating service instance in AAI: {}", aaiServiceInstance);
-        final AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
-                globalCustomerId, serviceType, aaiServiceInstance.getServiceInstanceId());
+        final AAIResourceUri serviceInstanceURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(globalCustomerId)
+                        .serviceSubscription(serviceType).serviceInstance(aaiServiceInstance.getServiceInstanceId()));
         aaiClientProvider.getAaiClient().createIfNotExists(serviceInstanceURI, Optional.of(aaiServiceInstance));
 
     }
@@ -57,9 +59,10 @@
     public void createGenericVnfAndConnectServiceInstance(final String serviceInstanceId, final String vnfId,
             final GenericVnf genericVnf) {
         logger.info("Creating GenericVnf in AAI: {}", genericVnf);
-        final AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        final AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         final AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
+                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         aaiClientProvider.getAaiClient().createIfNotExists(genericVnfURI, Optional.of(genericVnf))
                 .connect(genericVnfURI, serviceInstanceURI);
 
@@ -69,15 +72,16 @@
     public void connectGenericVnfToTenant(final String vnfId, final String cloudOwner, final String cloudRegion,
             final String tenantId) {
         logger.info("Connecting GenericVnf {} to {}/{}/{} in AAI", vnfId, cloudOwner, cloudRegion, tenantId);
-        final AAIResourceUri tenantURI =
-                AAIUriFactory.createResourceUri(AAIObjectType.TENANT, cloudOwner, cloudRegion, tenantId);
-        final AAIResourceUri genericVnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        final AAIResourceUri tenantURI = AAIUriFactory.createResourceUri(
+                AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegion).tenant(tenantId));
+        final AAIResourceUri genericVnfURI =
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         aaiClientProvider.getAaiClient().connect(tenantURI, genericVnfURI);
     }
 
     @Override
     public Optional<GenericVnf> getGenericVnf(final String vnfId) {
         return aaiClientProvider.getAaiClient().get(GenericVnf.class,
-                AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId)));
     }
 }
diff --git a/so-sdn-clients/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java b/so-sdn-clients/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
index d2a87db..efc8c45 100644
--- a/so-sdn-clients/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
+++ b/so-sdn-clients/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
@@ -26,10 +26,10 @@
 import java.util.UUID;
 import javax.ws.rs.NotFoundException;
 import org.onap.aai.domain.yang.GenericVnf;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.so.client.dmaap.DmaapConsumer;
 import org.onap.so.client.dmaap.DmaapPublisher;
 import org.onap.so.client.sdno.beans.Body;
@@ -48,7 +48,7 @@
     @Override
     public boolean healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception {
 
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId));
         AAIResourcesClient client = new AAIResourcesClient();
         GenericVnf vnf = client.get(GenericVnf.class, uri)
                 .orElseThrow(() -> new NotFoundException(vnfId + " not found in A&AI"));
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java
index 27d4ce7..56b27a1 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/DeleteVServers.java
@@ -1,9 +1,9 @@
 package org.onap.so.simulator.actions.aai;
 
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.consol.citrus.actions.AbstractTestAction;
@@ -23,8 +23,8 @@
             String cloudRegion = context.getVariable("cloudRegion");
             String cloudOwner = context.getVariable("cloudOwner");
             String tenantId = context.getVariable("tenantId");
-            AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegion,
-                    tenantId, vserverId);
+            AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
+                    .cloudRegion(cloudOwner, cloudRegion).tenant(tenantId).vserver(vserverId));
             aaiResourceClient.delete(vserverURI);
             logger.error("Delete Vservers in AAI: {}", vserverURI);
         } catch (Exception e) {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
index 21f9528..b42441b 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessNetwork.java
@@ -1,10 +1,10 @@
 package org.onap.so.simulator.actions.aai;
 
 import org.onap.aai.domain.yang.L3Network;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.consol.citrus.actions.AbstractTestAction;
@@ -23,7 +23,8 @@
 
             if (context.getVariable("action").equals("assign")) {
                 String networkId = context.getVariable("generatedNetworkId");
-                AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId);
+                AAIResourceUri networkURI =
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId));
                 L3Network network = new L3Network();
                 network.setNetworkId(networkId);
                 network.setNetworkName(context.getVariable("networkName"));
@@ -33,7 +34,8 @@
                 aaiResourceClient.create(networkURI, network);
             } else if (context.getVariable("action").equals("delete")) {
                 String networkId = context.getVariable("networkId");
-                AAIResourceUri networkURI = AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId);
+                AAIResourceUri networkURI =
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(networkId));
                 aaiResourceClient.delete(networkURI);
             }
         } catch (Exception e) {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
index d53de91..edf2124 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
@@ -1,18 +1,12 @@
 package org.onap.so.simulator.actions.aai;
 
-import java.io.InputStream;
-import java.util.List;
 import org.onap.aai.domain.yang.Vnfc;
-import org.onap.aai.domain.yang.Vserver;
-import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
-import org.onap.aaiclient.client.aai.entities.Relationships;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.core.io.ClassPathResource;
 import com.consol.citrus.actions.AbstractTestAction;
 import com.consol.citrus.context.TestContext;
 
@@ -38,7 +32,8 @@
                     && context.getVariable("serviceAction").equals("assign")
                     && context.getVariable("vfModuleName").equals("nc_dummy_id")) {
 
-                AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "ssc_server_1");
+                AAIResourceUri vnfcURI =
+                        AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc("ssc_server_1"));
                 Vnfc vnfc = new Vnfc();
                 vnfc.setVnfcName("ssc_server_1");
                 vnfc.setNfcNamingCode("oamfw");
@@ -60,8 +55,8 @@
                 } else {
                     aaiResourceClient.get(vnfcURI);
                 }
-                AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE,
-                        context.getVariable("vnfId"), context.getVariable("vfModuleId"));
+                AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network()
+                        .genericVnf(context.getVariable("vnfId")).vfModule(context.getVariable("vfModuleId")));
                 logger.debug("creating VNFC edge to vf module");
                 aaiResourceClient.connect(vfModuleURI, vnfcURI);
             }
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
index 371c72d..aa54a7a 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateAAInventory.java
@@ -3,10 +3,10 @@
 import java.io.InputStream;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.aaiclient.client.aai.AAICommonObjectMapperProvider;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.core.io.ClassPathResource;
@@ -29,8 +29,9 @@
                 InputStream vserverFile =
                         new ClassPathResource("openstack/gr_api/CreateAAIInventory.json").getInputStream();
                 Vserver vserver = aaiMapper.getMapper().readValue(vserverFile, Vserver.class);
-                AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, "cloudOwner",
-                        "regionOne", "0422ffb57ba042c0800a29dc85ca70f8", vServerId);
+                AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(
+                        AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion("cloudOwner", "regionOne")
+                                .tenant("0422ffb57ba042c0800a29dc85ca70f8").vserver(vServerId));
                 aaiResourceClient.create(vserverURI, vserver);
             }
         } catch (Exception e) {
