diff --git a/openecomp-ui/src/sdc-app/flows/FlowsActions.js b/openecomp-ui/src/sdc-app/flows/FlowsActions.js
index 9fb65f3..4ad7dcf 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsActions.js
+++ b/openecomp-ui/src/sdc-app/flows/FlowsActions.js
@@ -1,22 +1,25 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import RestAPIUtil from 'nfvo-utils/RestAPIUtil.js';
 import Configuration from 'sdc-app/config/Configuration.js';
 import { actionTypes, enums } from './FlowsConstants.js';
 import SequenceDiagramModelHelper from './SequenceDiagramModelHelper.js';
+import { actionTypes as modalActionTypes } from 'nfvo-components/modal/GlobalModalConstants.js';
+import { modalContentMapper } from 'sdc-app/common/modal/ModalContentMapper.js';
+import i18n from 'nfvo-utils/i18n/i18n.js';
 
 function baseUrl(serviceId, artifactId = '') {
     const restCatalogPrefix = Configuration.get('restCatalogPrefix');
@@ -97,7 +100,7 @@
                 readonly
             });
             if (!readonly) {
-                FlowsActions.openFlowDetailsEditor(dispatch);
+                FlowsActions.openEditCreateWFModal(dispatch);
             }
         } else {
             Object.keys(artifacts).forEach(artifact =>
@@ -194,14 +197,6 @@
         );
     },
 
-    openFlowDetailsEditor(dispatch, flow) {
-        dispatch({ type: actionTypes.OPEN_FLOW_DETAILS_EDITOR, flow });
-    },
-
-    closeFlowDetailsEditor(dispatch) {
-        dispatch({ type: actionTypes.CLOSE_FLOW_DETAILS_EDITOR });
-    },
-
     openFlowDiagramEditor(dispatch, { flow }) {
         dispatch({ type: actionTypes.OPEN_FLOW_DIAGRAM_EDITOR, flow });
     },
@@ -212,6 +207,27 @@
 
     reset(dispatch) {
         dispatch({ type: actionTypes.RESET });
+    },
+    openEditCreateWFModal(dispatch, flow) {
+        dispatch({ type: actionTypes.OPEN_FLOW_DETAILS_EDITOR, flow });
+        dispatch({
+            type: modalActionTypes.GLOBAL_MODAL_SHOW,
+            data: {
+                modalComponentName: modalContentMapper.FLOWS_EDITOR,
+                modalComponentProps: {
+                    isNewArtifact: Boolean(flow && flow.uniqueId)
+                },
+                title: flow
+                    ? i18n('Edit Workflow')
+                    : i18n('Create New Workflow')
+            }
+        });
+    },
+    closeEditCreateWFModal(dispatch) {
+        dispatch({
+            type: modalActionTypes.GLOBAL_MODAL_CLOSE
+        });
+        dispatch({ type: actionTypes.CLOSE_FLOW_DETAILS_EDITOR });
     }
 });
 
diff --git a/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js b/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js
index b45a9fc..4ef12fa 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js
+++ b/openecomp-ui/src/sdc-app/flows/FlowsEditorModal.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import { connect } from 'react-redux';
 import FlowsEditorModalView from './FlowsEditorModalView.jsx';
@@ -50,10 +50,10 @@
 const mapActionsToProps = (dispatch, { isNewArtifact }) => {
     return {
         onSubmit: flow => {
-            FlowsActions.closeFlowDetailsEditor(dispatch);
+            FlowsActions.closeEditCreateWFModal(dispatch);
             FlowsActions.createOrUpdateFlow(dispatch, { flow }, isNewArtifact);
         },
-        onCancel: () => FlowsActions.closeFlowDetailsEditor(dispatch),
+        onCancel: () => FlowsActions.closeEditCreateWFModal(dispatch),
         onDataChanged: deltaData =>
             ValidationHelper.dataChanged(dispatch, {
                 deltaData,
diff --git a/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx b/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx
index 8c805cc..6ac316e 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx
+++ b/openecomp-ui/src/sdc-app/flows/FlowsEditorModalView.jsx
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import React, { Component } from 'react';
 import i18n from 'nfvo-utils/i18n/i18n.js';
@@ -38,7 +38,8 @@
                         onReset={onCancel}
                         formReady={formReady}
                         isValid={isFormValid}
-                        onValidateForm={() => onValidateForm()}>
+                        onValidateForm={() => onValidateForm()}
+                        btnClassName="sdc-modal__footer">
                         <Input
                             type="text"
                             name="name"
diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js b/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js
index 2718c19..c96415c 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js
+++ b/openecomp-ui/src/sdc-app/flows/FlowsListEditor.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import { connect } from 'react-redux';
 import FlowsActions from './FlowsActions.js';
@@ -20,8 +20,6 @@
 export const mapStateToProps = ({ flows }) => {
     let {
         flowList = [],
-        isDisplayModal,
-        isModalInEditMode,
         shouldShowWorkflowsEditor = true,
         data = undefined,
         readonly
@@ -33,9 +31,7 @@
 
     return {
         flowList,
-        isDisplayModal,
         isCheckedOut,
-        isModalInEditMode,
         shouldShowWorkflowsEditor,
         currentFlow: data,
         readonly
@@ -44,9 +40,9 @@
 
 const mapActionsToProps = dispatch => {
     return {
-        onAddWorkflowClick: () => FlowsActions.openFlowDetailsEditor(dispatch),
+        onAddWorkflowClick: () => FlowsActions.openEditCreateWFModal(dispatch),
         onEditFlowDetailsClick: flow =>
-            FlowsActions.openFlowDetailsEditor(dispatch, flow),
+            FlowsActions.openEditCreateWFModal(dispatch, flow),
         onEditFlowDiagramClick: flow =>
             FlowsActions.fetchArtifact(dispatch, { flow }),
         onDeleteFlowClick: flow => FlowsActions.deleteFlow(dispatch, { flow }),
diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx b/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx
index d1c0c9a..f0a4635 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx
+++ b/openecomp-ui/src/sdc-app/flows/FlowsListEditorView.jsx
@@ -1,34 +1,30 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import React, { Component } from 'react';
 import PropTypes from 'prop-types';
 import i18n from 'nfvo-utils/i18n/i18n.js';
-import Modal from 'nfvo-components/modal/Modal.jsx';
 
 import ListEditorView from 'nfvo-components/listEditor/ListEditorView.jsx';
 import ListEditorItemView from 'nfvo-components/listEditor/ListEditorItemView.jsx';
-import FlowsEditorModal from './FlowsEditorModal.js';
 import SequenceDiagram from './SequenceDiagram.jsx';
 
 class FlowsListEditorView extends Component {
     static propTypes = {
         flowList: PropTypes.array,
         currentFlow: PropTypes.object,
-        isDisplayModal: PropTypes.bool,
-        isModalInEditMode: PropTypes.bool,
         isCheckedOut: PropTypes.bool,
         shouldShowWorkflowsEditor: PropTypes.bool,
         readonly: PropTypes.bool,
@@ -57,7 +53,7 @@
     }
 
     renderWorkflowsEditor() {
-        let { isDisplayModal, onAddWorkflowClick, isCheckedOut } = this.props;
+        let { onAddWorkflowClick, isCheckedOut } = this.props;
         const { localFilter } = this.state;
 
         return (
@@ -72,35 +68,10 @@
                         this.renderWorkflowListItem(flow, isCheckedOut)
                     )}
                 </ListEditorView>
-
-                {isDisplayModal && this.renderWorkflowEditorModal()}
             </div>
         );
     }
 
-    renderWorkflowEditorModal() {
-        let { isDisplayModal, isModalInEditMode } = this.props;
-        return (
-            <Modal
-                show={isDisplayModal}
-                animation={true}
-                className="onborading-modal workflows-editor-modal">
-                <Modal.Header>
-                    <Modal.Title>
-                        {`${
-                            isModalInEditMode
-                                ? i18n('Edit Workflow')
-                                : i18n('Create New Workflow')
-                        }`}
-                    </Modal.Title>
-                </Modal.Header>
-                <Modal.Body>
-                    <FlowsEditorModal isNewArtifact={!isModalInEditMode} />
-                </Modal.Body>
-            </Modal>
-        );
-    }
-
     renderSequenceDiagramTool() {
         let {
             onSequenceDiagramSaveClick,
diff --git a/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js b/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js
index 0279824..56d389b 100644
--- a/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js
+++ b/openecomp-ui/src/sdc-app/flows/FlowsListReducer.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import { actionTypes, FLOWS_EDITOR_FORM } from './FlowsConstants.js';
 
@@ -71,17 +71,13 @@
                         validations: [{ type: 'required', data: true }]
                     }
                 },
-                data: action.flow,
-                isDisplayModal: true,
-                isModalInEditMode: Boolean(action.flow && action.flow.uniqueId)
+                data: action.flow
             };
 
         case actionTypes.CLOSE_FLOW_DETAILS_EDITOR:
             return {
                 ...state,
-                data: undefined,
-                isDisplayModal: false,
-                isModalInEditMode: false
+                data: undefined
             };
         case actionTypes.OPEN_FLOW_DIAGRAM_EDITOR:
             return {
