aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2018-12-12 12:38:08 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-12 12:38:08 +0000
commitbea05d3d2ea1b9775e0da3fe86b12cd211e96311 (patch)
tree39f06db1d41f7aa500e236e904fbc80c8c866070 /bpmn
parentc76ebac336a18c0a8e3f4cdf29e894f609fad036 (diff)
parent663f30dcb52f192f16ab4f20b5b7c13d49b4912f (diff)
Merge "Changed sdncRequestId to SDNCA_requestId"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy2
2 files changed, 4 insertions, 4 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
index a5e7c0fd06..a430cdb715 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
@@ -58,11 +58,10 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor {
execution.setVariable("SDNCA_InterimNotify", false)
String requestId = execution.getVariable("mso-request-id")
- if(isNotBlank(requestId)){
- execution.setVariable(Prefix + "requestId", requestId)
- }else{
+ if(isBlank(requestId)){
exceptionUtil.buildAndThrowWorkflowException(execution, 400, 'mso-request-id not provided by calling flow')
}
+
// Authorization Info
String basicAuthValue = UrnPropertiesReader.getVariable("mso.adapters.po.auth", execution)
@@ -124,6 +123,7 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor {
//calling process should pass a generated uuid if sending multiple sdnc requests
def sdncRequestId = utils.getNodeText(requestHeader, "RequestId")
+ execution.setVariable(Prefix + "requestId", sdncRequestId)
// Prepare SDNC Request to the SDNC Adapter
String sdncAdapterRequest = """
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
index ec69bf5eb9..e351210586 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
@@ -844,11 +844,11 @@ def sdncAdapterResponseError =
verify(mockExecution).setVariable("asynchronousResponseTimeout",false)
verify(mockExecution).setVariable("continueListening",false)
verify(mockExecution).setVariable("serviceConfigActivate",false)
- verify(mockExecution).setVariable("SDNCA_requestId", "testReqId")
verify(mockExecution).setVariable("SDNCA_SuccessIndicator",false)
verify(mockExecution).setVariable("SDNCA_InterimNotify",false)
verify(mockExecution).setVariable("BasicAuthHeaderValue","Basic dGVzdDp0ZXN0")
verify(mockExecution).setVariable("source","")
+ verify(mockExecution).setVariable("SDNCA_requestId", "745b1b50-e39e-4685-9cc8-c71f0bde8bf0")
verify(mockExecution).setVariable("sdncAdapterRequest", sdncAdapterRequest)
}