diff options
author | Aleem Raja <aleem.raja@t-systems.com> | 2022-08-10 21:20:12 +0530 |
---|---|---|
committer | Aleem Raja <aleem.raja@t-systems.com> | 2022-08-10 21:20:23 +0530 |
commit | ea65e0397e030bbd0a685f473b1c8416dd0a82f3 (patch) | |
tree | fc6acc9c4dbf23856ea3c21beb09478db5ebd5b6 /bpmn/so-bpmn-tasks/src/main/java | |
parent | b0f785e99096f230281d17e0fa89c21aca00fbac (diff) |
Multiple PNFs with same ModelInfo but different instance name not able to be instantiated
When instantiating a service with multiple PNFs, SO differentiates them using ModelCustomizationId. This causes issues when creating multiple instances of same model resource, and each lookup would return the same object.
With this patch, Instead of using ModelCustomizationId, we enable SO to use instanceName parameter to differentiate the PNFs.
Issue-ID: SO-3948
Signed-off-by: Aleem Raja <aleem.raja@t-systems.com>
Change-Id: I9dd039ac786a60f7cf4d4a9c456c7681f64d6786
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
2 files changed, 4 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java index b56bd905a6..466b49644f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java @@ -246,6 +246,7 @@ public class UserParamsServiceTraversal { pnfResource.setModelCustomizationId(modelInfo.getModelCustomizationUuid()); pnfResource.setModelVersionId(modelInfo.getModelVersionId()); } + pnfResource.setInstanceName(pnf.getInstanceName()); pnfResource.setProcessingPriority(pnf.getProcessingPriority()); resourceList.add(pnfResource); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/utils/WorkflowResourceIdsUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/utils/WorkflowResourceIdsUtils.java index 9cabf6665c..f3aafde2a2 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/utils/WorkflowResourceIdsUtils.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/utils/WorkflowResourceIdsUtils.java @@ -70,6 +70,8 @@ public final class WorkflowResourceIdsUtils { workflowResourceIds.setVnfInstanceName(instanceName); } else if (resourceType == WorkflowType.VFMODULE) { workflowResourceIds.setVfModuleInstanceName(instanceName); + } else if (resourceType == WorkflowType.PNF) { + workflowResourceIds.setPnfInstanceName(instanceName); } } @@ -110,6 +112,7 @@ public final class WorkflowResourceIdsUtils { workflowResourceIds.setInstanceGroupId((String) execution.getVariable("instanceGroupId")); workflowResourceIds.setVnfInstanceName((String) execution.getVariable("vnfInstanceName")); workflowResourceIds.setVfModuleInstanceName((String) execution.getVariable("vfModuleInstanceName")); + workflowResourceIds.setPnfInstanceName((String) execution.getVariable("pnfInstanceName")); return workflowResourceIds; } |