From bbf0f7d2362ed96766f54e3104619d5091c8bc62 Mon Sep 17 00:00:00 2001 From: delchev Date: Sat, 20 Jun 2026 23:38:30 +0300 Subject: [PATCH 1/2] test: drive the redesigned Process Inbox in the BPM ITs The Outlook-style inbox redesign (#6064/#6066/#6068) replaced the task table with a bk-list and embeds a claimed task's form in the detail pane, but the BPM test projects still clicked a "Process request" row and a non-existent "Open Form" tab - failing ApproveLeaveRequestBpmIT, DeclineLeaveRequestBpmIT and BpmnMultitenancyIT on master. Select the task via its bk-list link (ANCHOR) and drop the "Open Form" + switchToLatestTab steps; the claimed task's form now embeds in the detail pane, so the Approve/Decline click + native-alert assertion run against the embedded iframe (the fixture form still uses a native alert, unaffected by the non-modal-notification change to intent-generated forms). Verified locally: ApproveLeaveRequestBpmIT + BpmnMultitenancyIT green. Co-Authored-By: Claude Opus 4.8 --- .../tests/ui/tests/BPMLeaveRequestTestProject.java | 7 +++---- .../tests/ui/tests/BpmnMultitenancyTestProject.java | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMLeaveRequestTestProject.java b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMLeaveRequestTestProject.java index 6a3f7345ab1..1d31036acd7 100644 --- a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMLeaveRequestTestProject.java +++ b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BPMLeaveRequestTestProject.java @@ -141,12 +141,11 @@ private void claimRequest(IDE managerIDE) { managerIDE.openInbox(); Browser browser = managerIDE.getBrowser(); - browser.clickOnElementContainingText(HtmlElementType.TR, "Process request"); + // The redesigned inbox is an Outlook-style master-detail list: tasks are bk-list links (not + // table rows), and claiming embeds the task's form in the detail pane (no "Open Form" tab). + browser.clickOnElementContainingText(HtmlElementType.ANCHOR, "Process request"); browser.clickOnElementContainingText(HtmlElementType.BUTTON, "Claim"); - - browser.clickOnElementContainingText(HtmlElementType.BUTTON, "Open Form"); - browser.switchToLatestTab(); } private void assertLeaveRequestEmail() throws MessagingException { diff --git a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BpmnMultitenancyTestProject.java b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BpmnMultitenancyTestProject.java index dedffa4159b..7480ff7ad5b 100644 --- a/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BpmnMultitenancyTestProject.java +++ b/tests/tests-integrations/src/main/java/org/eclipse/dirigible/integration/tests/ui/tests/BpmnMultitenancyTestProject.java @@ -109,13 +109,12 @@ private void approveEmployeeRegistration(String tenantHost, String employeeManag ide.openInbox(); Browser browser = ide.getBrowser(); - browser.clickOnElementContainingText(HtmlElementType.TR, "Process request"); + // The redesigned inbox is an Outlook-style master-detail list: tasks are bk-list links (not + // table rows), and claiming embeds the task's form in the detail pane (no "Open Form" tab). + browser.clickOnElementContainingText(HtmlElementType.ANCHOR, "Process request"); browser.clickOnElementContainingText(HtmlElementType.BUTTON, "Claim"); - browser.clickOnElementContainingText(HtmlElementType.BUTTON, "Open Form"); - browser.switchToLatestTab(); - browser.clickOnElementContainingText(HtmlElementType.BUTTON, "Approve"); browser.assertAlertWithMessage("Request Approved"); From 969e4e90783c625ff935a27fe650cb2c69a9c943 Mon Sep 17 00:00:00 2001 From: delchev Date: Mon, 22 Jun 2026 15:35:44 +0300 Subject: [PATCH 2/2] feat(templates): surface a record's BPM user tasks as in-context actions Process-aware entities (those the intent trigger stamps with a ProcessId) now surface the current user's actionable user tasks directly on their generated entity views, removing the trip to the Process Inbox to correlate a task to its record by business key. - New shared ProcessTasks Angular module (resources-dashboard) holding the inbox fetch -> bucket-by-processInstanceId -> claim/open-form logic plus an directive; one self-contained piece reused everywhere. - parameterUtils.js sets hasProcess when an entity has a ProcessId property. - Wired (gated on hasProcess) into list, manage, master-list/detail, master-manage/detail and both main-details views, so it works regardless of master/detail layout. - FormIntentGenerator: the generated task form now closes its host on completion via DialogHub.closeWindow() + window.close() (dialog, inbox and standalone window); the prior window.close()-only call was a no-op inside iframes. Co-Authored-By: Claude Opus 4.8 --- .../generator/form/FormIntentGenerator.java | 8 +- .../dashboard/services/process-tasks.js | 137 ++++++++++++++++++ .../perspective/list/controller.js.template | 7 +- .../ui/perspective/list/index.html.template | 6 + .../perspective/manage/controller.js.template | 7 +- .../ui/perspective/manage/index.html.template | 6 + .../master-list/detail/controller.js.template | 7 +- .../master-list/detail/index.html.template | 6 + .../main-details/controller.js.template | 2 +- .../main-details/index.html.template | 12 ++ .../detail/controller.js.template | 7 +- .../master-manage/detail/index.html.template | 6 + .../main-details/controller.js.template | 2 +- .../main-details/index.html.template | 12 ++ .../template/parameterUtils.js | 4 + 15 files changed, 218 insertions(+), 11 deletions(-) create mode 100644 components/resources/resources-dashboard/src/main/resources/META-INF/dirigible/dashboard/services/process-tasks.js diff --git a/components/engine/engine-intent/src/main/java/org/eclipse/dirigible/components/intent/generator/form/FormIntentGenerator.java b/components/engine/engine-intent/src/main/java/org/eclipse/dirigible/components/intent/generator/form/FormIntentGenerator.java index 82d7fed1af4..117d1a16f84 100644 --- a/components/engine/engine-intent/src/main/java/org/eclipse/dirigible/components/intent/generator/form/FormIntentGenerator.java +++ b/components/engine/engine-intent/src/main/java/org/eclipse/dirigible/components/intent/generator/form/FormIntentGenerator.java @@ -61,7 +61,11 @@ * complete the current BPM user task: the Inbox/Process perspective opens the form with * {@code ?taskId=&processInstanceId=}, and the handler POSTs {@code COMPLETE} to * {@code /services/bpm/bpm-processes/tasks/} with the action name and the form model as - * process variables (so a downstream gateway can branch on the action). Forms opened outside a task + * process variables (so a downstream gateway can branch on the action). On success the handler + * closes its host via both {@code DialogHub.closeWindow()} and {@code window.close()} - the former + * closes the dialog when the form is opened from an entity view, the latter a standalone + * (script-opened) window; each is a harmless no-op where it does not apply, including the Inbox's + * inline iframe (which clears its own pane on its refresh cycle). Forms opened outside a task * report the missing {@code taskId} instead of failing silently. Business logic beyond completing * the task belongs in a hand-written form override under {@code custom/}. * @@ -146,6 +150,7 @@ private static String buildCode(FormIntent form) { const __taskParams = new URLSearchParams(window.location.search); const __taskId = __taskParams.get('taskId'); const __notifications = new NotificationHub(); + const __dialogs = new DialogHub(); function __completeTask(action) { if (!__taskId) { @@ -157,6 +162,7 @@ function __completeTask(action) { data: Object.assign({ action: action }, $scope.model || {}) }).then(() => { __notifications.show({ type: 'positive', title: 'Task submitted', description: 'The task was completed (' + action + ').' }); + __dialogs.closeWindow(); window.close(); }).catch((error) => { const message = error && error.data && error.data.message ? error.data.message : 'Unknown error'; diff --git a/components/resources/resources-dashboard/src/main/resources/META-INF/dirigible/dashboard/services/process-tasks.js b/components/resources/resources-dashboard/src/main/resources/META-INF/dirigible/dashboard/services/process-tasks.js new file mode 100644 index 00000000000..664705d81b0 --- /dev/null +++ b/components/resources/resources-dashboard/src/main/resources/META-INF/dirigible/dashboard/services/process-tasks.js @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2010-2026 Eclipse Dirigible contributors + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * SPDX-FileCopyrightText: Eclipse Dirigible contributors + * SPDX-License-Identifier: EPL-2.0 + */ +/** + * Shared support for surfacing a record's BPM user tasks as in-context actions on generated entity + * views. A process-aware entity carries a system-managed ProcessId (the started process-instance id, + * written back by the intent process trigger); the current user's actionable inbox tasks are fetched + * once and bucketed by processInstanceId, so any view - list, manage, or a master-detail pane - can + * surface the tasks for a given record regardless of its layout. + * + * Usage in a generated view: depend on the 'ProcessTasks' module and drop + * next to the record's actions. + */ +angular.module('ProcessTasks', ['platformLocale']) + .factory('ProcessTasks', ['$http', 'LocaleService', function ($http, LocaleService) { + const Dialogs = new DialogHub(); + let byProcessId = {}; + let loadPromise = null; + + const bucket = (responses) => { + const map = {}; + const seen = new Set(); + const collect = (tasks, mine) => (tasks || []).forEach((task) => { + if (!task.processInstanceId || seen.has(task.id)) return; + seen.add(task.id); + task.mine = mine; + (map[task.processInstanceId] = map[task.processInstanceId] || []).push(task); + }); + collect(responses[0].data, true); + collect(responses[1].data, false); + return map; + }; + + const load = () => { + loadPromise = Promise.all([ + $http.get('/services/inbox/tasks?type=assignee', { params: { limit: 100 } }), + $http.get('/services/inbox/tasks?type=groups', { params: { limit: 100 } }) + ]).then((responses) => { + byProcessId = bucket(responses); + return byProcessId; + }, (error) => { + byProcessId = {}; + console.error('ProcessTasks: unable to load inbox tasks', error); + return byProcessId; + }); + return loadPromise; + }; + + const openForm = (task) => { + if (!task.formKey) { + Dialogs.showAlert({ + title: task.name, + message: LocaleService.t('dashboard.processTasks.noForm', {}, 'This task has no form to display.'), + type: AlertTypes.Information + }); + return; + } + const separator = task.formKey.indexOf('?') >= 0 ? '&' : '?'; + const formUrl = task.formKey + separator + 'taskId=' + encodeURIComponent(task.id) + '&processInstanceId=' + encodeURIComponent(task.processInstanceId); + // The generated task form completes the task and closes this window itself (DialogHub.closeWindow); + // we just re-fetch when it closes so the originating view's badge drops the completed task. + const closeTopic = 'dashboard.processTasks.window.' + task.id; + const closeListener = Dialogs.addMessageListener({ + topic: closeTopic, + handler: () => { + Dialogs.removeMessageListener(closeListener); + load(); + } + }); + Dialogs.showWindow({ + hasHeader: true, + title: task.name, + path: formUrl, + closeButton: true, + callbackTopic: closeTopic + }); + }; + + return { + /** Force a re-fetch of the current user's tasks (call after a list reload / record change). */ + refresh: () => load(), + /** Fetch once if not already loaded; subsequent calls reuse the in-flight / cached result. */ + ensureLoaded: () => loadPromise || load(), + /** The cached actionable tasks for a record, matched by entity.ProcessId === task.processInstanceId. */ + getTasks: (entity) => (entity && entity.ProcessId && byProcessId[entity.ProcessId]) || [], + /** Open a task's form; a candidate (not-yet-assigned) task is claimed for the user first. */ + openTask: (task) => { + if (task.mine) { + openForm(task); + return; + } + $http.post('/services/inbox/tasks/' + task.id, { action: 'CLAIM' }).then(() => { + task.mine = true; + openForm(task); + load(); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: task.name, + message: LocaleService.t('dashboard.processTasks.unableToClaim', { message: message }, `Unable to claim task: '${message}'`), + type: AlertTypes.Error + }); + console.error('ProcessTasks: unable to claim task', error); + }); + } + }; + }]) + .directive('entityProcessTasks', ['ProcessTasks', 'LocaleService', function (ProcessTasks, LocaleService) { + return { + restrict: 'E', + scope: { entity: '<' }, + template: ` + + + + + + + + +`, + link: (scope) => { + scope.ariaLabel = LocaleService.t('dashboard.processTasks.pending', {}, 'Pending tasks'); + scope.tasks = () => ProcessTasks.getTasks(scope.entity); + scope.openTask = (task) => ProcessTasks.openTask(task); + ProcessTasks.ensureLoaded().then(() => scope.$applyAsync()); + } + }; + }]); diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/controller.js.template index 81901e268f4..0aaa2a13041 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/controller.js.template @@ -1,9 +1,9 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'#if($hasProcess), 'ProcessTasks'#end]) .config(['EntityServiceProvider', (EntityServiceProvider) => { EntityServiceProvider.baseUrl = '/services/java/${projectName}/gen/${javaGenFolderName}/api/${javaPerspectiveName}/${name}Controller'; }]) - .controller('PageController', (${dollar}scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService) => { + .controller('PageController', (${dollar}scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService#if($hasProcess), ProcessTasks#end) => { const Dialogs = new DialogHub(); $scope.dataPage = 1; $scope.dataCount = 0; @@ -120,6 +120,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer #end $scope.data = response.data; +#if($hasProcess) + ProcessTasks.refresh(); +#end }, (error) => { const message = error.data ? error.data.message : ''; Dialogs.showAlert({ diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/index.html.template index ca42f89ab0f..0014592b570 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/list/index.html.template @@ -9,6 +9,9 @@ +#if($hasProcess) + +#end @@ -91,6 +94,9 @@ #end #end +#if($hasProcess) + +#end diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/controller.js.template index b8ecaa431d9..3ff847b52ed 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/controller.js.template @@ -1,9 +1,9 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'#if($hasProcess), 'ProcessTasks'#end]) .config(['EntityServiceProvider', (EntityServiceProvider) => { EntityServiceProvider.baseUrl = '/services/java/${projectName}/gen/${javaGenFolderName}/api/${javaPerspectiveName}/${name}Controller'; }]) - .controller('PageController', (${dollar}scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService, ButtonStates) => { + .controller('PageController', (${dollar}scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService, ButtonStates#if($hasProcess), ProcessTasks#end) => { const Dialogs = new DialogHub(); let translated = { yes: 'Yes', @@ -140,6 +140,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer #end $scope.data = response.data; +#if($hasProcess) + ProcessTasks.refresh(); +#end }, (error) => { const message = error.data ? error.data.message : ''; Dialogs.showAlert({ diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/index.html.template index 41d6304554a..d10237b97f3 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/manage/index.html.template @@ -9,6 +9,9 @@ +#if($hasProcess) + +#end @@ -92,6 +95,9 @@ #end #end +#if($hasProcess) + +#end diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/controller.js.template index 6514041f993..bf25d3dbf6e 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/controller.js.template @@ -1,9 +1,9 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'#if($hasProcess), 'ProcessTasks'#end]) .config(['EntityServiceProvider', (EntityServiceProvider) => { EntityServiceProvider.baseUrl = '/services/java/${projectName}/gen/${javaGenFolderName}/api/${javaPerspectiveName}/${name}Controller'; }]) - .controller('PageController', ($scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService) => { + .controller('PageController', ($scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService#if($hasProcess), ProcessTasks#end) => { const Dialogs = new DialogHub(); //-----------------Custom Actions-------------------// Extensions.getWindows(['${projectName}-custom-action']).then((response) => { @@ -136,6 +136,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer #end $scope.data = response.data; +#if($hasProcess) + ProcessTasks.refresh(); +#end }, (error) => { const message = error.data ? error.data.message : ''; Dialogs.showAlert({ diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/index.html.template index b371e016a1e..53895ee343c 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/detail/index.html.template @@ -9,6 +9,9 @@ +#if($hasProcess) + +#end @@ -94,6 +97,9 @@ #end #end +#if($hasProcess) + +#end diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/controller.js.template index 9edb2232f65..d68bb689b5a 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/controller.js.template @@ -1,5 +1,5 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, Extensions, LocaleService) => { +angular.module('page', ['blimpKit', 'platformView', 'platformLocale'#if($hasProcess), 'ProcessTasks'#end]).controller('PageController', ($scope, Extensions, LocaleService) => { const Dialogs = new DialogHub(); $scope.entity = {}; diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/index.html.template index 1c0f344529d..993dd67db7d 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-list/main-details/index.html.template @@ -8,6 +8,9 @@ +#if($hasProcess) + +#end @@ -235,6 +238,15 @@ +#if($hasProcess) + + + + + + + +#end diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/controller.js.template index 00f1d1fd1d9..89ddff84888 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/controller.js.template @@ -1,9 +1,9 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'#if($hasProcess), 'ProcessTasks'#end]) .config(['EntityServiceProvider', (EntityServiceProvider) => { EntityServiceProvider.baseUrl = '/services/java/${projectName}/gen/${javaGenFolderName}/api/${javaPerspectiveName}/${name}Controller'; }]) - .controller('PageController', ($scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService, ButtonStates) => { + .controller('PageController', ($scope,#if($hasDropdowns) ${dollar}http,#end EntityService, Extensions, LocaleService, ButtonStates#if($hasProcess), ProcessTasks#end) => { const Dialogs = new DialogHub(); let translated = { yes: 'Yes', @@ -157,6 +157,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer #end $scope.data = response.data; +#if($hasProcess) + ProcessTasks.refresh(); +#end }, (error) => { const message = error.data ? error.data.message : ''; Dialogs.showAlert({ diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/index.html.template index 82ead712f55..555c1de1afb 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/detail/index.html.template @@ -9,6 +9,9 @@ +#if($hasProcess) + +#end @@ -94,6 +97,9 @@ #end #end +#if($hasProcess) + +#end diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/controller.js.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/controller.js.template index 929a0778448..3bfd655054c 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/controller.js.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/controller.js.template @@ -1,5 +1,5 @@ #set($dollar = '$') -angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService'#if($hasProcess), 'ProcessTasks'#end]) .config(["EntityServiceProvider", (EntityServiceProvider) => { EntityServiceProvider.baseUrl = '/services/java/${projectName}/gen/${javaGenFolderName}/api/${javaPerspectiveName}/${name}Controller'; }]) diff --git a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/index.html.template b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/index.html.template index 42882bd555d..65b7f829979 100644 --- a/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/index.html.template +++ b/components/template/template-application-ui-angular-java/src/main/resources/META-INF/dirigible/template-application-ui-angular-java/ui/perspective/master-manage/main-details/index.html.template @@ -10,6 +10,9 @@ +#if($hasProcess) + +#end @@ -576,6 +579,15 @@ +#if($hasProcess) + + + + + + + +#end diff --git a/components/ui/service-generate/src/main/resources/META-INF/dirigible/service-generate/template/parameterUtils.js b/components/ui/service-generate/src/main/resources/META-INF/dirigible/service-generate/template/parameterUtils.js index c365bb7344c..372416c3eef 100644 --- a/components/ui/service-generate/src/main/resources/META-INF/dirigible/service-generate/template/parameterUtils.js +++ b/components/ui/service-generate/src/main/resources/META-INF/dirigible/service-generate/template/parameterUtils.js @@ -71,6 +71,10 @@ export function process(model, parameters) { p.isReadOnlyProperty = p.isReadOnlyProperty === "true"; p.widgetIsMajor = p.widgetIsMajor === "true"; p.widgetLabel = p.widgetLabel ? p.widgetLabel : p.name; + + if (p.name === "ProcessId") { + e.hasProcess = true; + } p.widgetDropdownUrl = ""; p.widgetDropdownControllerUrl = "";