property to determine if delete audit is needed 77/89077/1
authorKalkere Ramesh, Sharan <sharan.kalkere.ramesh@att.com>
Fri, 31 May 2019 20:02:40 +0000 (16:02 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Fri, 31 May 2019 20:02:52 +0000 (16:02 -0400)
update the onap delete vf module BB bpmn as well
validate formatting of audit tasks code changes
added a property to determine if delete audit is needed

Change-Id: Id29eed6295ed6623636a4812708e53c5ae440b83
Issue-ID: SO-1964
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/audit/AuditTasks.java

index b774c05..33335ab 100644 (file)
@@ -82,7 +82,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_0qfmmgt" sourceRef="Audit_Inventory" targetRef="auditSuccessfulCheck" />
     <bpmn:sequenceFlow id="SequenceFlow_14bu4ys" sourceRef="ExclusiveGateway_1yvh16a" targetRef="aaiThrow" />
     <bpmn:sequenceFlow id="SequenceFlow_1mgunf3" name="No" sourceRef="ExclusiveGateway_1h2ystu" targetRef="ExclusiveGateway_1pydilb" />
-    <bpmn:serviceTask id="Check_Audit" name="Check Audit Variable" camunda:expression="${AuditTasks.isAuditNeeded(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+    <bpmn:serviceTask id="Check_Audit" name="Check Audit Variable" camunda:expression="${AuditTasks.isDeleteAuditNeeded(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
       <bpmn:incoming>SequenceFlow_1v3jgqe</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1odt2wt</bpmn:outgoing>
     </bpmn:serviceTask>
index a223259..62878fd 100644 (file)
@@ -60,6 +60,16 @@ public class AuditTasks {
         }
     }
 
+    public void isDeleteAuditNeeded(BuildingBlockExecution execution) {
+        try {
+            logger.debug("deleteAuditInventoryNeeded Value: {}", env.getProperty("mso.infra.deleteAuditInventory"));
+            execution.setVariable("auditInventoryNeeded",
+                    Boolean.parseBoolean(env.getProperty("mso.infra.deleteAuditInventory")));
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+    }
+
     public void setupAuditVariable(BuildingBlockExecution execution) {
         try {
             execution.setVariable("auditInventory", createAuditInventory(execution));