summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java18
2 files changed, 18 insertions, 8 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index 71937245bc..f842e78916 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -84,6 +84,14 @@ public class SDNCRestClient{
msoLogger.debug("BPEL Request:" + bpelRequest.toString());
+ // Added delay to allow completion of create request to SDNC
+ // before executing activate of create request.
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
String action = bpelRequest.getRequestHeader().getSvcAction();
String operation = bpelRequest.getRequestHeader().getSvcOperation();
String bpelReqId = bpelRequest.getRequestHeader().getRequestId();
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index 1989ca8cf9..b4851ee7a4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -233,14 +233,16 @@ public class ResourceRequestBuilder {
private static Object getValue(Object value, Map<String, Object> serviceInputs, List<Input> servInputs) {
if(value instanceof Map) {
- Map<String, Object> valueMap = new HashMap<>();
-
- Map<String, Object> propertyMap = (Map<String, Object>)value;
-
- for(String key : propertyMap.keySet()) {
- valueMap.put(key, getValue(propertyMap.get(key), serviceInputs, servInputs));
- }
- return valueMap; // return if the value is nested hashmap
+ // currently this logic handles only one level of nesting.
+// Map<String, Object> valueMap = new HashMap<>();
+//
+// Map<String, Object> propertyMap = (Map<String, Object>)value;
+//
+// for(String key : propertyMap.keySet()) {
+// valueMap.put(key, getValue(propertyMap.get(key), serviceInputs, servInputs));
+// }
+// return valueMap; // return if the value is nested hashmap
+ return ((LinkedHashMap) value).values().toArray()[0];
} else if(value instanceof GetInput) {
String inputName = ((GetInput)value).getInputName();