aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2021-02-10 13:27:33 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-10 13:27:33 +0000
commit2496ff717a7132e963d2136c35336baf37090bfa (patch)
tree713d2c50869caa0f882c34ba4cb9562b7ba1cfcd /bpmn/so-bpmn-infrastructure-common
parentfa1596d23cec5ef99548069ad6f20077917f7e59 (diff)
parentcaca7facdd3d494d0b13cba1b5a00d0ff3853fb6 (diff)
Merge "Fixed issue in AN NSSMF activation flow for SDNR interactions"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-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()