summaryrefslogtreecommitdiffstats
path: root/workflow-designer-be/src/main
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2018-12-26 13:14:01 +0200
committerYarin Dekel <yarind@amdocs.com>2018-12-26 13:14:05 +0200
commitbd2841ad36ef57983f8669b470e661d46d309012 (patch)
tree01ef36edbdab7c80298db0382b4ca635127cfd8b /workflow-designer-be/src/main
parent11ed075eb955be52b1326692fe401dd8e743f4c2 (diff)
WF-validation to empty artifact
Issue-ID: SDC-2023 Change-Id: Idcc690cfad19da0d29232c93b202042f6230ffaf Signed-off-by: Yarin Dekel <yarind@amdocs.com>
Diffstat (limited to 'workflow-designer-be/src/main')
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
index 0078d226..33210778 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
@@ -232,9 +232,10 @@ public class WorkflowVersionManagerImpl implements WorkflowVersionManager {
workflowId, versionId);
throw new VersionModificationException(workflowId, versionId);
}
-
- artifactRepository.delete(workflowId, versionId);
- versioningManager.publish(workflowId, new Version(versionId), "Delete Artifact");
+ if(retrievedVersion.isHasArtifact()) {
+ artifactRepository.delete(workflowId, versionId);
+ versioningManager.publish(workflowId, new Version(versionId), "Delete Artifact");
+ }
}
private void validateVersionExistAndCertified(String workflowId, List<Version> versions, String versionId) {