summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-05-20 17:22:18 -0400
committerElena Kuleshov <evn@att.com>2019-05-20 17:23:40 -0400
commite6e0c906bddeb9bb5b67b16b4b9530d6b0c1946c (patch)
treee871c0ce7f32d73f16069574ccbd5aaffb3e53fc /bpmn/MSOCommonBPMN/src/main/java
parent969333e6374d3e2259ab5fbbdbcbb3f4c12a134e (diff)
Change serviceInstance CM retrieval
Change serviceInstance CM retrieval Issue-ID: SO-1903 Signed-off-by: Kuleshov, Elena <evn@att.com> Change-Id: I6bc1e3f0d219d6c9feff083ce43cd6afdec1c439
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
index 86bbead9a4..b76316bf0e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
@@ -57,8 +57,13 @@ public class ExtractPojosForBB {
GenericVnf vnf;
switch (key) {
case SERVICE_INSTANCE_ID:
- result = lookupObjectInList(gBBInput.getCustomer().getServiceSubscription().getServiceInstances(),
- value);
+ if (gBBInput.getCustomer().getServiceSubscription() == null
+ && gBBInput.getServiceInstance() != null) {
+ result = Optional.of((T) gBBInput.getServiceInstance());
+ } else {
+ result = lookupObjectInList(
+ gBBInput.getCustomer().getServiceSubscription().getServiceInstances(), value);
+ }
break;
case GENERIC_VNF_ID:
serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);