Associate PNF instance with Service 62/75862/4
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>
Wed, 16 Jan 2019 10:29:46 +0000 (11:29 +0100)
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>
Wed, 13 Feb 2019 08:42:00 +0000 (09:42 +0100)
Change-Id: I19e25e0daae042b30138bbfc074b0e651b8b1c01
Issue-ID: SO-1274
Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/aai/AaiConnectionImpl.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java [new file with mode: 0644]
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/implementation/AaiConnection.java
bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java
bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java [new file with mode: 0644]
bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn

index 70d9405..4e0bf02 100644 (file)
 
 package org.onap.so.bpmn.infrastructure.pnf.delegate;
 
-import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Optional;
-
 import org.onap.aai.domain.yang.Pnf;
 import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
 import org.springframework.context.annotation.Primary;
@@ -39,9 +37,10 @@ public class AaiConnectionTestImpl implements AaiConnection {
     public static final String ID_WITH_ENTRY = "idWithEntryNoIp";
 
     private Map<String, Pnf> created = new HashMap<>();
+    private Map<String, String> serviceAndPnfRelationMap = new HashMap<>();
 
     @Override
-    public Optional<Pnf> getEntryFor(String correlationId) throws IOException {
+    public Optional<Pnf> getEntryFor(String correlationId) {
         if (Objects.equals(correlationId, ID_WITH_ENTRY)) {
             return Optional.of(new Pnf());
         } else {
@@ -50,15 +49,25 @@ public class AaiConnectionTestImpl implements AaiConnection {
     }
 
     @Override
-    public void createEntry(String correlationId, Pnf entry) throws IOException {
+    public void createEntry(String correlationId, Pnf entry) {
         created.put(correlationId, entry);
     }
 
+    @Override
+    public void createRelation(String serviceInstanceId, String pnfName) {
+        serviceAndPnfRelationMap.put(serviceInstanceId, pnfName);
+    }
+
     public Map<String, Pnf> getCreated() {
         return created;
     }
 
+    public Map<String, String> getServiceAndPnfRelationMap() {
+        return serviceAndPnfRelationMap;
+    }
+
     public void reset() {
         created.clear();
+        serviceAndPnfRelationMap.clear();
     }
 }
index 2d0d4b5..db6cbe0 100644 (file)
@@ -31,15 +31,19 @@ import java.util.Map;
 
 import java.util.UUID;
 import org.assertj.core.api.Assertions;
+import org.assertj.core.data.MapEntry;
 import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Before;
 import org.junit.Test;
 import org.onap.so.BaseIntegrationTest;
 import org.springframework.beans.factory.annotation.Autowired;
 
 public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
 
-    private static final String TIMEOUT_10_S = "PT10S";
     private static final String VALID_UUID = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
+    private static final String SERVICE_INSTANCE_ID = "serviceForInstance";
+
+    private Map<String, Object> variables;
 
     @Autowired
     private AaiConnectionTestImpl aaiConnection;
@@ -47,14 +51,18 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
     @Autowired
     private DmaapClientTestImpl dmaapClientTestImpl;
 
+    @Before
+    public void setup() {
+        aaiConnection.reset();
+        variables = new HashMap<>();
+        variables.put("serviceInstanceId", SERVICE_INSTANCE_ID);
+        variables.put(PNF_UUID, VALID_UUID);
+    }
+
     @Test
     public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() {
         // given
-        aaiConnection.reset();       
-        Map<String, Object> variables = new HashMap<>();
-        variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
         variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITH_ENTRY);
-        variables.put(PNF_UUID, VALID_UUID);
         // when
         ProcessInstance instance = runtimeService
                 .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -70,19 +78,17 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
                 "AaiEntryExists",
                 "InformDmaapClient",
                 "WaitForDmaapPnfReadyNotification",
+                "CreateRelationId",
                 "AaiEntryUpdated"
         );
+        Assertions.assertThat(aaiConnection.getServiceAndPnfRelationMap()).
+                containsOnly(MapEntry.entry(SERVICE_INSTANCE_ID,AaiConnectionTestImpl.ID_WITH_ENTRY));
     }
 
     @Test
     public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() {
         // given
-        aaiConnection.reset();
-       
-        Map<String, Object> variables = new HashMap<>();
-        variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
         variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITHOUT_ENTRY);
-        variables.put(PNF_UUID, VALID_UUID);
         // when
         ProcessInstance instance = runtimeService
                 .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -99,8 +105,11 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
                 "AaiEntryExists",
                 "InformDmaapClient",
                 "WaitForDmaapPnfReadyNotification",
+                "CreateRelationId",
                 "AaiEntryUpdated"
         );
         Assertions.assertThat(aaiConnection.getCreated()).containsOnlyKeys(AaiConnectionTestImpl.ID_WITHOUT_ENTRY);
+        Assertions.assertThat(aaiConnection.getServiceAndPnfRelationMap()).
+                containsOnly(MapEntry.entry(SERVICE_INSTANCE_ID,AaiConnectionTestImpl.ID_WITHOUT_ENTRY));
     }
 }
index d57e487..1bf2a29 100644 (file)
@@ -23,7 +23,11 @@ package org.onap.so.bpmn.infrastructure.pnf.aai;
 import java.util.Optional;
 import org.onap.aai.domain.yang.Pnf;
 import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.AAIResourcesClient;
 import org.onap.so.client.aai.AAIRestClientImpl;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.so.client.aai.entities.uri.AAIUriFactory;
 import org.springframework.stereotype.Component;
 
 @Component
@@ -40,4 +44,12 @@ public class AaiConnectionImpl implements AaiConnection {
         AAIRestClientImpl restClient = new AAIRestClientImpl();
         restClient.createPnf(correlationId, entry);
     }
+
+    @Override
+    public void createRelation(String serviceInstanceId, String pnfName) {
+        AAIResourceUri serviceInstanceURI = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE,
+                serviceInstanceId);
+        AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfName);
+        new AAIResourcesClient().connect(serviceInstanceURI, pnfUri);
+    }
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelation.java
new file mode 100644 (file)
index 0000000..21d4396
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CreateRelation implements JavaDelegate {
+
+    private static final Logger logger = LoggerFactory.getLogger(CreateRelation.class);
+
+    private AaiConnection aaiConnectionImpl;
+
+    @Autowired
+    public CreateRelation(AaiConnection aaiConnectionImpl) {
+        this.aaiConnectionImpl = aaiConnectionImpl;
+    }
+
+    @Override
+    public void execute(DelegateExecution delegateExecution) {
+        String serviceInstanceId = (String) delegateExecution.getVariable("serviceInstanceId");
+        String pnfName = (String) delegateExecution.getVariable("correlationId");
+        try {
+            aaiConnectionImpl.createRelation(serviceInstanceId, pnfName);
+        } catch (Exception e) {
+            new ExceptionUtil().buildAndThrowWorkflowException(delegateExecution, 9999,
+                    "An exception occurred when making service and pnf relation. Exception: " + e.getMessage());
+        }
+        logger.debug("The relation has been made between service with id: {} and pnf with name: {}",
+                serviceInstanceId, pnfName);
+    }
+
+}
index 5165912..eaabb2b 100644 (file)
@@ -29,4 +29,6 @@ public interface AaiConnection {
     Optional<Pnf> getEntryFor(String correlationId) throws IOException;
 
     void createEntry(String correlationId, Pnf entry) throws IOException;
+
+    void createRelation(String serviceInstanceId, String pnfName) throws IOException;
 }
index 201e791..76b62a9 100644 (file)
@@ -37,7 +37,7 @@ public class AaiConnectionTestImpl implements AaiConnection {
     private Map<String, Pnf> created = new HashMap<>();
 
     @Override
-    public Optional<Pnf> getEntryFor(String correlationId) throws IOException {
+    public Optional<Pnf> getEntryFor(String correlationId) {
         if (Objects.equals(correlationId, ID_WITH_ENTRY)) {
             return Optional.of(new Pnf());
         } else {
@@ -50,6 +50,10 @@ public class AaiConnectionTestImpl implements AaiConnection {
         created.put(correlationId, entry);
     }
 
+    @Override
+    public void createRelation(String serviceInstanceId, String pnfName) {
+    }
+
     public Map<String, Pnf> getCreated() {
         return created;
     }
index 7df6757..300d1e4 100644 (file)
@@ -36,4 +36,10 @@ public class AaiConnectionThrowingException implements AaiConnection {
     public void createEntry(String correlationId, Pnf entry) throws IOException {
         throw new IOException();
     }
+
+    @Override
+    public void createRelation(String serviceInstanceId, String pnfName) throws IOException {
+        throw new IOException();
+    }
+
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateRelationTest.java
new file mode 100644 (file)
index 0000000..2dd3e23
--- /dev/null
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.io.IOException;
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.bpmn.infrastructure.pnf.aai.AaiConnectionImpl;
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+
+public class CreateRelationTest {
+
+    private static final String SERVICE_INSTANCE_ID = "serviceTest";
+    private static final String PNF_NAME = "pnfNameTest";
+
+    private DelegateExecutionFake executionFake;
+
+    @Before
+    public void setUp() {
+        executionFake = new DelegateExecutionFake();
+        executionFake.setVariable("serviceInstanceId", SERVICE_INSTANCE_ID);
+        executionFake.setVariable("correlationId", PNF_NAME);
+    }
+
+    @Test
+    public void createRelationSuccessful() throws IOException {
+        // given
+        AaiConnection aaiConnectionMock = mock(AaiConnectionImpl.class);
+        CreateRelation testedObject = new CreateRelation(aaiConnectionMock);
+        // when
+        testedObject.execute(executionFake);
+        // then
+        verify(aaiConnectionMock).createRelation(SERVICE_INSTANCE_ID, PNF_NAME);
+    }
+
+    @Test
+    public void shouldThrowBpmnErrorWhenExceptionOccurred() {
+        CreateRelation testedObject = new CreateRelation(new AaiConnectionThrowingException());
+        executionFake.setVariable("testProcessKey", "testProcessKeyValue");
+
+        assertThatThrownBy(() -> testedObject.execute(executionFake)).isInstanceOf(BpmnError.class);
+    }
+}
index d807917..5defe21 100644 (file)
@@ -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="2.0.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.11.3">
   <bpmn:collaboration id="Collaboration_1d0w8lf">
     <bpmn:participant id="Participant_1egg397" name="SO&#10;Create and Activate Pnf Resource" processRef="CreateAndActivatePnfResource" />
     <bpmn:participant id="Participant_0atuyq0" name="AAI" />
@@ -17,7 +17,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_0v5ffpe" name="No" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="CreatePnfEntryInAai">
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!aaiContainsInfoAboutPnf}</bpmn:conditionExpression>
     </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="SequenceFlow_0p09qgm" sourceRef="WaitForDmaapPnfReadyNotification" targetRef="AaiEntryUpdated" />
+    <bpmn:sequenceFlow id="SequenceFlow_0p09qgm" sourceRef="WaitForDmaapPnfReadyNotification" targetRef="CreateRelationId" />
     <bpmn:sequenceFlow id="SequenceFlow_17s9025" sourceRef="AaiEntryExists" targetRef="InformDmaapClient" />
     <bpmn:sequenceFlow id="SequenceFlow_1qr6cmf" sourceRef="CreatePnfEntryInAai" targetRef="AaiEntryExists" />
     <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" />
@@ -59,9 +59,6 @@
       <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming>
       <bpmn:errorEventDefinition errorRef="Error_1" />
     </bpmn:endEvent>
-    <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated">
-      <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming>
-    </bpmn:endEvent>
     <bpmn:receiveTask id="WaitForDmaapPnfReadyNotification" name="Wait for DMAAP pnf-ready notification" messageRef="Message_13h1tlo">
       <bpmn:incoming>SequenceFlow_1o8od8e</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0p09qgm</bpmn:outgoing>
       <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing>
     </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="SequenceFlow_0o6zhjk" sourceRef="CreateRelationId" targetRef="AaiEntryUpdated" />
+    <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated">
+      <bpmn:incoming>SequenceFlow_0o6zhjk</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:serviceTask id="CreateRelationId" name="Create Relation" camunda:delegateExpression="${CreateRelation}">
+      <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0o6zhjk</bpmn:outgoing>
+    </bpmn:serviceTask>
     <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" />
     <bpmn:textAnnotation id="TextAnnotation_1eyzes8">
-      <bpmn:text>Inputs:
+      <bpmn:text><![CDATA[Inputs:
  - timeoutForPnfEntryNotification - String
  - correlationId - String
- - uuid - String
-</bpmn:text>
+ - uuid - String]]></bpmn:text>
     </bpmn:textAnnotation>
   </bpmn:process>
   <bpmn:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="EndEvent_0k52gr7_di" bpmnElement="AaiEntryUpdated">
-        <dc:Bounds x="1312" y="189" width="36" height="36" />
+        <dc:Bounds x="1364" y="189" width="36" height="36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1287" y="230" width="88" height="14" />
+          <dc:Bounds x="1339" y="230" width="89" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="StartEvent_0j5ok9h_di" bpmnElement="CreateAndActivatePnf_StartEvent">
         <dc:Bounds x="511" y="167" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1j4r3zt_di" bpmnElement="SequenceFlow_1j4r3zt">
-        <di:waypoint x="319" y="207" />
-        <di:waypoint x="390" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="319" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="390" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="309.5" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1l1t6ak_di" bpmnElement="SequenceFlow_1l1t6ak">
-        <di:waypoint x="415" y="182" />
-        <di:waypoint x="415" y="66" />
-        <di:waypoint x="711" y="66" />
-        <di:waypoint x="711" y="182" />
+        <di:waypoint xsi:type="dc:Point" x="415" y="182" />
+        <di:waypoint xsi:type="dc:Point" x="415" y="66" />
+        <di:waypoint xsi:type="dc:Point" x="711" y="66" />
+        <di:waypoint xsi:type="dc:Point" x="711" y="182" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="430" y="159" width="19" height="14" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0v5ffpe_di" bpmnElement="SequenceFlow_0v5ffpe">
-        <di:waypoint x="440" y="207" />
-        <di:waypoint x="511" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="440" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="511" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="448" y="210" width="14" height="14" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1qr6cmf_di" bpmnElement="SequenceFlow_1qr6cmf">
-        <di:waypoint x="611" y="207" />
-        <di:waypoint x="686" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="611" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="686" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="605" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0j5ksz1_di" bpmnElement="SequenceFlow_0j5ksz1">
-        <di:waypoint x="-18" y="207" />
-        <di:waypoint x="48" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="-18" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="48" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="-30" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
         <dc:Bounds x="123" y="523" width="502" height="60" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="MessageFlow_1h3xu88_di" bpmnElement="MessageFlow_1h3xu88">
-        <di:waypoint x="561" y="247" />
-        <di:waypoint x="561" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="561" y="247" />
+        <di:waypoint xsi:type="dc:Point" x="561" y="523" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="531" y="380" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="MessageFlow_09ibv5a_di" bpmnElement="MessageFlow_09ibv5a">
-        <di:waypoint x="250" y="247" />
-        <di:waypoint x="250" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="250" y="247" />
+        <di:waypoint xsi:type="dc:Point" x="250" y="523" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="220" y="380" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="MessageFlow_0vjul4t_di" bpmnElement="MessageFlow_0vjul4t">
-        <di:waypoint x="289" y="523" />
-        <di:waypoint x="289" y="247" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="247" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="259" y="380" width="90" height="10" />
         </bpmndi:BPMNLabel>
         <dc:Bounds x="-37" y="70" width="243" height="82" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="Association_0d7oxnz_di" bpmnElement="Association_0d7oxnz">
-        <di:waypoint x="-36" y="189" />
-        <di:waypoint x="-36" y="152" />
+        <di:waypoint xsi:type="dc:Point" x="-36" y="189" />
+        <di:waypoint xsi:type="dc:Point" x="-36" y="152" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="MessageFlow_1vrcp2d_di" bpmnElement="MessageFlow_1vrcp2d">
-        <di:waypoint x="1060" y="523" />
-        <di:waypoint x="1060" y="247" />
+        <di:waypoint xsi:type="dc:Point" x="1060" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="1060" y="247" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="996" y="380" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_17s9025_di" bpmnElement="SequenceFlow_17s9025">
-        <di:waypoint x="736" y="207" />
-        <di:waypoint x="803" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="736" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="803" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="719" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1kc34bc_di" bpmnElement="SequenceFlow_1kc34bc">
-        <di:waypoint x="1092" y="265" />
-        <di:waypoint x="1092" y="363" />
-        <di:waypoint x="1145" y="363" />
+        <di:waypoint xsi:type="dc:Point" x="1092" y="265" />
+        <di:waypoint xsi:type="dc:Point" x="1092" y="363" />
+        <di:waypoint xsi:type="dc:Point" x="1145" y="363" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1028" y="309" width="90" height="10" />
         </bpmndi:BPMNLabel>
         <dc:Bounds x="1008" y="167" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0p09qgm_di" bpmnElement="SequenceFlow_0p09qgm">
-        <di:waypoint x="1108" y="207" />
-        <di:waypoint x="1312" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="1108" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="1195" y="207" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1148" y="187" width="90" height="10" />
+          <dc:Bounds x="1106.5" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1o8od8e_di" bpmnElement="SequenceFlow_1o8od8e">
-        <di:waypoint x="903" y="207" />
-        <di:waypoint x="1008" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="903" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="1008" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="893.5" y="187" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="MessageFlow_0tg4hw9_di" bpmnElement="MessageFlow_0tg4hw9">
-        <di:waypoint x="853" y="247" />
-        <di:waypoint x="853" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="853" y="247" />
+        <di:waypoint xsi:type="dc:Point" x="853" y="523" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="823" y="380" width="90" height="10" />
         </bpmndi:BPMNLabel>
         <dc:Bounds x="803" y="167" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1miyzfe_di" bpmnElement="SequenceFlow_1miyzfe">
-        <di:waypoint x="1245" y="363" />
-        <di:waypoint x="1312" y="363" />
+        <di:waypoint xsi:type="dc:Point" x="1245" y="363" />
+        <di:waypoint xsi:type="dc:Point" x="1312" y="363" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1233.5" y="343" width="90" height="10" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="MessageFlow_1py54jr_di" bpmnElement="MessageFlow_1py54jr">
-        <di:waypoint x="1195" y="403" />
-        <di:waypoint x="1195" y="523" />
+        <di:waypoint xsi:type="dc:Point" x="1195" y="403" />
+        <di:waypoint xsi:type="dc:Point" x="1195" y="523" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1165" y="458" width="90" height="10" />
         </bpmndi:BPMNLabel>
         <dc:Bounds x="1145" y="323" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0967g8p_di" bpmnElement="SequenceFlow_0967g8p">
-        <di:waypoint x="148" y="207" />
-        <di:waypoint x="219" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="148" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="219" y="207" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="183.5" y="187" width="0" height="10" />
         </bpmndi:BPMNLabel>
           <dc:Bounds x="672" y="242" width="77" height="14" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0o6zhjk_di" bpmnElement="SequenceFlow_0o6zhjk">
+        <di:waypoint xsi:type="dc:Point" x="1295" y="207" />
+        <di:waypoint xsi:type="dc:Point" x="1364" y="207" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1329.5" y="186" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ServiceTask_0xn3ug6_di" bpmnElement="CreateRelationId">
+        <dc:Bounds x="1195" y="167" width="100" height="80" />
+      </bpmndi:BPMNShape>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
 </bpmn:definitions>