BB workflow with post instantiation is not working

The new BB AbstractCDSProcessingBB was not using the
InjectExecution.execute causing which seemed to be
de-serialization issue.

Issue-ID: SO-2797
Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca>
Change-Id: I323deee87d9cfd58d34a6edeca84843b7c87d0bf
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn
index 4fcf13d..ccd6b0b 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn
@@ -10,11 +10,11 @@
     <bpmn:endEvent id="EndEvent_1h3epjc">
       <bpmn:incoming>SequenceFlow_161g9uz</bpmn:incoming>
     </bpmn:endEvent>
-    <bpmn:serviceTask id="Task_06n9c9v" name="Get Required data to call CDS Client" camunda:expression="${AbstractCDSProcessingBBUtils.constructExecutionServiceInputObject(execution)}">
+    <bpmn:serviceTask id="Task_06n9c9v" name="Get Required data to call CDS Client" camunda:expression="${AbstractCDSProcessingBBUtils.constructExecutionServiceInputObject(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
       <bpmn:incoming>SequenceFlow_02v5z4h</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0gksy4i</bpmn:outgoing>
     </bpmn:serviceTask>
-    <bpmn:serviceTask id="Task_0kjfr5o" name="CDS&#10;(Call SelfServiceAPI)&#10;" camunda:expression="${AbstractCDSProcessingBBUtils.sendRequestToCDSClient(execution)}">
+    <bpmn:serviceTask id="Task_0kjfr5o" name="CDS&#10;(Call SelfServiceAPI)&#10;" camunda:expression="${AbstractCDSProcessingBBUtils.sendRequestToCDSClient(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
       <bpmn:incoming>SequenceFlow_0gksy4i</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_161g9uz</bpmn:outgoing>
     </bpmn:serviceTask>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn
index 88e5ead..ba94fb3 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.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_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+<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_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.1">
   <bpmn:process id="ConfigAssignVnfBB" name="ConfigAssignVnfBB" isExecutable="true">
     <bpmn:startEvent id="StartEvent_1">
       <bpmn:outgoing>SequenceFlow_0gmfit3</bpmn:outgoing>
@@ -14,6 +14,7 @@
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:out source="ControllerStatus" target="ControllerStatus" />
         <camunda:in source="executionObject" target="executionObject" />
+        <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
       </bpmn:extensionElements>
       <bpmn:incoming>SequenceFlow_05qembo</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0cvsnuu</bpmn:outgoing>
@@ -34,7 +35,7 @@
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_0cvsnuu" sourceRef="CallActivity_1gfzi2g" targetRef="ExclusiveGateway_13q340y" />
     <bpmn:sequenceFlow id="SequenceFlow_07tqu82" name="success" sourceRef="ExclusiveGateway_13q340y" targetRef="Task_1hs1mn0">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("ControllerStatus").equals("Success")}]]></bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("ControllerStatus").equals("Success")}</bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:endEvent id="EndEvent_0mnaj50">
       <bpmn:incoming>SequenceFlow_15gxql1</bpmn:incoming>
@@ -49,15 +50,15 @@
         <dc:Bounds x="507" y="187" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0gmfit3_di" bpmnElement="SequenceFlow_0gmfit3">
-        <di:waypoint xsi:type="dc:Point" x="543" y="205" />
-        <di:waypoint xsi:type="dc:Point" x="614" y="205" />
+        <di:waypoint x="543" y="205" />
+        <di:waypoint x="614" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="EndEvent_0lgvk82_di" bpmnElement="EndEvent_0lgvk82">
         <dc:Bounds x="1307" y="187" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1mkhog2_di" bpmnElement="SequenceFlow_1mkhog2">
-        <di:waypoint xsi:type="dc:Point" x="1218" y="205" />
-        <di:waypoint xsi:type="dc:Point" x="1307" y="205" />
+        <di:waypoint x="1218" y="205" />
+        <di:waypoint x="1307" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="CallActivity_1gfzi2g_di" bpmnElement="CallActivity_1gfzi2g">
         <dc:Bounds x="788" y="165" width="100" height="80" />
@@ -66,8 +67,8 @@
         <dc:Bounds x="1118" y="165" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_05qembo_di" bpmnElement="SequenceFlow_05qembo">
-        <di:waypoint xsi:type="dc:Point" x="714" y="205" />
-        <di:waypoint xsi:type="dc:Point" x="788" y="205" />
+        <di:waypoint x="714" y="205" />
+        <di:waypoint x="788" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ServiceTask_01mv1si_di" bpmnElement="Task_0bhf6tp">
         <dc:Bounds x="614" y="165" width="100" height="80" />
@@ -76,12 +77,12 @@
         <dc:Bounds x="978" y="180" width="50" height="50" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0cvsnuu_di" bpmnElement="SequenceFlow_0cvsnuu">
-        <di:waypoint xsi:type="dc:Point" x="888" y="205" />
-        <di:waypoint xsi:type="dc:Point" x="978" y="205" />
+        <di:waypoint x="888" y="205" />
+        <di:waypoint x="978" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_07tqu82_di" bpmnElement="SequenceFlow_07tqu82">
-        <di:waypoint xsi:type="dc:Point" x="1028" y="205" />
-        <di:waypoint xsi:type="dc:Point" x="1118" y="205" />
+        <di:waypoint x="1028" y="205" />
+        <di:waypoint x="1118" y="205" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1053" y="187" width="41" height="14" />
         </bpmndi:BPMNLabel>
@@ -90,8 +91,8 @@
         <dc:Bounds x="985" y="327" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_15gxql1_di" bpmnElement="SequenceFlow_15gxql1">
-        <di:waypoint xsi:type="dc:Point" x="1003" y="230" />
-        <di:waypoint xsi:type="dc:Point" x="1003" y="327" />
+        <di:waypoint x="1003" y="230" />
+        <di:waypoint x="1003" y="327" />
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn
index 3993eca..05fdb03 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.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_1556kf5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
+<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_1556kf5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.1">
   <bpmn:process id="ConfigDeployVnfBB" name="ConfigDeployVnfBB" isExecutable="true">
     <bpmn:startEvent id="Start" name="Start">
       <bpmn:outgoing>SequenceFlow_0pd4jka</bpmn:outgoing>
@@ -19,6 +19,7 @@
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:in source="executionObject" target="executionObject" />
         <camunda:out source="ControllerStatus" target="ControllerStatus" />
+        <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
       </bpmn:extensionElements>
       <bpmn:incoming>SequenceFlow_0kruy8t</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_03xbj4e</bpmn:outgoing>