Add model type to resource model 93/87993/3
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>
Fri, 17 May 2019 13:31:40 +0000 (19:01 +0530)
committersubhash kumar singh <subhash.kumar.singh@huawei.com>
Sun, 19 May 2019 13:02:47 +0000 (18:32 +0530)
Add model type to resource model.

Change-Id: Ic1937d859cebca1b515d9c069c51c9811d6874ab
Issue-ID: SO-1393
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy

index fd698d4..aa0a4e7 100644 (file)
@@ -90,7 +90,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
     }
 
     // this method will convert resource list to instance_resource_list
-    void prepareInstanceResourceList(DelegateExecution execution) {
+    public void prepareInstanceResourceList(DelegateExecution execution) {
 
         String uuiRequest = execution.getVariable("uuiRequest")
         List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
@@ -251,9 +251,11 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
         def currentIndex = execution.getVariable("currentResourceIndex")
         List<Resource> sequencedResourceList = execution.getVariable("instanceResourceList")
         Resource currentResource = sequencedResourceList.get(currentIndex)
-        resourceInput.setResourceModelInfo(currentResource.getModelInfo());
+        resourceInput.setResourceModelInfo(currentResource.getModelInfo())
+        resourceInput.getResourceModelInfo().setModelType(currentResource.getResourceType().toString())
         ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
-        resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
+
+        resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo())
         def String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid();
 
         String incomingRequest = execution.getVariable("uuiRequest")