Merge "Add scrollbars to Input/Output table"
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/CompositionView.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/CompositionView.js
index 012ee76..d5b06d3 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/CompositionView.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/CompositionView.js
@@ -34,6 +34,7 @@
         inputOutput: PropTypes.object,
         activities: PropTypes.array
     };
+
     constructor() {
         super();
         this.generatedId = 'bpmn-container' + Date.now();
@@ -45,7 +46,7 @@
     }
 
     componentDidMount() {
-        const { composition } = this.props;
+        const { composition, activities } = this.props;
 
         this.modeler = new CustomModeler({
             propertiesPanel: {
@@ -59,7 +60,7 @@
                 camunda: camundaModuleDescriptor
             },
             workflow: {
-                activities: this.props.activities,
+                activities: activities,
                 onChange: this.onActivityChanged
             }
         });
@@ -68,6 +69,12 @@
         this.setDiagramToBPMN(composition ? composition : newDiagramXML);
         this.modeler.on('element.out', () => this.exportDiagramToStore());
     }
+
+    componentDidUpdate(prevProps) {
+        if (prevProps.composition !== this.props.composition) {
+            this.setDiagramToBPMN(this.props.composition);
+        }
+    }
     onActivityChanged = async (bo, selectedValue) => {
         const selectedActivity = this.props.activities.find(
             el => el.name === selectedValue
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/descriptors/camunda.json b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/descriptors/camunda.json
index 80e876a..b671c43 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/descriptors/camunda.json
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/descriptors/camunda.json
@@ -360,11 +360,6 @@
           "type": "String"
         },
         {
-          "name": "workflowActivity",
-          "isAttr": true,
-          "type": "String"
-        },
-        {
           "name": "delegateExpression",
           "isAttr": true,
           "type": "String"
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutput.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutput.js
index 555b4af..2adf7f7 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutput.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutput.js
@@ -1,8 +1,4 @@
 'use strict';
-import {
-    IMPLEMENTATION_TYPE_VALUE,
-    implementationType
-} from './implementationConstants';
 var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;
 
 var elementHelper = require('bpmn-js-properties-panel/lib/helper/ElementHelper'),
@@ -12,15 +8,6 @@
 
 var extensionElementsEntry = require('bpmn-js-properties-panel/lib/provider/camunda/parts/implementation//ExtensionElements');
 
-function isCreateDeleteSupported(element) {
-    const bo = getBusinessObject(element);
-    return (
-        (element.type !== 'bpmn:ServiceTask' ||
-            bo[implementationType.ACTIVITY] !== IMPLEMENTATION_TYPE_VALUE) &&
-        element.type !== 'bpmn:Process'
-    );
-}
-
 function getInputOutput(element, insideConnector) {
     return inputOutputHelper.getInputOutput(element, insideConnector);
 }
@@ -236,10 +223,14 @@
         prefix: 'Input',
         resizable: true,
 
-        createExtensionElement: isCreateDeleteSupported(element)
+        createExtensionElement: inputOutputHelper.isCreateDeleteSupported(
+            element
+        )
             ? newElement('camunda:InputParameter', 'inputParameters')
             : undefined,
-        removeExtensionElement: isCreateDeleteSupported(element)
+        removeExtensionElement: inputOutputHelper.isCreateDeleteSupported(
+            element
+        )
             ? removeElement(
                   getInputParameter,
                   'inputParameters',
@@ -269,16 +260,20 @@
             prefix: 'Output',
             resizable: true,
 
-            createExtensionElement: isCreateDeleteSupported(element)
+            createExtensionElement: inputOutputHelper.isCreateDeleteSupported(
+                element
+            )
                 ? newElement('camunda:OutputParameter', 'outputParameters')
                 : undefined,
-            removeExtensionElement: isCreateDeleteSupported(element)
+            removeExtensionElement: inputOutputHelper.isCreateDeleteSupported(
+                element
+            )
                 ? removeElement(
                       getOutputParameter,
                       'outputParameters',
                       'inputParameters'
                   )
-                : isCreateDeleteSupported(element),
+                : inputOutputHelper.isCreateDeleteSupported(element),
 
             getExtensionElements: function(element) {
                 return getOutputParameters(element, insideConnector);
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js
index e294351..13bc50a 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js
@@ -6,6 +6,10 @@
 
 var extensionElementsHelper = require('bpmn-js-properties-panel/lib/helper/ExtensionElementsHelper'),
     implementationTypeHelper = require('bpmn-js-properties-panel/lib/helper/ImplementationTypeHelper');
+import {
+    IMPLEMENTATION_TYPE_VALUE,
+    implementationType
+} from './implementationConstants';
 
 var InputOutputHelper = {};
 
@@ -151,3 +155,12 @@
         insideConnector || (!is(bo, 'bpmn:EndEvent') && !bo.loopCharacteristics)
     );
 };
+
+InputOutputHelper.isCreateDeleteSupported = function(element) {
+    const bo = getBusinessObject(element);
+    return (
+        (element.type !== 'bpmn:ServiceTask' ||
+            bo[implementationType.ACTIVITY] !== IMPLEMENTATION_TYPE_VALUE) &&
+        element.type !== 'bpmn:Process'
+    );
+};
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js
index da949dd..628874f 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js
@@ -14,14 +14,6 @@
         true
     );
 
-function isElementDisabled(element) {
-    return (
-        (element.type === 'bpmn:ServiceTask' &&
-            element.businessObject.workflowActivity) ||
-        element.type === 'bpmn:Process'
-    );
-}
-
 function createElement(type, parent, factory, properties) {
     return elementHelper.createElement(type, properties, parent, factory);
 }
@@ -115,7 +107,7 @@
                 return !isSelected(element, node);
             },
             disabled: function(element) {
-                return isElementDisabled(element);
+                return !inputOutputHelper.isCreateDeleteSupported(element);
             }
         })
     );
@@ -189,7 +181,7 @@
                 return isSelected(element, node);
             },
             disabled: function(element) {
-                return isElementDisabled(element);
+                return !inputOutputHelper.isCreateDeleteSupported(element);
             }
         })
     );
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 7ae5e1e..c8fdaaf 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
@@ -14,6 +14,7 @@
 * limitations under the License.
 */
 import { all, call, put, takeEvery, takeLatest } from 'redux-saga/effects';
+import { I18n } from 'react-redux-i18n';
 
 import { genericNetworkErrorAction } from 'src/appConstants';
 import {
@@ -92,8 +93,8 @@
         }
         yield put(
             notificationActions.showSuccess({
-                title: 'Update Workflow Version',
-                message: 'Successfully updated'
+                title: I18n.t('workflow.confirmationMessages.updateTitle'),
+                message: I18n.t('workflow.confirmationMessages.updateMessage')
             })
         );
     } catch (error) {
@@ -103,18 +104,14 @@
 
 function* watchCertifyVersion(action) {
     try {
-        const { workflowId, params } = action.payload;
-        yield call(versionApi.updateVersion, {
-            workflowId,
-            params: params
-        });
+        yield call(watchUpdateVersion, action);
         yield call(versionApi.certifyVersion, {
             ...action.payload
         });
         yield put(
             notificationActions.showSuccess({
-                title: 'Certify Version',
-                message: 'Successfully updated'
+                title: I18n.t('workflow.confirmationMessages.certifyTitle'),
+                message: I18n.t('workflow.confirmationMessages.certifyMessage')
             })
         );
         yield put(versionStateChangedAction({ state: versionState.CERTIFIED }));
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 ea99452..3654645 100644
--- a/workflow-designer-ui/src/main/frontend/src/i18n/languages.json
+++ b/workflow-designer-ui/src/main/frontend/src/i18n/languages.json
@@ -71,6 +71,12 @@
                 "exportErrorMsg": "Could not export diagram",
                 "saveErrorMsg": "Could not save diagram",
                 "importErrorMsg": "Could not import diagram"
+            },
+            "confirmationMessages": {
+                "certifyTitle": "Certify Version",
+                "certifyMessage": "Successfully certified",
+                "updateTitle": "Update Workflow Version",
+                "updateMessage": "Successfully updated"
             }
         },
         "version": {
diff --git a/workflow-designer-ui/src/main/frontend/webpack.config.js b/workflow-designer-ui/src/main/frontend/webpack.config.js
index fa4e5d8..7e7b02b 100644
--- a/workflow-designer-ui/src/main/frontend/webpack.config.js
+++ b/workflow-designer-ui/src/main/frontend/webpack.config.js
@@ -48,15 +48,7 @@
                 services: path.resolve(__dirname, 'src/services'),
                 shared: path.resolve(__dirname, 'src/shared'),
                 config: path.resolve(__dirname, 'src/config')
-            },
-            plugins: [
-                new ModuleRedirectPlugin({
-                    intercept: /min-dom\/lib/,
-                    ignore: /\/bpmn-js-properties-panel/,
-                    redirect:
-                        'node_modules/bpmn-js-properties-panel/node_modules/min-dom/lib'
-                })
-            ]
+            }
         },
         output: {
             path: __dirname + '/dist',