aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2018-04-23 11:37:23 +0800
committerc00149107 <chenchuanyu@huawei.com>2018-04-23 11:37:23 +0800
commit8fa2659ec0f0b94f22f5caa5d7e61048be18068c (patch)
treee41a0457538d56bf7bee2684d013c0ccd96ae3e0 /bpmn
parentf39f72df5f0953cfb681c86767d4cee773938004 (diff)
Update response for delete e2e service
Update response for delete e2e service Change-Id: I8cd96981e085111e55211e8a24cb3b2cebe7ef9a Issue-ID: SO-587 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy16
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn10
2 files changed, 16 insertions, 10 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
index d218adc279..ebf9ae7825 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
@@ -73,9 +73,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String requestId = execution.getVariable("mso-request-id")
- execution.setVariable("msoRequestId", requestId)
+ execution.setVariable("msoRequestId", requestId)
utils.log("INFO", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
-
+
String serviceInstanceId = execution.getVariable("serviceInstanceId")
if (isBlank(serviceInstanceId)) {
msg = "Input serviceInstanceId' is null"
@@ -114,7 +114,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
} else {
execution.setVariable("subscriptionServiceType", subscriptionServiceType)
}
-
+ String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
+ execution.setVariable("operationId", operationId)
+
execution.setVariable("operationType", "DELETE")
} catch (BpmnError e) {
throw e;
@@ -129,13 +131,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
public void sendSyncResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO", " *** sendSyncResponse *** ", isDebugEnabled)
-
try {
- String requestId = execution.getVariable("msoRequestId")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
utils.log("INFO", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
sendWorkflowResponse(execution, 202, syncResponse)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
index 20686252bd..8a3d441a8e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="DoDeleteE2EServiceInstance" name="All Resources Deleted" isExecutable="true">
<bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
<bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
@@ -165,6 +165,7 @@ dcsi.postDecomposeService(execution)]]></bpmn:script>
<camunda:in source="deleteResourceList" target="deleteResourceList" />
<camunda:in source="resourceInstanceIDs" target="resourceInstanceIDs" />
<camunda:in source="operationType" target="operationType" />
+ <camunda:in source="operationId" target="operationId" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1cevtpy</bpmn:outgoing>
@@ -180,6 +181,10 @@ dcsi.postDecomposeService(execution)]]></bpmn:script>
<bpmn:linkEventDefinition name="DecomposeService" />
</bpmn:intermediateThrowEvent>
<bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="StartEvent_1qh5a34" />
+ <bpmn:scriptTask id="ScriptTask_08a4vhm" name="Send Sync Ack Response" scriptFormat="groovy"> <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def csi = new CompareModelofE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+</bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteE2EServiceInstance">
@@ -398,6 +403,9 @@ dcsi.postDecomposeService(execution)]]></bpmn:script>
<dc:Bounds x="-16" y="-39" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_08a4vhm_di" bpmnElement="ScriptTask_08a4vhm">
+ <dc:Bounds x="494" y="260" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>