summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java2
-rw-r--r--adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java14
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java1
-rw-r--r--adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy5
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn72
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java23
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/GetE2EServiceInstanceResponse.java9
12 files changed, 62 insertions, 93 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java
index aacb4d64f0..c5b8bb7d59 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java
@@ -35,7 +35,7 @@ public class DeleteVfModuleResponse extends VfResponseCommon {
private String vnfId;
private String vfModuleId;
private Boolean vfModuleDeleted;
- private Map<String,String> vfModuleOutputs = new HashMap<String, String>();
+ private Map<String,String> vfModuleOutputs = new HashMap<>();
public DeleteVfModuleResponse() {
super();
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java
index 4a902bdd83..76cbda1ef4 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java
@@ -58,7 +58,7 @@ public abstract class VfResponseCommon {
public String toJsonString() {
try {
- String jsonString = null;
+ String jsonString;
ObjectMapper mapper = new ObjectMapper();
mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
jsonString = mapper.writeValueAsString(this);
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java
index 6c571f3e06..f51b27282c 100644
--- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java
+++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java
@@ -241,9 +241,6 @@ public class BpelRestClient {
LOGGER.debug("Sending to BPEL server: "+bpelUrl);
LOGGER.debug("Content is: "+toBpelStr);
- //Client 4.3+
- CloseableHttpClient client = null;
-
//POST
HttpPost post = new HttpPost(bpelUrl);
if (credentials != null && !credentials.isEmpty())
@@ -263,8 +260,7 @@ public class BpelRestClient {
//Client 4.3+
//Execute & GetResponse
- try {
- client = HttpClients.createDefault();
+ try (CloseableHttpClient client = HttpClients.createDefault()) {
CloseableHttpResponse response = client.execute(post);
if (response != null) {
lastResponseCode = response.getStatusLine().getStatusCode();
@@ -279,14 +275,6 @@ public class BpelRestClient {
LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, error, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception sending Bpel notification", e);
lastResponseCode = 900;
lastResponse = "";
- } finally {
- if(client != null){
- try {
- client.close();
- } catch (IOException e) {
- LOGGER.debug("Exception while closing client", e);
- }
- }
}
LOGGER.debug("Response code from BPEL server: "+lastResponseCode);
LOGGER.debug("Response body is: "+lastResponse);
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java
index 87b48fc68a..a8250fc35b 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java
@@ -462,7 +462,6 @@ public class VolumeAdapterRest {
LOGGER.debug("UpdateVNFVolumesTask start");
try {
@SuppressWarnings("unused")
- Holder<String> stackId = new Holder<> ();
Holder<Map<String, String>> outputs = new Holder<> ();
Holder<VnfRollback> vnfRollback = new Holder<> ();
String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
diff --git a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java
index 0293a8d4d0..20880c24a6 100644
--- a/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java
+++ b/adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java
@@ -132,7 +132,7 @@ public class BPRestCallback {
httpResponse = client.execute(method);
@SuppressWarnings("unused")
- String responseContent = null;
+ String responseContent;
if (httpResponse.getEntity() != null) {
responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
@@ -175,4 +175,4 @@ public class BPRestCallback {
LOGGER.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, "Camunda", "");
}
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
index e938a25fab..787453ed28 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
@@ -28,9 +28,9 @@ public class CryptoHandler implements ICryptoHandler {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
private static String msoKey = "aa3871669d893c7fb8abbcda31b88b4f";
- //private static String msoAaiPwd = "mso0206";
private static String msoAaiEncryptedPwd = "C1FC4A39E16419DD41DFC1212843F440";
+ @Override
public String getMsoAaiPassword() {
try {
return CryptoUtils.decrypt(msoAaiEncryptedPwd, msoKey);
@@ -41,6 +41,7 @@ public class CryptoHandler implements ICryptoHandler {
}
+ @Override
public String encryptMsoPassword(String plainMsoPwd) {
try {
return CryptoUtils.encrypt(plainMsoPwd, msoKey);
@@ -50,7 +51,7 @@ public class CryptoHandler implements ICryptoHandler {
}
}
-
+ @Override
public String decryptMsoPassword(String encryptedPwd) {
try {
return CryptoUtils.decrypt(encryptedPwd, msoKey);
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index 7f4f78762e..73066b3722 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -160,10 +160,10 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
try {
- String requestId = execution.getVariable("msoRequestId")
+ String operationId = execution.getVariable("operationId")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
// RESTResponse for API Handler (APIH) Reply Task
- String createServiceRestRequest = """{"service":{"serviceId":"${serviceInstanceId}","operationId":"${requestId}"}}""".trim()
+ String createServiceRestRequest = """{"service":{"serviceId":"${serviceInstanceId}","operationId":"${operationId}"}}""".trim()
utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + createServiceRestRequest, isDebugEnabled)
sendWorkflowResponse(execution, 202, createServiceRestRequest)
execution.setVariable("sentSyncResponse", true)
@@ -337,4 +337,5 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
}
+
} \ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
index b9d5e2c1d2..04b47b452a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
@@ -113,7 +113,7 @@ csi.sendSyncError(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_01umodj" sourceRef="ScriptTask_0u8o9p2" targetRef="CallActivity_1ang7q8" />
</bpmn:subProcess>
<bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_194rnud</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_081z8l2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_19eilro</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def csi = new CreateCustomE2EServiceInstance()
@@ -146,9 +146,8 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_1euqjsp</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def csi= new CreateCustomE2EServiceInstance()
-csi.InitServiceOperationStatus(execution)]]></bpmn:script>
+csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_081z8l2" sourceRef="Task_19mxcw3" targetRef="Task_0in343a" />
<bpmn:serviceTask id="Task_19mxcw3" name="Update Service Operation Status">
<bpmn:extensionElements>
<camunda:connector>
@@ -171,27 +170,22 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_1euqjsp</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_081z8l2</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_194rnud" sourceRef="Task_0in343a" targetRef="ScriptTask_0xupxj9" />
- <bpmn:scriptTask id="Task_0in343a" name="Send SDNC Service" scriptFormat="java">
- <bpmn:incoming>SequenceFlow_081z8l2</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_194rnud</bpmn:outgoing>
- <bpmn:script></bpmn:script>
- </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_081z8l2" sourceRef="Task_19mxcw3" targetRef="ScriptTask_0xupxj9" />
</bpmn:process>
<bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateCustomE2EServiceInstance">
<bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
- <dc:Bounds x="82" y="180" width="36" height="36" />
+ <dc:Bounds x="-6" y="180" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="64" y="221" width="73" height="24" />
+ <dc:Bounds x="-24" y="221" width="73" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_0ka59nc_di" bpmnElement="SubProcess_0ka59nc" isExpanded="true">
<dc:Bounds x="463" y="632" width="394" height="188" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0rhljy8_di" bpmnElement="DoCreateE2EServiceInstance">
- <dc:Bounds x="701" y="158" width="100" height="80" />
+ <dc:Bounds x="751" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0bpd6c0_di" bpmnElement="EndEvent_0bpd6c0">
<dc:Bounds x="1258" y="286" width="36" height="36" />
@@ -200,7 +194,7 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
- <dc:Bounds x="129" y="158" width="100" height="80" />
+ <dc:Bounds x="115" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0ttvn8r_di" bpmnElement="ScriptTask_0ttvn8r">
<dc:Bounds x="1038" y="158" width="100" height="80" />
@@ -212,7 +206,7 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
<dc:Bounds x="348" y="370" width="679" height="194" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0xupxj9_di" bpmnElement="ScriptTask_0xupxj9">
- <dc:Bounds x="577" y="158" width="100" height="80" />
+ <dc:Bounds x="610" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0aqn64l_di" bpmnElement="ExclusiveGateway_0aqn64l" isMarkerVisible="true">
<dc:Bounds x="903" y="173" width="50" height="50" />
@@ -227,24 +221,24 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0s2spoq_di" bpmnElement="SequenceFlow_0s2spoq">
- <di:waypoint xsi:type="dc:Point" x="118" y="198" />
- <di:waypoint xsi:type="dc:Point" x="129" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="30" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="115" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="78.5" y="177" width="90" height="12" />
+ <dc:Bounds x="27.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_19eilro_di" bpmnElement="SequenceFlow_19eilro">
- <di:waypoint xsi:type="dc:Point" x="677" y="198" />
- <di:waypoint xsi:type="dc:Point" x="701" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="710" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="751" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="644" y="177" width="90" height="12" />
+ <dc:Bounds x="685.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
- <di:waypoint xsi:type="dc:Point" x="801" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="851" y="198" />
<di:waypoint xsi:type="dc:Point" x="903" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="807" y="183" width="0" height="12" />
+ <dc:Bounds x="832" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
@@ -255,10 +249,10 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z4faf9_di" bpmnElement="SequenceFlow_0z4faf9">
- <di:waypoint xsi:type="dc:Point" x="229" y="198" />
- <di:waypoint xsi:type="dc:Point" x="245" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="215" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="273" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="192" y="177" width="90" height="12" />
+ <dc:Bounds x="199" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14zu6wr_di" bpmnElement="SequenceFlow_14zu6wr">
@@ -369,35 +363,25 @@ csi.InitServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1euqjsp_di" bpmnElement="SequenceFlow_1euqjsp">
- <di:waypoint xsi:type="dc:Point" x="345" y="198" />
- <di:waypoint xsi:type="dc:Point" x="371" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="373" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="446" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="358" y="177" width="0" height="12" />
+ <dc:Bounds x="364.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1a3vwas_di" bpmnElement="Task_1tqjch6">
- <dc:Bounds x="245" y="158" width="100" height="80" />
+ <dc:Bounds x="273" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_081z8l2_di" bpmnElement="SequenceFlow_081z8l2">
- <di:waypoint xsi:type="dc:Point" x="497" y="198" />
- <di:waypoint xsi:type="dc:Point" x="522" y="198" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="509.5" y="177" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1afiuuq_di" bpmnElement="Task_19mxcw3">
- <dc:Bounds x="371" y="158" width="100" height="80" />
+ <dc:Bounds x="446" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_194rnud_di" bpmnElement="SequenceFlow_194rnud">
- <di:waypoint xsi:type="dc:Point" x="597" y="198" />
- <di:waypoint xsi:type="dc:Point" x="627" y="198" />
+ <bpmndi:BPMNEdge id="SequenceFlow_081z8l2_di" bpmnElement="SequenceFlow_081z8l2">
+ <di:waypoint xsi:type="dc:Point" x="546" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="610" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="612" y="177" width="0" height="12" />
+ <dc:Bounds x="533" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1u5yu0n_di" bpmnElement="Task_0in343a">
- <dc:Bounds x="476" y="158" width="100" height="80" />
- </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
index 5cf6f6ca05..484981c99d 100644
--- a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
@@ -32,7 +32,6 @@ import org.slf4j.LoggerFactory;
import org.camunda.bpm.cockpit.db.QueryParameters;
import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
-import org.camunda.bpm.cockpit.db.CommandExecutor;
import org.openecomp.camunda.bpmn.plugin.urnmap.db.*;
public class ProcessInstanceResource extends AbstractPluginResource {
@@ -61,25 +60,25 @@ public class ProcessInstanceResource extends AbstractPluginResource {
}
@PUT
- //public void insertNewRow(String key_, String value_)
+ //public void insertNewRow(String key, String value)
public void insertNewRow(String temp)
{
log.info("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
StringTokenizer st = new StringTokenizer(temp, "|");
- String key_ = "";
- String value_ = "";
+ String key = "";
+ String value = "";
while(st.hasMoreTokens()) {
- key_ = st.nextToken();
- value_ = st.nextToken();
- System.out.println(key_ + "\t" + value_);
+ key = st.nextToken();
+ value = st.nextToken();
+ log.info(key + "\t" + value);
}
- log.info("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
+ log.info("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key + " , Value: " + value);
URNData nRow = new URNData();
nRow.setVer_("1");
- nRow.setURNName(key_);
- nRow.setURNValue(value_);
+ nRow.setURNName(key);
+ nRow.setURNValue(value);
getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
@@ -87,14 +86,12 @@ public class ProcessInstanceResource extends AbstractPluginResource {
}
@POST
- // public void getPersistData(List<URNData > myList) {
public void getPersistData(URNData d) {
log.info("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() );
getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
- //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class);
-
+
log.info("XXXXXXXXXX - END - XXXXXXXXXXXXXXX");
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
index fb507a69cf..92a45a71dd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
@@ -54,6 +54,7 @@ import org.openecomp.mso.logger.MessageEnum;
import org.openecomp.mso.logger.MsoAlarmLogger;
import org.openecomp.mso.logger.MsoLogger;
import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.OperationStatus;
import org.openecomp.mso.requestsdb.RequestsDatabase;
import com.wordnik.swagger.annotations.Api;
@@ -146,10 +147,10 @@ public class OrchestrationRequests {
long startTime = System.currentTimeMillis();
- InfraActiveRequests requestDB = null;
+ OperationStatus requestDB = null;
try {
- requestDB = requestsDB.getRequestFromInfraActive(serviceId);
+ requestDB = requestsDB.getOperationStatus(serviceId, operationId);
} catch (Exception e) {
msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
@@ -181,9 +182,7 @@ public class OrchestrationRequests {
}
- E2ERequest e2erequest = mapInfraActiveRequestToE2ERequest(requestDB);
-
- e2eServiceResponse.setE2eRequest(e2erequest);
+ e2eServiceResponse.setE2eRequest(requestDB);
return Response.status(200).entity(e2eServiceResponse).build();
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
index 1e8bea0c55..92e3e5b078 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
@@ -86,7 +86,7 @@ public class TasksHandler {
// Prepare the query string to /task interface
TaskVariables tv = new TaskVariables();
- List<TaskVariableValue> tvvList = new ArrayList<TaskVariableValue>();
+ List<TaskVariableValue> tvvList = new ArrayList<>();
if (originalRequestId != null) {
TaskVariableValue tvv = new TaskVariableValue();
@@ -168,7 +168,7 @@ public class TasksHandler {
return resp;
}
TasksGetResponse trr = new TasksGetResponse();
- List<TaskList> taskList = new ArrayList<TaskList>();
+ List<TaskList> taskList = new ArrayList<>();
ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
int bpelStatus = respHandler.getStatus ();
@@ -250,7 +250,6 @@ public class TasksHandler {
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
responseBack = Response.status (HttpStatus.SC_ACCEPTED).entity (jsonResponse).build ();
- // msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
return responseBack;
}
@@ -261,9 +260,9 @@ public class TasksHandler {
// Makes a GET call to Camunda to get variables for this task
private TaskList getTaskInfo(String taskId) throws Exception {
- TaskList taskList = null;
+ TaskList taskList;
String getRequestUrl = requestUrl + taskId + "/variables";
- HttpResponse getResponse = null;
+ HttpResponse getResponse;
long subStartTime = System.currentTimeMillis();
RequestClient requestClient = RequestClientFactory.getRequestClient (getRequestUrl, MsoPropertiesUtils.loadMsoProperties ());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/GetE2EServiceInstanceResponse.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/GetE2EServiceInstanceResponse.java
index 8145afca6d..4c749b7e58 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/GetE2EServiceInstanceResponse.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/GetE2EServiceInstanceResponse.java
@@ -22,18 +22,19 @@
package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.openecomp.mso.requestsdb.OperationStatus;
@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
public class GetE2EServiceInstanceResponse {
- protected E2ERequest e2eRequest;
+ protected OperationStatus e2eRequest;
- public E2ERequest getE2eRequest() {
+ public OperationStatus getE2eRequest() {
return e2eRequest;
}
- public void setE2eRequest(E2ERequest e2eRequest) {
- this.e2eRequest = e2eRequest;
+ public void setE2eRequest(OperationStatus requestDB) {
+ this.e2eRequest = requestDB;
}
}