diff --git a/src/main/java/net/geant/nmaas/orchestration/entities/AppDeploymentState.java b/src/main/java/net/geant/nmaas/orchestration/entities/AppDeploymentState.java index c2e1582545c79b3cc0530b5741f841a806405754..b35e07d6321a576a04040fb6928e7bd8cd4c0c96 100644 --- a/src/main/java/net/geant/nmaas/orchestration/entities/AppDeploymentState.java +++ b/src/main/java/net/geant/nmaas/orchestration/entities/AppDeploymentState.java @@ -412,10 +412,15 @@ public enum AppDeploymentState { @Override public AppDeploymentState nextState(NmServiceDeploymentState state) { - if (NmServiceDeploymentState.CONFIGURATION_REMOVAL_INITIATED.equals(state)) { - return APPLICATION_CONFIGURATION_REMOVAL_IN_PROGRESS; + switch (state) { + case DEPLOYMENT_FAILED: + return APPLICATION_DEPLOYMENT_FAILED; + case CONFIGURATION_REMOVAL_INITIATED: + return APPLICATION_CONFIGURATION_REMOVAL_IN_PROGRESS; + default: + return nextStateForNotMatchingNmServiceDeploymentState(this, state); } - return nextStateForNotMatchingNmServiceDeploymentState(this, state); + } @Override