summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/composition/CompositionView.js11
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/descriptors/camunda.json5
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutput.js31
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js13
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js12
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js15
-rw-r--r--workflow-designer-ui/src/main/frontend/src/i18n/languages.json6
-rw-r--r--workflow-designer-ui/src/main/frontend/webpack.config.js10
8 files changed, 50 insertions, 53 deletions
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 012ee769..d5b06d3e 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 @@ class CompositionView extends Component {
inputOutput: PropTypes.object,
activities: PropTypes.array
};
+
constructor() {
super();
this.generatedId = 'bpmn-container' + Date.now();
@@ -45,7 +46,7 @@ class CompositionView extends Component {
}
componentDidMount() {
- const { composition } = this.props;
+ const { composition, activities } = this.props;
this.modeler = new CustomModeler({
propertiesPanel: {
@@ -59,7 +60,7 @@ class CompositionView extends Component {
camunda: camundaModuleDescriptor
},
workflow: {
- activities: this.props.activities,
+ activities: activities,
onChange: this.onActivityChanged
}
});
@@ -68,6 +69,12 @@ class CompositionView extends Component {
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 80e876aa..b671c432 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 555b4af7..2adf7f7b 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 elementHelper = require('bpmn-js-properties-panel/lib/helper/ElementHelper')
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 @@ module.exports = function(element, bpmnFactory, options, translate) {
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 @@ module.exports = function(element, bpmnFactory, options, translate) {
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 e2943517..13bc50aa 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 ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
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 @@ InputOutputHelper.areOutputParametersSupported = function(
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 da949dd9..628874fc 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 @@ var entryFactory = require('bpmn-js-properties-panel/lib/factory/EntryFactory'),
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 @@ module.exports = function(element, bpmnFactory, options, translate) {
return !isSelected(element, node);
},
disabled: function(element) {
- return isElementDisabled(element);
+ return !inputOutputHelper.isCreateDeleteSupported(element);
}
})
);
@@ -189,7 +181,7 @@ module.exports = function(element, bpmnFactory, options, translate) {
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 7ae5e1eb..c8fdaaf0 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 @@ function* watchUpdateVersion(action) {
}
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* watchUpdateVersion(action) {
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 ea994526..36546452 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 fa4e5d83..7e7b02bc 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 @@ module.exports = (env, argv) => {
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',