From 5ca364a5e975877244ee51796602043a4b078a23 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Fri, 26 Oct 2018 09:54:46 -0400 Subject: Make homingBB optinal and fix homing process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Properly defined whether or not to call homing at AssignVnfBB where by default homing doesn't get called, but if a homing solution is provided, then we resolve the solutions. The goal is to change the BPMN definition to use serviceTask rather than a scriptTask, allowing to use the Srping component to inject logic. Also we create a new HomingV2 component that is agnostic of the homing implementation, which goal is to route the homing request to the proper bbackend implementation; e.g. oof vs homing. Finally, we remove the un-needed variables set in the execution context. Change-Id: Ic9fb2a599c6375617c92a6d3462b62921ee47a6f Issue-ID: SO-1168 Signed-off-by: Alexis de Talhouët --- .../subprocess/BuildingBlock/AssignVnfBB.bpmn | 12 +- .../subprocess/BuildingBlock/HomingBB.bpmn | 124 +++++++++------------ 2 files changed, 61 insertions(+), 75 deletions(-) (limited to 'bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock') diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn index 3355e627c3..9118b0ab5e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -28,9 +28,11 @@ - + + + - + @@ -65,7 +67,7 @@ - + SequenceFlow_1nle8kc SequenceFlow_11jum90 SequenceFlow_1uiok7v @@ -218,7 +220,7 @@ - + @@ -229,4 +231,4 @@ - + \ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn index 344b7d8761..f775c96db0 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn @@ -1,22 +1,10 @@ - + SequenceFlow_1x9usa6 - - SequenceFlow_1x9usa6 - SequenceFlow_0lc15i7 - import org.onap.so.bpmn.common.scripts.* -if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")).getVariable("homingService") == "oof"){ - OofHoming oofHoming = new OofHoming() - oofHoming.callOof(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) -}else{ - SniroHomingV2 sniroHoming = new SniroHomingV2() - SniroHoming.callSniro(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) -} - - + SequenceFlow_1rf4vs8 @@ -29,9 +17,9 @@ if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecu SequenceFlow_00nlh7l SequenceFlow_1rf4vs8 - import org.onap.so.bpmn.common.scripts.* + +ex.processSubflowsBPMNException(execution)]]> @@ -40,9 +28,9 @@ ex.processSubflowsBPMNException(execution) SequenceFlow_0kamg53 SequenceFlow_1o7154s - import org.onap.so.bpmn.common.scripts.* + +ex.processJavaException(execution)]]> SequenceFlow_0kamg53 @@ -55,18 +43,6 @@ ex.processJavaException(execution) - - SequenceFlow_1fipbmk - SequenceFlow_01apjvo - import org.onap.so.bpmn.common.scripts.* -if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")).getVariable("homingService") == "oof"){ - OofHoming oofHoming = new OofHoming() - oofHoming.processHomingSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) -}else{ - SniroHomingV2 sniroHoming = new SniroHomingV2 () - sniroHoming.processSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), asyncResponse) -} - @@ -76,32 +52,37 @@ if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecu - SequenceFlow_0lc15i7 + SequenceFlow_1a2sya6 SequenceFlow_1fipbmk - - + - SequenceFlow_01apjvo + SequenceFlow_1yfelf5 - + + SequenceFlow_1x9usa6 + SequenceFlow_1a2sya6 + + + + SequenceFlow_1fipbmk + SequenceFlow_1yfelf5 + + - + - - - - - + + - + @@ -141,53 +122,43 @@ if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecu - - + + - - - - + + + + - - + + - - + + - - - - - - - - - - - - + + - + @@ -196,13 +167,26 @@ if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecu - - - + + + + + + + + + + + + + + + + - + - + \ No newline at end of file -- cgit 1.2.3-korg