summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn5
4 files changed, 11 insertions, 9 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
index 1e2a703e70..0692e5022a 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
@@ -755,8 +755,6 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
public void setBasicDBAuthHeader(DelegateExecution execution, isDebugLogEnabled) {
try {
String basicAuthValueDB = UrnPropertiesReader.getVariable("mso.adapters.db.auth", execution)
- utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
-
def encodedString = utils.getBasicAuth(basicAuthValueDB, UrnPropertiesReader.getVariable("mso.msoKey", execution))
execution.setVariable("BasicAuthHeaderValueDB",encodedString)
} catch (IOException ex) {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
index c3511e69a4..78f3e96978 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
@@ -20,13 +20,14 @@
package org.onap.so.bpmn.common.baseclient;
+import org.onap.so.logging.jaxrs.filter.SpringClientFilter;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
-import org.springframework.http.client.SimpleClientHttpRequestFactory;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
@@ -59,11 +60,12 @@ public class BaseClient<I,O> {
public O post(I data, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
return run(data, HttpMethod.POST, typeRef, uriVariables);
}
-
+
public O run(I data, HttpMethod method, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
HttpEntity<I> requestEntity = new HttpEntity<I>(data, getHttpHeader());
RestTemplate restTemplate = new RestTemplate();
- restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));
+ restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()));
+ restTemplate.getInterceptors().add(new SpringClientFilter());
ResponseEntity<O> responseEntity = restTemplate.exchange(getTargetUrl(), method, requestEntity, typeRef,
uriVariables);
return responseEntity.getBody();
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
index 67bd961844..63c867f3c7 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true">
<bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
@@ -56,6 +56,7 @@ completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]></bpmn2:script
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
<camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="X-ONAP-RequestID">#{CMSO_request_id}</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="method">POST</camunda:inputParameter>
@@ -88,7 +89,7 @@ buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB stat
<bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ExclusiveGateway_7" targetRef="BuildErrorMessage" />
<bpmn2:boundaryEvent id="BoundaryEvent_7" name="" attachedToRef="updateInfraRequest">
<bpmn2:outgoing>SequenceFlow_0mipf25</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1" />
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1" camunda:errorCodeVariable="gJavaErrorCode" camunda:errorMessageVariable="gJavaErrorMessage" />
</bpmn2:boundaryEvent>
<bpmn2:endEvent id="EndEvent_1">
<bpmn2:incoming>SequenceFlow_1pzb94j</bpmn2:incoming>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
index c59564b1e3..990863ec93 100644
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
+++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_3SPHsLr9EeWak-hhutJWuQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_3SPHsLr9EeWak-hhutJWuQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="FalloutHandler" name="Fallout Handler" isExecutable="true">
<bpmn2:parallelGateway id="ParallelGateway_1">
<bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
@@ -139,6 +139,7 @@ falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraRespons
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
<camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+ <camunda:entry key="X-ONAP-RequestID">#{FH_request_id}</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">
@@ -168,7 +169,7 @@ return updateRequestInfra.updateRequestInfraPayload(execution)]]></camunda:scrip
</bpmn2:sequenceFlow>
<bpmn2:boundaryEvent id="BoundaryEvent_3" name="Connect Fault" attachedToRef="ServiceTask_2">
<bpmn2:outgoing>SequenceFlow_80</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2" />
+ <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2" camunda:errorCodeVariable="gJavaErrorCode" camunda:errorMessageVariable="gJavaErrorMessage" />
</bpmn2:boundaryEvent>
<bpmn2:sequenceFlow id="SequenceFlow_80" name="" sourceRef="BoundaryEvent_3" targetRef="ScriptTask_7" />
<bpmn2:subProcess id="SubProcess_1" name="Event Handler" triggeredByEvent="true">