summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main/groovy
diff options
context:
space:
mode:
authordeepikasatheesh <deepika.s84@wipro.com>2021-01-19 08:56:49 +0000
committerdeepikasatheesh <deepika.s84@wipro.com>2021-01-25 05:03:00 +0000
commitcaca7facdd3d494d0b13cba1b5a00d0ff3853fb6 (patch)
treeafaa8c02e1f481a406fa6ec537ef85e7f3332876 /bpmn/so-bpmn-infrastructure-common/src/main/groovy
parentb8057099c4eb64dfde9d5573e92e79fa0ca15fd4 (diff)
Fixed issue in AN NSSMF activation flow for SDNR interactions
Issue-ID: SO-3393 Signed-off-by: deepikasatheesh <deepika.s84@wipro.com> Change-Id: I49071edf9400b25f61e6f598b43c567d3a968c4a
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy21
1 files changed, 16 insertions, 5 deletions
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 5f61c17589..897cdfcd7b 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
@@ -81,7 +81,17 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
private static final String VENDOR_ONAP = "ONAP_internal"
- def orchStatusMap = [activateInstance:"activated",deactivateInstance:"deactivated"]
+ enum orchStatusMap {
+ activateInstance("activated"),
+ deactivateInstance("deactivated")
+
+ private String value;
+
+ private orchStatusMap(String value) {
+ this.value = value;
+ }
+ }
+
@Override
public void preProcessRequest(DelegateExecution execution) {
@@ -143,7 +153,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
ServiceInstance sliceProfileInstance = execution.getVariable(KEY_SLICE_PROFILE)
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeSPStatus", false)
}else {
execution.setVariable("shouldChangeSPStatus", true)
@@ -166,7 +176,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeAN_NF_SPStatus", false)
}else {
execution.setVariable("shouldChangeAN_NF_SPStatus", true)
@@ -266,7 +276,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeTN_FH_SPStatus", false)
}else {
execution.setVariable("shouldChangeTN_FH_SPStatus", true)
@@ -305,7 +315,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeTN_MH_SPStatus", false)
}else {
execution.setVariable("shouldChangeTN_MH_SPStatus", true)
@@ -575,6 +585,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
serviceInfo.setServiceUuid(tnNssi.getModelVersionId())
serviceInfo.setGlobalSubscriberId(globalSubscriberId)
serviceInfo.setSubscriptionServiceType(subscriptionServiceType)
+ serviceInfo.setNssiId(nssiId)
JsonObject json = new JsonObject()
Gson jsonConverter = new Gson()