diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
index 6fcad95..03559af 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
@@ -27,6 +27,9 @@
 	private boolean generated;
 	private boolean baseVfModule;
 	private String virtualLinkKey;
+	private String vnfCustomizationId;
+	private String vfModuleCustomizationId;
+	private String cvnfModuleCustomizationId;
 	
 	public Resource(WorkflowType resourceType, String resourceId, boolean generated){
 		this.resourceId = resourceId;
@@ -64,4 +67,22 @@
 	public void setVirtualLinkKey(String virtualLinkKey) {
 		this.virtualLinkKey = virtualLinkKey;
 	}
+	public String getVnfCustomizationId() {
+		return vnfCustomizationId;
+	}
+	public void setVnfCustomizationId(String vnfCustomizationId) {
+		this.vnfCustomizationId = vnfCustomizationId;
+	}
+	public String getVfModuleCustomizationId() {
+		return vfModuleCustomizationId;
+	}
+	public void setVfModuleCustomizationId(String vfModuleCustomizationId) {
+		this.vfModuleCustomizationId = vfModuleCustomizationId;
+	}
+	public String getCvnfModuleCustomizationId() {
+		return cvnfModuleCustomizationId;
+	}
+	public void setCvnfModuleCustomizationId(String cvnfModuleCustomizationId) {
+		this.cvnfModuleCustomizationId = cvnfModuleCustomizationId;
+	}
 }
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 57d097e..5809d16 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
@@ -43,6 +43,7 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
@@ -167,9 +168,10 @@
 				} else {
 					key = modelInfo.getModelCustomizationId();
 				}
+				Resource resourceKey = new Resource(resourceType, key, aLaCarte);
 				for (OrchestrationFlow orchFlow : orchFlows) {
-					ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, key, apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null);
+					ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey, apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false);
 					flowsToExecute.add(ebb);
 				}
 			} else {
@@ -564,7 +566,10 @@
 											if(!vnfCustomizationUUID.equals("")&&!vfModuleCustomizationUUID.equals("")){
 												List<String> configs = traverseCatalogDbForConfiguration(vnfCustomizationUUID,vfModuleCustomizationUUID);
 												for(String config : configs){
-													resourceCounter.add(new Resource(WorkflowType.CONFIGURATION,config,false));
+													Resource configResource = new Resource(WorkflowType.CONFIGURATION,config,false);
+													resource.setVnfCustomizationId(vnf.getModelInfo().getModelCustomizationId());
+													resource.setVfModuleCustomizationId(vfModule.getModelInfo().getModelCustomizationId());
+													resourceCounter.add(configResource);
 												}
 											}
 										}
@@ -820,69 +825,73 @@
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					workflowResourceIds.setServiceInstanceId(resourceId);
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 			} else if (orchFlow.getFlowName().contains(VNF)) {
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 			} else if (orchFlow.getFlowName().contains(NETWORK)
 					&& !orchFlow.getFlowName().contains(NETWORKCOLLECTION)) {
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					Resource resource = resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType())
 							.collect(Collectors.toList()).get(i);
-					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource.getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey()));
+					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource, apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey(), false));
 				}
 			} else if (orchFlow.getFlowName().contains(VFMODULE)) {
 				List<Resource> vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType())
 						.collect(Collectors.toList()));
 				for (int i = 0; i < vfModuleResourcesSorted.size(); i++) {
-					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 			} else if (orchFlow.getFlowName().contains(VOLUMEGROUP)) {
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 			} else if (orchFlow.getFlowName().contains(NETWORKCOLLECTION)) {
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 				}
 			} else if (orchFlow.getFlowName().contains(CONFIGURATION)) {
 				for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
 					flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType())
-							.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
-							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+							.collect(Collectors.toList()).get(i), apiVersion, resourceId,
+							requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, true));
 				}
 			}else {
-				flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, "", apiVersion, resourceId,
-						requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
+				flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, null, apiVersion, resourceId,
+						requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
 			}
 		}
 		return flowsToExecute;
 	}
 
-	protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, String key,
+	protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, Resource resource,
 			String apiVersion, String resourceId, String requestAction, boolean aLaCarte, String vnfType,
-			WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey) {
+			WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey, boolean isConfiguration) {
 		ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock();
 		BuildingBlock buildingBlock = new BuildingBlock();
 		buildingBlock.setBpmnFlowName(orchFlow.getFlowName());
 		buildingBlock.setMsoId(UUID.randomUUID().toString());
-		buildingBlock.setKey(key);
+		if(resource == null){
+			buildingBlock.setKey("");
+		}else{
+			buildingBlock.setKey(resource.getResourceId());
+		}
 		buildingBlock.setIsVirtualLink(isVirtualLink);
 		buildingBlock.setVirtualLinkKey(virtualLinkKey);
 		executeBuildingBlock.setApiVersion(apiVersion);
@@ -894,6 +903,13 @@
 		executeBuildingBlock.setRequestId(requestId);
 		executeBuildingBlock.setBuildingBlock(buildingBlock);
 		executeBuildingBlock.setRequestDetails(requestDetails);
+		if(isConfiguration){
+			ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys();
+			configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId());
+			configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId());
+			configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId());
+			executeBuildingBlock.setConfigurationResourceKeys(configurationResourceKeys);
+		}
 		return executeBuildingBlock;
 	}
 
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 e9dc374..e13a765 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
@@ -148,6 +148,18 @@
         AAIResourceUri vpnBindingURI = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId);
         injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI);
     }
+    
+    public void connectConfigurationToVfModule(String configurationId, String vfModuleId, String vnfId){
+    	 AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
+    	 AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, 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);
+    	 injectionHelper.getAaiClient().connect(configurationURI, vnfcURI);
+    }
     /**
      * method to delete Configuration details in A&AI
      *
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 5948c66..3dc9a4d 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
@@ -43,6 +43,7 @@
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 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.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.AAIResourcesClient;
@@ -63,6 +64,7 @@
     private ServiceInstance serviceInstance;
     private GenericVnf genericVnf;
     private VpnBinding vpnBinding;
+    private VfModule vfModule;
     
 	@Mock
 	protected AAIResourcesClient MOCK_aaiResourcesClient;
@@ -82,6 +84,7 @@
         serviceProxy = buildServiceProxy();
         serviceInstance = buildServiceInstance();
         genericVnf = buildGenericVnf();
+        vfModule = buildVfModule();
         vpnBinding = buildVpnBinding();
         doReturn(MOCK_aaiResourcesClient).when(MOCK_injectionHelper).getAaiClient();
     }
@@ -126,6 +129,20 @@
         aaiConfigurationResources.connectConfigurationToGenericVnf(configuration.getConfigurationId(), genericVnf.getVnfId());
         verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
     }
+    
+    @Test
+    public void connectConfigurationToVfModuleTest() {
+        doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
+        aaiConfigurationResources.connectConfigurationToVfModule(configuration.getConfigurationId(), vfModule.getVfModuleId(),genericVnf.getVnfId());
+        verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
+    }
+    
+    @Test
+    public void connectConfigurationToVnfcTest() {
+        doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class));
+        aaiConfigurationResources.connectConfigurationToVnfc(configuration.getConfigurationId(), "vnfcName");
+        verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
+    }
 
     @Test
     public void connectConfigurationToVpnBindingTest() {
