WF- get workflow after restoring workflow

Issue-ID: SDC-1985
Change-Id: I22a9806c1bae86e6a27c2ddbf372b36a9bd278e8
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js
index f2b4cf1..89684d4 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js
@@ -19,6 +19,7 @@
 import overviewApi from 'features/workflow/overview/overviewApi';
 import {
     versionListFetchAction,
+    getVersionsAction,
     GET_OVERVIEW,
     UPDATE_WORKFLOW,
     ARCHIVE_WORKFLOW,
@@ -29,11 +30,11 @@
 import { fetchWorkflow } from 'features/catalog/catalogActions';
 import { WORKFLOW_STATUS } from 'features/workflow/workflowConstants';
 
-export function* getOverview(action) {
+export function* getOverview({ payload }) {
     try {
-        const versions = yield call(overviewApi.getVersions, action.payload);
+        const versions = yield call(overviewApi.getVersions, payload);
         yield put(versionListFetchAction(versions));
-        const workflow = yield call(overviewApi.getWorkflow, action.payload);
+        const workflow = yield call(overviewApi.getWorkflow, payload);
         yield put(setWorkflowAction(workflow));
     } catch (error) {
         yield put(genericNetworkErrorAction(error));
@@ -56,7 +57,7 @@
 
 export function* archiveRestoreWorkflow(action) {
     try {
-        const { history, ...data } = action.payload;
+        const { ...data } = action.payload;
         yield call(overviewApi.archiveRestoreWorkflow, data);
         const {
             catalog: { sort },
@@ -70,15 +71,26 @@
                 status: WORKFLOW_STATUS.ACTIVE
             })
         );
-        history.push('/');
     } catch (e) {
         yield put(genericNetworkErrorAction(e));
     }
 }
 
+export function* restoreWorkflow(action) {
+    const { id } = action.payload;
+    yield archiveRestoreWorkflow(action);
+    yield put(getVersionsAction(id));
+}
+
+export function* archiveWorkflow(action) {
+    const { history } = action.payload;
+    yield archiveRestoreWorkflow(action);
+    history.push('/');
+}
+
 export function* watchOverview() {
     yield takeEvery(GET_OVERVIEW, getOverview);
     yield takeEvery(UPDATE_WORKFLOW, updateWorkflow);
-    yield takeEvery(ARCHIVE_WORKFLOW, archiveRestoreWorkflow);
-    yield takeEvery(RESTORE_WORKFLOW, archiveRestoreWorkflow);
+    yield takeEvery(ARCHIVE_WORKFLOW, archiveWorkflow);
+    yield takeEvery(RESTORE_WORKFLOW, restoreWorkflow);
 }
diff --git a/workflow-designer-ui/src/main/frontend/src/i18n/languages.json b/workflow-designer-ui/src/main/frontend/src/i18n/languages.json
index b4cff9c..c52a383 100644
--- a/workflow-designer-ui/src/main/frontend/src/i18n/languages.json
+++ b/workflow-designer-ui/src/main/frontend/src/i18n/languages.json
@@ -51,7 +51,7 @@
                 "backBtnLabel": "WORKFLOW CATALOG",
                 "archived": "Archived",
                 "archive": "ARCHIVE",
-                "confirmArchive": "Are you sure you want to delete \"%{name}\"?"
+                "confirmArchive": "Are you sure you want to archive \"%{name}\"?"
             },
             "inputOutput": {
                 "name": "Name",