X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=rapp-manager-models%2Fsrc%2Fmain%2Fjava%2Fcom%2Foransc%2Frappmanager%2Fmodels%2Fstatemachine%2FRappInstanceStateMachineConfig.java;h=34c9a92b282c4dbc084186901a8d7364ee46736b;hb=40a82302ff06348e446a2de3c4a552b1ee9bc61b;hp=e1bc784648700ba2c26369614f64e1bd4649eafe;hpb=cc9f90ef6d725e90cf477ef6b83ec5a2948127b3;p=nonrtric%2Fplt%2Frappmanager.git diff --git a/rapp-manager-models/src/main/java/com/oransc/rappmanager/models/statemachine/RappInstanceStateMachineConfig.java b/rapp-manager-models/src/main/java/com/oransc/rappmanager/models/statemachine/RappInstanceStateMachineConfig.java index e1bc784..34c9a92 100755 --- a/rapp-manager-models/src/main/java/com/oransc/rappmanager/models/statemachine/RappInstanceStateMachineConfig.java +++ b/rapp-manager-models/src/main/java/com/oransc/rappmanager/models/statemachine/RappInstanceStateMachineConfig.java @@ -57,12 +57,18 @@ public class RappInstanceStateMachineConfig extends EnumStateMachineConfigurerAd .withExternal() .source(RappInstanceState.DEPLOYING).target(RappInstanceState.UNDEPLOYED).event(RappEvent.SMEDEPLOYFAILED) .and() + .withExternal() + .source(RappInstanceState.DEPLOYING).target(RappInstanceState.UNDEPLOYED).event(RappEvent.DMEDEPLOYFAILED) + .and() .withExternal() .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.DEPLOYED).event(RappEvent.ACMUNDEPLOYFAILED) .and() .withExternal() .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.DEPLOYED).event(RappEvent.SMEUNDEPLOYFAILED) .and() + .withExternal() + .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.DEPLOYED).event(RappEvent.DMEUNDEPLOYFAILED) + .and() .withExternal() .source(RappInstanceState.DEPLOYED).target(RappInstanceState.UNDEPLOYING).event(RappEvent.UNDEPLOYING) .and() @@ -74,12 +80,20 @@ public class RappInstanceStateMachineConfig extends EnumStateMachineConfigurerAd .source(RappInstanceState.DEPLOYING).target(RappInstanceState.DEPLOYED).event(RappEvent.SMEDEPLOYED) .guard(deployedGuard()) .and() + .withExternal() + .source(RappInstanceState.DEPLOYING).target(RappInstanceState.DEPLOYED).event(RappEvent.DMEDEPLOYED) + .guard(deployedGuard()) + .and() .withExternal() .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.UNDEPLOYED).event(RappEvent.ACMUNDEPLOYED) .guard(undeployedGuard()) .and() .withExternal() .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.UNDEPLOYED).event(RappEvent.SMEUNDEPLOYED) + .guard(undeployedGuard()) + .and() + .withExternal() + .source(RappInstanceState.UNDEPLOYING).target(RappInstanceState.UNDEPLOYED).event(RappEvent.DMEUNDEPLOYED) .guard(undeployedGuard()); } @@ -90,7 +104,8 @@ public class RappInstanceStateMachineConfig extends EnumStateMachineConfigurerAd return stateContext -> { stateContext.getExtendedState().getVariables().put(stateContext.getEvent(), true); return stateContext.getExtendedState().getVariables().get(RappEvent.ACMDEPLOYED) != null - && stateContext.getExtendedState().getVariables().get(RappEvent.SMEDEPLOYED) != null; + && stateContext.getExtendedState().getVariables().get(RappEvent.SMEDEPLOYED) != null + && stateContext.getExtendedState().getVariables().get(RappEvent.DMEDEPLOYED) != null; }; } @@ -99,7 +114,8 @@ public class RappInstanceStateMachineConfig extends EnumStateMachineConfigurerAd return stateContext -> { stateContext.getExtendedState().getVariables().put(stateContext.getEvent(), true); return stateContext.getExtendedState().getVariables().get(RappEvent.ACMUNDEPLOYED) != null - && stateContext.getExtendedState().getVariables().get(RappEvent.SMEUNDEPLOYED) != null; + && stateContext.getExtendedState().getVariables().get(RappEvent.SMEUNDEPLOYED) != null + && stateContext.getExtendedState().getVariables().get(RappEvent.DMEUNDEPLOYED) != null; }; } }