is sniro request is initial or speed change 17/62117/1
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Thu, 23 Aug 2018 13:02:40 +0000 (09:02 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Thu, 23 Aug 2018 13:02:51 +0000 (09:02 -0400)
Changed logic to determine if sniro request is initial or speed change.

Change-Id: I36eeea8860855bf5226560dcc2722a2c27723ef9
Issue-ID: SO-893
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy

index fd4ab32..9b14432 100644 (file)
@@ -110,9 +110,12 @@ class SniroUtils{
                String requestType = "initial"
                List<Resource> resources = decomposition.getServiceResources()
                for(Resource r:resources){
-                       HomingSolution currentSolution = (HomingSolution) r.getCurrentHomingSolution()
+                       HomingSolution currentSolution = r.getCurrentHomingSolution()
                        if(currentSolution != null){
-                               requestType = "speed changed"
+                               String indicator = currentSolution.getServiceInstanceId()
+                               if(indicator != null){
+                                       requestType = "speed changed"
+                               }
                        }
                }