diff --git a/public/static/flowable-modeler/editor-app/configuration/toolbar-default-actions.js b/public/static/flowable-modeler/editor-app/configuration/toolbar-default-actions.js
index ab60e3a..a50419e 100644
--- a/public/static/flowable-modeler/editor-app/configuration/toolbar-default-actions.js
+++ b/public/static/flowable-modeler/editor-app/configuration/toolbar-default-actions.js
@@ -411,6 +411,11 @@ angular.module('flowableModeler').controller('SaveModelCtrl', [ '$rootScope', '$
url: FLOWABLE.URL.putModel(modelMetaData.modelId)})
.success(function (data, status, headers, config) {
+ if(data.code === 500){
+ alert(data.msg)
+ $scope.status.loading = false;
+ return false
+ }
editorManager.handleEvents({
type: ORYX.CONFIG.EVENT_SAVED
});
diff --git a/public/static/flowable-modeler/editor-app/configuration/url-config.js b/public/static/flowable-modeler/editor-app/configuration/url-config.js
index 4f897cc..67cf208 100644
--- a/public/static/flowable-modeler/editor-app/configuration/url-config.js
+++ b/public/static/flowable-modeler/editor-app/configuration/url-config.js
@@ -15,27 +15,27 @@ var FLOWABLE = FLOWABLE || {};
FLOWABLE.URL = {
getModel: function(modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now();
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
},
getStencilSet: function() {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now();
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
},
getCmmnStencilSet: function() {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now();
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
},
getDmnStencilSet: function() {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now();
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
},
putModel: function(modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json';
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json'+'?Authorization=Bearer '+window.parent.this.token;
},
validateModel: function(){
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate';
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate'+'?Authorization=Bearer '+window.parent.this.token;
}
};
\ No newline at end of file
diff --git a/public/static/flowable-modeler/scripts/app-cfg.js b/public/static/flowable-modeler/scripts/app-cfg.js
index ae693d2..7dd32ef 100644
--- a/public/static/flowable-modeler/scripts/app-cfg.js
+++ b/public/static/flowable-modeler/scripts/app-cfg.js
@@ -16,13 +16,13 @@
'use strict';
var FLOWABLE = FLOWABLE || {};
-
var pathname = window.location.pathname.replace(/^(\/[^\/]*)(\/.*)?modeler\/?$/, '$1').replace(/\/$/, '');
+const baseURL = window.parent.this.apiUrl;
FLOWABLE.CONFIG = {
'onPremise' : true,
- 'contextRoot' : 'http://127.0.0.1:8080/workflow/model',
- 'contextModelerRestRoot' : 'http://127.0.0.1:8080/workflow/model',
- 'webContextRoot' : 'http://127.0.0.1:8080/workflow/model',
+ 'contextRoot' : baseURL+'/workflow/model',
+ 'contextModelerRestRoot' : baseURL+'/workflow/model',
+ 'webContextRoot' : baseURL+'/workflow/model',
'datesLocalization' : false
};
diff --git a/public/static/flowable-modeler/scripts/configuration/url-config.js b/public/static/flowable-modeler/scripts/configuration/url-config.js
index 88177f9..c06a11d 100644
--- a/public/static/flowable-modeler/scripts/configuration/url-config.js
+++ b/public/static/flowable-modeler/scripts/configuration/url-config.js
@@ -21,7 +21,7 @@ FLOWABLE.APP_URL = {
/* ACCOUNT URLS */
getAccountUrl: function () {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account';
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account?Authorization=Bearer '+window.parent.this.token;
},
getLogoutUrl: function () {
@@ -35,19 +35,19 @@ FLOWABLE.APP_URL = {
},
getModelUrl: function (modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId;
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId+'?Authorization=Bearer '+window.parent.this.token;
},
getModelModelJsonUrl: function (modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json';
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json?Authorization=Bearer '+window.parent.this.token;
},
getModelBpmn20ExportUrl: function (modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now();
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
},
getCloneModelsUrl: function (modelId) {
- return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone';
+ return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone'+'?Authorization=Bearer '+window.parent.this.token;
},
getModelHistoriesUrl: function (modelId) {
diff --git a/src/views/workflow/model/design.vue b/src/views/workflow/model/design.vue
index ba0c66d..0400b21 100644
--- a/src/views/workflow/model/design.vue
+++ b/src/views/workflow/model/design.vue
@@ -7,7 +7,9 @@
-
-