version data not saved when empty artifact

Issue-ID: SDC-2035
Change-Id: Ibee4d133ca29a5499f6abf90ff665915d4c1d496
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js
index a476b41..cf391f3 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js
@@ -101,11 +101,17 @@
             params: { composition, ...versionData }
         } = action.payload;
         const isArtifactValid = validateCurrentArtifact(composition);
+        yield call(versionApi.updateVersion, {
+            workflowId,
+            params: versionData
+        });
+        yield put(
+            notificationActions.showSuccess({
+                title: I18n.t('workflow.confirmationMessages.updateTitle'),
+                message: I18n.t('workflow.confirmationMessages.updateMessage')
+            })
+        );
         if (isArtifactValid) {
-            yield call(versionApi.updateVersion, {
-                workflowId,
-                params: versionData
-            });
             yield call(versionApi.updateVersionArtifact, {
                 workflowId,
                 workflowName,
@@ -113,14 +119,6 @@
                 versionId: versionData.id,
                 payload: composition
             });
-            yield put(
-                notificationActions.showSuccess({
-                    title: I18n.t('workflow.confirmationMessages.updateTitle'),
-                    message: I18n.t(
-                        'workflow.confirmationMessages.updateMessage'
-                    )
-                })
-            );
         } else {
             yield call(versionApi.deleteVersionArtifact, {
                 workflowId,