diff --git a/AxonIvyPortal/PortalKitTestHelper/dataclasses/portalKit_test/TestDataProviderForPortalExpressData.d.json b/AxonIvyPortal/PortalKitTestHelper/dataclasses/portalKit_test/TestDataProviderForPortalExpressData.d.json deleted file mode 100644 index 35f67d1ec0a..00000000000 --- a/AxonIvyPortal/PortalKitTestHelper/dataclasses/portalKit_test/TestDataProviderForPortalExpressData.d.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "TestDataProviderForPortalExpressData", - "namespace" : "portalKit_test", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "items", - "type" : "List" - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/PortalKitTestHelper/processes/Functional Processes/TestDataProviderForPortalExpress.p.json b/AxonIvyPortal/PortalKitTestHelper/processes/Functional Processes/TestDataProviderForPortalExpress.p.json deleted file mode 100644 index b3b59290872..00000000000 --- a/AxonIvyPortal/PortalKitTestHelper/processes/Functional Processes/TestDataProviderForPortalExpress.p.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "16B3F9C285F4279D", - "kind" : "CALLABLE_SUB", - "config" : { - "data" : "portalKit_test.TestDataProviderForPortalExpressData" - }, - "elements" : [ { - "id" : "f0", - "type" : "CallSubStart", - "name" : "portalExpressDataProvider()", - "config" : { - "signature" : "portalExpressDataProvider", - "result" : { - "params" : [ - { "name" : "data", "type" : "List", "desc" : "" } - ], - "map" : { - "result.data" : "java.util.Arrays.asList(\"Data Provider Item 1\", \"Data Provider Item 2\", \"Data Provider Item 3\")" - } - } - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 }, - "labelOffset" : { "x" : 12, "y" : 47 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "CallSubEnd", - "visual" : { - "at" : { "x" : 352, "y" : 64 } - } - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/DataCreation.p.json b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/DataCreation.p.json index b58ccf85c3e..a997ff5ece9 100644 --- a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/DataCreation.p.json +++ b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/DataCreation.p.json @@ -1351,63 +1351,6 @@ "connect" : [ { "id" : "f139", "to" : "S10" } ] - }, { - "id" : "f145", - "type" : "RequestStart", - "name" : "createSampleExpressWorkflowProcess.ivp", - "config" : { - "signature" : "createSampleExpressWorkflowProcess", - "input" : { - "params" : [ - { "name" : "filePath", "type" : "String", "desc" : "" } - ], - "map" : { - "out.expressExportFilePath" : "param.filePath" - } - }, - "request" : { - "isVisibleOnStartList" : false - } - }, - "visual" : { - "at" : { "x" : 816, "y" : 1280 }, - "labelOffset" : { "x" : 5, "y" : 49 } - }, - "connect" : [ - { "id" : "f148", "to" : "f147" } - ] - }, { - "id" : "f146", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 1120, "y" : 1280 } - } - }, { - "id" : "f147", - "type" : "Script", - "name" : "Import Express from file", - "config" : { - "output" : { - "code" : [ - "import java.util.Map;", - "import java.io.FileInputStream;", - "import java.io.InputStream;", - "import ch.ivy.addon.portalkit.util.ExpressManagementUtils;", - "", - "Map output = ExpressManagementUtils.initOutputMessage();", - "InputStream inputstream = new FileInputStream(in.expressExportFilePath);", - "ExpressManagementUtils.installExpressWorkflows(inputstream, output);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 984, "y" : 1280 }, - "size" : { "width" : 144 } - }, - "connect" : [ - { "id" : "f149", "to" : "f146" } - ] }, { "id" : "f150", "type" : "RequestStart", @@ -1821,19 +1764,6 @@ "import ch.ivy.addon.portalkit.service.ExternalLinkService;", "import ch.ivyteam.ivy.security.ISecurityContext;", "import ch.ivy.addon.portalkit.configuration.ExternalLink;", - "import ch.ivy.addon.portalkit.service.ExpressProcessService;", - "import ch.ivy.addon.portalkit.bo.ExpressProcess;", - "ExpressProcess expressProcess = new ExpressProcess();", - "expressProcess.ableToEdit = true;", - "expressProcess.processName = \"A sample for Express process\";", - "expressProcess.processDescription = \"A sample for Express process\";", - "expressProcess.readyToExecute = true;", - "expressProcess.processFolder = \"test\";", - "expressProcess.processType = \"AHWF\";", - "expressProcess.processPermissions = [\"#demo\"];", - "expressProcess.processOwner = \"#demo\";", - "ExpressProcessService expressProcessService = new ExpressProcessService();", - "expressProcessService.save(expressProcess);", "", "ExternalLink externalLink = new ExternalLink();", "externalLink.name = \"A sample for External link to Google\";", diff --git a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json index 7371ed7db65..63cd31fd2c9 100644 --- a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json +++ b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json @@ -446,12 +446,7 @@ "import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository;", "import ch.ivyteam.ivy.security.IPermission;", "", - "IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", - " }", - "", - " iPermission = IPermissionRepository.instance().findByName(PortalPermission.SHOW_CASE_DETAILS.getValue());", + " IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.SHOW_CASE_DETAILS.getValue());", " if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", " }", @@ -594,12 +589,7 @@ "import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository;", "import ch.ivyteam.ivy.security.IPermission;", "", - " IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", - " }", - "", - " iPermission = IPermissionRepository.instance().findByName(PortalPermission.SHOW_CASE_DETAILS.getValue());", + " IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.SHOW_CASE_DETAILS.getValue());", " if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", " }", diff --git a/AxonIvyPortal/portal-components/cms/cms.yaml b/AxonIvyPortal/portal-components/cms/cms.yaml index 7937cedf8fd..4b6dfbc4b17 100644 --- a/AxonIvyPortal/portal-components/cms/cms.yaml +++ b/AxonIvyPortal/portal-components/cms/cms.yaml @@ -22,7 +22,6 @@ Dialogs: ProcessIsHidden: The current process is hidden! ProcessType: CASE_MAP: Case Map - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Business Process Labels: diff --git a/AxonIvyPortal/portal-components/cms/cms_de.yaml b/AxonIvyPortal/portal-components/cms/cms_de.yaml index 2e25b8cd3ca..d0d5b7d2792 100644 --- a/AxonIvyPortal/portal-components/cms/cms_de.yaml +++ b/AxonIvyPortal/portal-components/cms/cms_de.yaml @@ -82,7 +82,6 @@ Dialogs: ProcessNotFound: Der definierte Process kann nicht gefunden werden. ProcessType: CASE_MAP: Fall Karte - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Geschäftsprozess ProcessViewerIFrameTitle: Prozessbetrachterrahmen diff --git a/AxonIvyPortal/portal-components/cms/cms_en.yaml b/AxonIvyPortal/portal-components/cms/cms_en.yaml index 806525ae6a0..67acf16aed0 100644 --- a/AxonIvyPortal/portal-components/cms/cms_en.yaml +++ b/AxonIvyPortal/portal-components/cms/cms_en.yaml @@ -83,7 +83,6 @@ Dialogs: ProcessNotFound: The defined process cannot be found. ProcessType: CASE_MAP: Case Map - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Business Process ProcessViewerIFrameTitle: Process viewer frame diff --git a/AxonIvyPortal/portal-components/cms/cms_es.yaml b/AxonIvyPortal/portal-components/cms/cms_es.yaml index 15b03f3efda..5e726ec7ebb 100644 --- a/AxonIvyPortal/portal-components/cms/cms_es.yaml +++ b/AxonIvyPortal/portal-components/cms/cms_es.yaml @@ -83,7 +83,6 @@ Dialogs: ProcessNotFound: No se encuentra el proceso definido. ProcessType: CASE_MAP: Mapa del caso - EXPRESS_PROCESS: Flujo de trabajo exprés EXTERNAL_LINK: Link externo IVY_PROCESS: Proceso de negocio ProcessViewerIFrameTitle: Marco del visor de procesos diff --git a/AxonIvyPortal/portal-components/cms/cms_fr.yaml b/AxonIvyPortal/portal-components/cms/cms_fr.yaml index 59a7e3eaa35..a218ebfd9e1 100644 --- a/AxonIvyPortal/portal-components/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal-components/cms/cms_fr.yaml @@ -83,7 +83,6 @@ Dialogs: ProcessNotFound: Le processus défini est introuvable. ProcessType: CASE_MAP: Carte de cas - EXPRESS_PROCESS: Flux de travail express EXTERNAL_LINK: Lien externe IVY_PROCESS: Processus d'entreprise ProcessViewerIFrameTitle: Cadre de visualisation du processus diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/constant/CustomFields.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/constant/CustomFields.java index 567ee0b34aa..ac82f64fca6 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/constant/CustomFields.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/constant/CustomFields.java @@ -1,7 +1,6 @@ package com.axonivy.portal.components.constant; public class CustomFields { - public static final String IS_EXPRESS_PROCESS = "isExpress"; public static final String IS_DASHBOARD_PROCESS = "isDashboardProcess"; public static final String BUSINESS_DETAILS = "businessDetails"; } diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java index 83acd79c589..0f1ada532ab 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java @@ -6,7 +6,6 @@ public enum PortalVariable { THIRD_PARTY_APP("Portal.ThirdPartyApplications"), WIDGET_FILTER("Portal.Dashboard.WidgetFilters"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), - EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), TASK_DETAIL("Portal.TaskDetails"), CASE_DETAIL("Portal.CaseDetails"), DASHBOARD("Portal.Dashboard"), diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/ProcessType.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/ProcessType.java index c82a29c3d91..4476822caaf 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/ProcessType.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/ProcessType.java @@ -7,7 +7,6 @@ import ch.ivyteam.ivy.environment.Ivy; public enum ProcessType { - EXPRESS_PROCESS("ExpressProcess"), EXTERNAL_LINK("ExternalLink"), CASE_MAP("casemap"), IVY_PROCESS("process-start"); diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/service/CaseDocumentService.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/service/CaseDocumentService.java index 2878713fb26..6de97e0fb89 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/service/CaseDocumentService.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/service/CaseDocumentService.java @@ -30,7 +30,6 @@ public class CaseDocumentService { - public static final String EXPRESS_UPLOAD_FOLDER = "AxonIvyExpress"; private ICase iCase; private CaseDocumentService(ICase iCase) { @@ -51,15 +50,7 @@ public IDocument upload(String filename, InputStream content) { } public List getAll() { - List documents = new ArrayList<>(getAllDocumentsOf(iCase)); - List expressDocs = new ArrayList<>(); - for (IDocument doc : documents) { - if (doc.getPath().asString().contains(EXPRESS_UPLOAD_FOLDER)) { - expressDocs.add(doc); - } - } - documents.removeAll(expressDocs); - return new ArrayList<>(documents); + return new ArrayList<>(getAllDocumentsOf(iCase)); } /** @@ -74,7 +65,7 @@ public StreamedContent download(IvyDocument document) { public boolean doesDocumentExist(String filename) { IDocument document = documentsOf(iCase).get(new Path(filename)); - return document != null && !document.getPath().asString().contains(EXPRESS_UPLOAD_FOLDER); + return document != null; } public static boolean isDocumentTypeValid(String filename, String allowedFileTypes) { diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/util/ProcessViewerUtils.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/util/ProcessViewerUtils.java index ced7c4a9102..228a5620f9f 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/util/ProcessViewerUtils.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/util/ProcessViewerUtils.java @@ -7,10 +7,8 @@ import java.util.function.Predicate; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; -import com.axonivy.portal.components.constant.CustomFields; import com.axonivy.portal.components.dto.ProcessViewerDTO; import com.axonivy.portal.components.service.impl.ProcessService; @@ -132,11 +130,6 @@ private static List getWebStartables() { return Optional.ofNullable(webStartables).orElse(new ArrayList<>()); } - public static boolean isExpressCase(ICase iCase) { - return iCase != null - && BooleanUtils.toBoolean(iCase.customFields().stringField(CustomFields.IS_EXPRESS_PROCESS).getOrNull()); - } - public static ICaseMap findCaseMapByCase(ICase caze) { if (Objects.isNull(caze)) { return null; @@ -149,7 +142,7 @@ public static boolean hasCaseMap(IBusinessCase businessCase) { } public static boolean isViewerAllowed(ICase caze) { - if (caze == null || isExpressCase(caze) || !caze.isBusinessCase()) { + if (caze == null || !caze.isBusinessCase()) { return false; } else if (hasCaseMap(caze.getBusinessCase())) { return true; diff --git a/AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/ExpressResponsible.d.json b/AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/Responsible.d.json similarity index 88% rename from AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/ExpressResponsible.d.json rename to AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/Responsible.d.json index ed7888ec412..d2ac71c96a2 100644 --- a/AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/ExpressResponsible.d.json +++ b/AxonIvyPortal/portal-selenium-test/dataclasses/ch/ivyteam/ivy/project/portal/test/Responsible.d.json @@ -1,6 +1,6 @@ { "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "ExpressResponsible", + "simpleName" : "Responsible", "namespace" : "ch.ivyteam.ivy.project.portal.test", "isBusinessCaseData" : false, "fields" : [ { diff --git a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js index 92d2ad81b8d..900b8a17cec 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js +++ b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js @@ -153,16 +153,12 @@ function highlightProcessItems() { createRedMediumOutline(processSearch); appendStepAnnotation(processSearch, "1", -5, processSearch.width() - 40); - var expressLogo = $('.express-workflow .image-process-icon:eq(0)'); - createRedMediumOutline(expressLogo); - appendStepAnnotation(expressLogo, "2", -15, -30); - var externalLink = $('.js-external-link-process-item .image-process-icon:eq(0)'); createRedMediumOutline(externalLink); - appendStepAnnotation(externalLink, "3", -15, -30); + appendStepAnnotation(externalLink, "2", -15, -30); createRedMediumOutline($('[id$="process-widget:process-view-mode:view-mode-selection"]')); - appendStepAnnotation($("[id$='process-widget:process-view-mode:view-mode-selection'] div[class$='ui-state-active']"), "4", -10, -40); + appendStepAnnotation($("[id$='process-widget:process-view-mode:view-mode-selection'] div[class$='ui-state-active']"), "3", -10, -40); } function highlightEditProcessIcon() { @@ -192,7 +188,6 @@ function highlightAdminSettings() { function highlightUserMenuConfiguration() { createRedMediumOutline($("a[id$='menu-configuration-0']")); - createRedMediumOutline($("a[id$='menu-configuration-1']")); } function highlightCaseMenuItem() { @@ -346,40 +341,6 @@ function highlightShowWorkflowEvents() { createRedMediumOutline($("a[id$=':task-workflow-event-command']")); } -function highlightCreateExpressWorkflow() { - createRedMediumOutline($("[id$='process-widget:create-express-link']")); -} - -function highlightExpressTaskResponsible(stepNumber) { - var taskResponsible = '.task-responsible:eq(' + stepNumber + ')'; - createRedMediumOutline($(taskResponsible)); -} - -function highlightManagementExpressTab() { - $("a[href$=':adminTabView:express-management-tab']").parent().addClass("red-medium-border"); -} - -function highlightDeployExpress() { - createRedMediumOutline($(".ui-fileupload-upload")); -} - -function highlightExportExpress() { - var expressTable = $("[id$=':express-management-component:express-management-form:express-workflow-summary-table']"); - var checkAll = expressTable.find(".express-selection-column:eq(0)").find(".ui-chkbox-box"); - createRedMediumOutline(checkAll); - appendStepAnnotation(checkAll, 1, -10, checkAll.width() + 10); - - var exportButton = $("[id$=':express-management-component:express-management-form:export-express-btn']"); - appendStepAnnotation(exportButton, 2, -10, exportButton.width() + 15); -} - -function cleanHighlightExportExpress() { - var expressTable = $("[id$=':express-management-component:express-management-form:express-workflow-summary-table']"); - var checkAll = expressTable.find(".express-selection-column:eq(0)").find(".ui-chkbox-box"); - checkAll.removeClass("red-medium-outline"); - $('.marker').remove(); -} - function scrollToMiddleOfLayoutContent() { window.scrollTo(0, document.body.scrollHeight/2); } @@ -462,10 +423,6 @@ function highlightShowAllProcesses() { createRedThickOutlineWithOffset($('.layout-menu .PROCESS')); } -function highlightShowAdditionalLink() { - createRedMediumOutline($("[id$='case-item:case-item-action-form:action-step-component:show-additional-case-details-link']")); -} - function highlightTaskExportToExcelButton() { createRedMediumOutline($("[id$=':task-export-to-excel-form']")); } diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-express.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-express.json deleted file mode 100644 index 20d8a48e271..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-express.json +++ /dev/null @@ -1,45 +0,0 @@ -[{ "id": "f281e1ee7fb54bcda8d7a0c64ba46fc8", - "processName": "Portal Express process", - "processDescription": "Process", - "processType": "AHWF", - "processPermissions": ["Everybody"], - "processOwner": "#portaladmin externalId:889", - "processFolder": "8e9870b2-0179-46eb-bdb8", - "readyToExecute": true, - "processCoOwners": ["#demo externalId:9CA"], - "icon": "fa-codepen", - "taskDefinitions": [{ - "type": "USER_TASK", - "responsibles": ["Everybody"], - "subject": "Express user task", - "description": "Express user task", - "taskPosition": 1, - "untilDays": 2, - "formElements": [{ - "elementID": "Input area2020-09-07 04:57:05", - "label": "Input area", - "required": true, - "intSetting": 7, - "elementType": "InputTextArea", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0 - }] - }, { - "type": "EMAIL", - "responsibles": [], - "taskPosition": 2, - "untilDays": 3, - "email": { - "recipients": "wawatest@ivy.io", - "responseTo": "wawa@mail.io", - "subject": "Verify Express process", - "content": "

Email content

", - "attachments": [], - "empty": false - } - } - ], - "ableToEdit": true, - "useDefaultUI": false -}] \ No newline at end of file diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-user-menu.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-user-menu.json index 9c9989ac9b1..ffcbd3f0ed3 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-user-menu.json +++ b/AxonIvyPortal/portal-selenium-test/resources/testFile/custom-user-menu.json @@ -7,14 +7,6 @@ ], "url": "https://www.example.com" }, - { - "id": "express", - "title": "Portal Express process", - "permissions": [ - "Everybody" - ], - "url": "Portal Express process" - }, { "id": "create-invesment", "title": "Create Investment", diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json deleted file mode 100644 index 1d7e62b5b26..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "version": 1, - "expressWorkflow": [{ - "expressProcess": { - "id": "f5da82a8ed4f437d95b477e9746d9a75", - "processName": "Leave request creation", - "processDescription": "Leave request creation description", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "7f0cac61d68346babbebe1e703c578cb", - "processID": "f5da82a8ed4f437d95b477e9746d9a75", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "b9d14eba257c40b8b3e628d5defa5479", - "processID": "f5da82a8ed4f437d95b477e9746d9a75", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - }, { - "expressProcess": { - "id": "c3939e7508144f94a03dc71c8054570c", - "processName": "Quality Report", - "processDescription": "Quality Report description", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "209f65e4e7344d2ca7d46e0cb39f70b6", - "processID": "c3939e7508144f94a03dc71c8054570c", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "4a23be65f8bf4dbb97f0d126a146bfb0", - "processID": "c3939e7508144f94a03dc71c8054570c", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - }, { - "expressProcess": { - "id": "c8166c0a53144adc9eaa1df9c2902f04", - "processName": "Express Test 1", - "processDescription": "Express Test 1", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "69cd5fe6730842d394e9025b2b58b56d", - "processID": "c8166c0a53144adc9eaa1df9c2902f04", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "269bbeb00a7143c18753e3dc87a273b8", - "processID": "c8166c0a53144adc9eaa1df9c2902f04", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - } - ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-request-resource.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-request-resource.json deleted file mode 100644 index eac3c5099aa..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-request-resource.json +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"expressWorkflow":[{"expressProcess":{"id":"d623ed55776a4d70a94f38383c9ef9e0","processName":"Request new Resources - Express process","processDescription":"Express process test ","processType":"AHWF","processPermissions":["#demo","#david"],"processOwner":"#admin","isUseDefaultUI":false,"processFolder":"f647d845-6f04-48c8-82df-5db1ec7da1a4","readyToExecute":true,"processCoOwners":["Everybody"],"isAbleToEdit":true},"expressTaskDefinitions":[{"id":"ee61f6e8907b456786e343b6e864e4e0","processID":"d623ed55776a4d70a94f38383c9ef9e0","type":"USER_TASK","responsibles":["#demo","#david"],"subject":"Promote new resource","description":"Request new resource - Task 1","taskPosition":1,"untilDays":1},{"id":"10006b755bb74e6b8636182d064f7150","processID":"d623ed55776a4d70a94f38383c9ef9e0","type":"USER_TASK_WITH_EMAIL","responsibles":["Everybody"],"subject":"Send email to HR","description":"Send email to HR for review - Task 2","taskPosition":2,"untilDays":1},{"id":"5fd26253cb0046e7a3141f1cd3ffbca6","processID":"d623ed55776a4d70a94f38383c9ef9e0","type":"USER_TASK","responsibles":["#admin"],"subject":"HR review","description":"Wait HR review - Task 3","taskPosition":3,"untilDays":2},{"id":"8fdee4750b864260a5878cbac12e1510","processID":"d623ed55776a4d70a94f38383c9ef9e0","type":"APPROVAL","responsibles":["#admin","Everybody"],"subject":"Approval Request","description":"Approval Request","taskPosition":4,"untilDays":1}],"expressFormElements":[{"id":"ec21202fd937424094f4831dd3caacd8","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Applicant name2020-07-07 09:29:29","taskPosition":1,"label":"Applicant name","required":true,"intSetting":0,"elementType":"InputFieldText","optionStrs":[""],"elementPosition":"HEADER","indexInPanel":0,"counter":0},{"id":"e4537a5f9f4c44d9b99a99868808f7dc","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Email2020-07-07 09:29:43","taskPosition":1,"label":"Email","required":false,"intSetting":0,"elementType":"InputFieldText","optionStrs":[""],"elementPosition":"LEFTPANEL","indexInPanel":0,"counter":0},{"id":"dfef3f165b6049bb91a92534ceb80ea7","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Address2020-07-07 09:29:35","taskPosition":1,"label":"Address","required":true,"intSetting":0,"elementType":"InputFieldText","optionStrs":[""],"elementPosition":"RIGHTPANEL","indexInPanel":0,"counter":0},{"id":"904ee50d831a42438254d382af788c0d","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Welcome2020-07-07 09:30:25","taskPosition":2,"label":"Welcome","required":true,"intSetting":0,"elementType":"InputFieldText","optionStrs":[""],"elementPosition":"HEADER","indexInPanel":0,"counter":0},{"id":"3d69886d2eb0466fb2ee1888f1d35aed","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Start date2020-07-07 09:30:37","taskPosition":2,"label":"Start date","required":true,"intSetting":0,"elementType":"InputFieldDate","optionStrs":[""],"elementPosition":"LEFTPANEL","indexInPanel":0,"counter":0},{"id":"9b911a68e81246bb91216f557c4e9280","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Comment2020-07-07 09:31:05","taskPosition":3,"label":"Comment","required":true,"intSetting":0,"elementType":"InputFieldText","optionStrs":[""],"elementPosition":"LEFTPANEL","indexInPanel":0,"counter":0},{"id":"840d8b5224e541e8b1afc26e4da04fc0","processID":"d623ed55776a4d70a94f38383c9ef9e0","elementID":"Approval date2020-07-07 09:31:15","taskPosition":3,"label":"Approval date","required":true,"intSetting":0,"elementType":"InputFieldDate","optionStrs":[""],"elementPosition":"RIGHTPANEL","indexInPanel":0,"counter":0}]}]} \ No newline at end of file diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json deleted file mode 100644 index 837fcba4636..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1, - "expressWorkflow": [{ - "expressProcess": { - "id": "1aa339cba44148c8a7215b840b0911b4", - "processName": "Test disabled user", - "processDescription": "Test disabled user", - "processType": "AHWF", - "processPermissions": ["#visibility_test_user", "#demo"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e26cfb17-4fdd-405c-9aed-4dbfdd7eefe1", - "readyToExecute": true, - "processCoOwners": ["#admin", "#visibility_test_user"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "3a059f99084d488a99a8992157589d1c", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "type": "USER_TASK", - "responsibles": ["#visibility_test_user", "#demo"], - "subject": "Task 1 - Test disabled user", - "description": "", - "taskPosition": 1, - "untilDays": 1 - }, { - "id": "4491316e17e947be86ce02ed1e91ba9a", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "type": "USER_TASK", - "responsibles": ["#visibility_test_user"], - "subject": "Task 2 - Test disabled user", - "description": "", - "taskPosition": 2, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "b8dba0d41b1a4290b9f125a29fa2f4f5", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "elementID": "Hello2020-06-01 04:45:15", - "taskPosition": 1, - "label": "Hello", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "LEFTPANEL", - "indexInPanel": 0, - "counter": 0 - }, { - "id": "fb18bb0bf7f2400b949f244fea1bbfc0", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "elementID": "Test 22020-06-01 04:45:27", - "taskPosition": 2, - "label": "Test 2", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - } - ] -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java index bc5d20ce0a8..5ef65dcfb78 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java @@ -1,7 +1,6 @@ package com.axonivy.portal.selenium.common; import static com.codeborne.selenide.Condition.exist; - import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.open; import static com.codeborne.selenide.Selenide.refresh; @@ -23,7 +22,7 @@ import ch.ivy.addon.portalkit.enums.PortalPermission; import ch.ivy.addon.portalkit.enums.PortalVariable; -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; +import ch.ivyteam.ivy.project.portal.test.Responsible; /** * A base test that other tests extend it. It will test on browser IE by default. It provides feature to take screenshot @@ -66,7 +65,6 @@ public void tearDown() { protected String createTaskWithNotExistedActivatorUrl = "internalSupport/14B2FC03D2E87141/createTaskWithNotExistedActivator.ivp"; protected String createTaskForRoleInvolved = "InternalSupport/171E2BB0DB49C362/roleInvolved.ivp"; - protected String expressStartLink = "axonivy-express/15798655494F25E1/AxonIvyExpressWF.ivp"; protected String cleanupDataLink = "portalKitTestHelper/1511A66AF619A768/cleanData.ivp"; protected String complexPaymentUrl = "portal-developer-examples/162511D2577DBA88/complexPayment.ivp"; protected String createAlphaCompanyUrl = "portal-components-examples/1818977D467E3129/createAlphaCompany.ivp"; @@ -362,8 +360,8 @@ public WebDriverWait webDriverWait() { return new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT); } - public ExpressResponsible setExpressResponsible(String userName, boolean isGroup) { - ExpressResponsible user = new ExpressResponsible(); + public Responsible setResponsible(String userName, boolean isGroup) { + Responsible user = new Responsible(); user.setResponsibleName(userName); user.setIsGroup(isGroup); return user; diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java index 9f52b6ed515..2520f3a7052 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java @@ -24,8 +24,6 @@ public class ScreenshotUtils { public static final String FORGOT_PASSWORD = "/forgot-password/"; public static final String DASHBOARD_FOLDER = "/dashboard/"; public static final String NEW_DASHBOARD_FOLDER = "/new-dashboard/"; - public static final String EXPRESS_FOLDER = "/express/"; - public static final String EXPRESS_MANAGEMENT_FOLDER = "/express-management/"; public static final String PROCESSES_WIDGET_FOLDER = "/process/"; public static final String PROCESSES_INFORMATION_WIDGET_FOLDER = "/process/information/"; public static final String PROCESSES_PROCESS_IMAGE_FOLDER = "/process-image/customization/"; diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/UrlHelpers.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/UrlHelpers.java index 70020b8efbd..ef77c85c9c0 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/UrlHelpers.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/UrlHelpers.java @@ -15,8 +15,7 @@ public static String generateAbsoluteProcessStartLink(String relativeProcessStar // project if (!relativeProcessStartLink.contains("portal/") && !relativeProcessStartLink.contains("portal-developer-examples") && !relativeProcessStartLink.contains("portal-user-examples") - && !relativeProcessStartLink.contains("portal-components-examples") - && !relativeProcessStartLink.contains("axonivy-express")) { + && !relativeProcessStartLink.contains("portal-components-examples")) { relativeProcessStartLink = WordUtils.capitalize(relativeProcessStartLink); } if (relativeProcessStartLink.endsWith(".icm")) { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java index 32f5d61df88..592d3418aa2 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java @@ -24,16 +24,14 @@ public enum Variable { HIDE_CASE_DOCUMENT("Portal.CaseDetails.HideDocument"), SHOW_CASE_DURATION_TIME("Portal.CaseDetails.ShowDurationTime"), HIDE_UPLOAD_DOCUMENT_FOR_DONE_CASE("Portal.CaseDetails.HideUploadDocumentForDoneCase"), DEFAULT_PROCESS_MODE("Portal.Processes.Mode"), DEFAULT_PROCESS_IMAGE("Portal.Processes.DefaultImage"), - DISPLAY_MESSAGE_AFTER_FINISH_TASK("Portal.DisplayMessageAfterFinishTask"), EXPRESS_END_PAGE("Portal.ExpressEndPage"), + DISPLAY_MESSAGE_AFTER_FINISH_TASK("Portal.DisplayMessageAfterFinishTask"), EMBED_IN_FRAME("Portal.EmbedInFrame"), LOGGED_IN_USER_FORMAT("Portal.LoggedInUserFormat"), SHOW_GLOBAL_SEARCH("Portal.ShowGlobalSearch"), SHOW_BUTTON_ICON("Portal.ShowButtonIcon"), DEFAULT_HOMEPAGE("Portal.Homepage"), HIDE_RELATED_CASE_INFO_FROM_HISTORY("Portal.Histories.HideRelatedCaseInfo"), DISPLAY_USERS_OF_TASK_ACTIVATOR("Portal.DisplayUsersOfRole"), ANNOUNCEMENT("Portal.Announcement"), - THIRD_PARTY_APP("Portal.ThirdPartyApplications"), - EXTERNAL_LINK("Portal.Processes.ExternalLinks"), - EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), TASK_COLUMN("Portal.Tasks.TaskColumn"), - TASK_FILTER("Portal.Tasks.TaskFilters"), + THIRD_PARTY_APP("Portal.ThirdPartyApplications"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), + TASK_COLUMN("Portal.Tasks.TaskColumn"), TASK_FILTER("Portal.Tasks.TaskFilters"), TASK_BEHAVIOUR_WHEN_CLICKING_ON_LINE_IN_TASK_LIST("Portal.Tasks.BehaviourWhenClickingOnLineInTaskList"), TASK_DETAIL("Portal.TaskDetails"), CASE_COLUMN("Portal.Cases.CaseColumn"), CASE_FILTER("Portal.Cases.CaseFilters"), CASE_DETAIL("Portal.CaseDetails"), SHOW_AVATAR("Portal.ShowAvatar"), diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdhocScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdhocScreenshotTest.java deleted file mode 100644 index a4f1f317510..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdhocScreenshotTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.axonivy.portal.selenium.document.screenshot; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.Dimension; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.ScreenshotBaseTest; -import com.axonivy.portal.selenium.common.ScreenshotMargin; -import com.axonivy.portal.selenium.common.ScreenshotUtils; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.DefaultExpressTaskPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.TaskTemplatePage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -@IvyWebTest -public class AdhocScreenshotTest extends ScreenshotBaseTest { - - @Override - @BeforeEach - public void setup() { - super.setup(); - redirectToRelativeLink(createTestingTasksUrl); - login(TestAccount.DEMO_USER); - } - - @Test - public void takeScreenshotAdhoc() throws IOException { - String mainTask = "Sick Leave Request"; - String defaultTaskName1 = "Adhoc-Ask permission from CEO"; - String defaultTaskName2 = "Adhoc-Inform team member"; - String defaultTaskComment1 = "Get approve from CEO"; - String defaultTaskComment2 = "Inform team"; - - ScreenshotUtils.resizeBrowser(new Dimension(1200, 580)); - showNewDashboard(); - MainMenuPage menuPage = new MainMenuPage(); - TaskWidgetPage taskWidget = menuPage.openTaskList(); - taskWidget.openTask(mainTask); - TaskTemplatePage taskTemplatePage = new TaskTemplatePage(); - taskTemplatePage.clickActionButton(); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "adhoc-start"); - - taskTemplatePage.clickOnStartAdhocLink(); - taskTemplatePage.clickAdhocOkButton(); - - // create tasks in adhoc page - ScreenshotUtils.resizeBrowser(new Dimension(1500, 1200)); - ExpressProcessPage expressPage = new ExpressProcessPage(); - - ExpressResponsible responsible = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - List responsibles = Arrays.asList(responsible); - expressPage.createDefaultTask(0, defaultTaskName1, responsibles); - expressPage.addNewTask(0); - expressPage.createDefaultTask(1, defaultTaskName2, responsibles); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "adhoc-define"); - expressPage.clickSave(); - - // first task of adhoc - DefaultExpressTaskPage defaultExpressTaskPage = new DefaultExpressTaskPage(); - defaultExpressTaskPage.enterTextToDefaultTask(defaultTaskComment1); - ScreenshotUtils.resizeBrowser(new Dimension(1500, 600)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "adhoc-first-task"); - defaultExpressTaskPage.clickOK(); - - // approval task of adhoc - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - menuPage = new MainMenuPage(); - taskWidget = menuPage.openTaskList(); - taskWidget.openTask(defaultTaskName2); - - defaultExpressTaskPage = new DefaultExpressTaskPage(); - defaultExpressTaskPage.enterTextToDefaultTask(defaultTaskComment2); - ScreenshotUtils.resizeBrowser(new Dimension(1500, 1000)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "adhoc-finish"); - defaultExpressTaskPage.clickOK(); - - showNewDashboard(); - homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - menuPage = new MainMenuPage(); - taskWidget = menuPage.openTaskList(); - taskWidget.openTask(mainTask); - - ScreenshotUtils.resizeBrowser(new Dimension(1200, 800)); - taskTemplatePage.closeAdhocHistoryDialog(); - taskTemplatePage.clickActionButton(); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "adhoc-show-history"); - ScreenshotUtils.maximizeBrowser(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(taskTemplatePage.openAdhocHistoryDialog(), - ScreenshotUtils.EXPRESS_FOLDER + "adhoc-process-history", new ScreenshotMargin(20)); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalExpressScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalExpressScreenshotTest.java deleted file mode 100644 index c291b418112..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalExpressScreenshotTest.java +++ /dev/null @@ -1,270 +0,0 @@ -package com.axonivy.portal.selenium.document.screenshot; - -import java.io.IOException; -import java.util.Arrays; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.WebElement; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.FileHelper; -import com.axonivy.portal.selenium.common.ScreenshotBaseTest; -import com.axonivy.portal.selenium.common.ScreenshotMargin; -import com.axonivy.portal.selenium.common.ScreenshotUtils; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.AdminSettingsPage; -import com.axonivy.portal.selenium.page.CaseWidgetPage; -import com.axonivy.portal.selenium.page.ExpressApprovalPage; -import com.axonivy.portal.selenium.page.ExpressBusinessViewPage; -import com.axonivy.portal.selenium.page.ExpressFormDefinitionPage; -import com.axonivy.portal.selenium.page.ExpressManagementPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; -import com.axonivy.portal.selenium.page.ExpressReviewPage; -import com.axonivy.portal.selenium.page.ExpressTaskPage; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.ProcessWidgetPage; -import com.axonivy.portal.selenium.page.UserTaskWithMailFormPage; -import com.codeborne.selenide.SelenideElement; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -@IvyWebTest -public class PortalExpressScreenshotTest extends ScreenshotBaseTest { - - private static final int USER_TASK_INDEX = 0; - private static final int USER_TASK_WITH_EMAIL_INDEX = 1; - private static final int INFORMATION_EMAIL_INDEX = 2; - public static final String REQUEST_NEW_RESOURCE_PROCESS = "Request new Resources - Express process"; - public static final String FIRST_COMMENT = "This is great news"; - public static final String SECOND_COMMENT = "I totally agree"; - - @Override - @BeforeEach - public void setup() { - super.setup(); - redirectToRelativeLink(createTestingTasksUrl); - login(TestAccount.ADMIN_USER); - showNewDashboard(); - } - - @Test - public void screenshotStartCreateExpressWorkflow() throws IOException { - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - - MainMenuPage mainMenuPage = new MainMenuPage(); - mainMenuPage.expandMainMenu(); - ScreenshotUtils.resizeBrowser(new Dimension(1400, 800)); - ScreenshotUtils.executeDecorateJs("highlightShowAllProcesses()"); - ScreenshotUtils.captureHalfLeftPageScreenShot(ScreenshotUtils.EXPRESS_FOLDER + "navigate-to-axon-ivy-express"); - - mainMenuPage.closeMainMenu(); - ProcessWidgetPage processWidget = mainMenuPage.openProcessList(); - processWidget.waitUtilProcessWidgetDisplayed(); - - ScreenshotUtils.executeDecorateJs("highlightCreateExpressWorkflow()"); - ScreenshotUtils.captureHalfTopPageScreenShot(ScreenshotUtils.EXPRESS_FOLDER + "start-link-for-axon-ivy-express", - new Dimension(1100, 1000)); - - ExpressProcessPage expressProcessPage = processWidget.openExpressPage(); - ScreenshotUtils.resizeBrowser(new Dimension(1100, 800)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "express-workflow-process-properties"); - - ScreenshotUtils.executeDecorateJs("highlightExpressTaskResponsible(0)"); - WebElement taskStep1 = expressProcessPage.getDefineTaskStep(0); - ScreenshotUtils.captureElementScreenshot(taskStep1, ScreenshotUtils.EXPRESS_FOLDER + "express-able-to-start"); - expressProcessPage.fillProcessProperties(true, true, "Request new resources process", "Request description"); - - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Request resource", "Task request description", - Arrays.asList(responsible1)); - ScreenshotUtils.resizeBrowser(new Dimension(1100, 1200)); - refreshPage(); - expressProcessPage.waitUntilExpressProcessDisplay(); - expressProcessPage.addNewTask(0); - - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - - expressProcessPage.createTask(1, USER_TASK_WITH_EMAIL_INDEX, "Approval request", "Approval request description", - Arrays.asList(responsible2)); - ScreenshotUtils.executeDecorateJs("highlightExpressTaskResponsible(1)"); - WebElement taskStep2 = expressProcessPage.getDefineTaskStep(1); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(taskStep2, - ScreenshotUtils.EXPRESS_FOLDER + "express-task-responsible", new ScreenshotMargin(20, 20, 0, 20)); - - refreshPage(); - ScreenshotUtils.resizeBrowser(new Dimension(1100, 1100)); - expressProcessPage.waitUntilExpressProcessDisplay(); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "define-express-workflow-process-steps"); - - ScreenshotUtils.resizeBrowser(new Dimension(1100, 1100)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinitionDefaultResolution(); - formDefinition.createUploadComponent("Upload"); - formDefinition.countElementPrepareToDrag(1); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "express-workflow-dialog-editor"); - - - showNewDashboard(); - mainMenuPage = new MainMenuPage(); - processWidget = mainMenuPage.openProcessList(); - - ScreenshotUtils.resizeBrowser(new Dimension(1400, 1200)); - processWidget.openExpressPage(); - expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Request new resources process", "Request description"); - - responsible1 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - expressProcessPage.createTask(0, USER_TASK_INDEX, "Request resource", "Task request description", - Arrays.asList(responsible1)); - - expressProcessPage.addNewTask(0); - expressProcessPage.createTask(1, INFORMATION_EMAIL_INDEX, null, null, null); - ExpressFormDefinitionPage expressFormDefinition = expressProcessPage.goToFormDefinitionDefaultResolution(); - expressFormDefinition.nextStep(); - expressFormDefinition.waitForEmailEditorDisplayed(); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "express-workflow-email-editor"); - } - - @Test - public void screenshotExpressManagement() throws IOException { - ScreenshotUtils.resizeBrowser(new Dimension(1200, 800)); - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - - AdminSettingsPage adminSettingsPage = homePage.openAdminSettings(); - adminSettingsPage.openExpressManagementTab(); - ScreenshotUtils.executeDecorateJs("highlightManagementExpressTab()"); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "express-management-tab"); - - refreshPage(); - ExpressManagementPage expressManagementPage = adminSettingsPage.openExpressManagementTab(); - expressManagementPage.openImportDialog(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(expressManagementPage.getImportExpressDialog(), - ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "import-selection", new ScreenshotMargin(40)); - expressManagementPage.selectJSONFile(FileHelper.getAbsolutePathToTestFile("express-test.json")); - - ScreenshotUtils.executeDecorateJs("highlightDeployExpress()"); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(expressManagementPage.getImportExpressDialog(), - ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "import-deployment", new ScreenshotMargin(40)); - - expressManagementPage.clickOnDeployExpress(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(expressManagementPage.getImportExpressDialog(), - ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "deployment-result", new ScreenshotMargin(40)); - - expressManagementPage.clickOnCloseButton(); - expressManagementPage.clickOnSelectAllExpresses(); - ScreenshotUtils.executeDecorateJs("highlightExportExpress()"); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(adminSettingsPage.getAdminSettingContainer(), - ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "express-export-tab", new ScreenshotMargin(60)); - - ScreenshotUtils.executeDecorateJs("cleanHighlightExportExpress()"); - expressManagementPage.clickOnExportButton(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(expressManagementPage.getExportExpressDialog(), - ScreenshotUtils.EXPRESS_MANAGEMENT_FOLDER + "export-list-summary", new ScreenshotMargin(60)); - - ScreenshotUtils.maximizeBrowser(); - refreshPage(); - - expressManagementPage = adminSettingsPage.openExpressManagementTab(); - expressManagementPage.openImportDialog(); - expressManagementPage.selectJSONFile(FileHelper.getAbsolutePathToTestFile("express-wf-request-resource.json")); - expressManagementPage.clickOnDeployExpress(); - expressManagementPage.clickOnCloseButton(); - - MainMenuPage mainMenu = new MainMenuPage(); - ProcessWidgetPage processWidget = mainMenu.openProcessList(); - processWidget.waitForStartListShow(); - processWidget.startProcessByName(REQUEST_NEW_RESOURCE_PROCESS); - ScreenshotUtils.resizeBrowser(new Dimension(1920, 1080)); - completeExpressWorkflowTasks(FIRST_COMMENT, SECOND_COMMENT); - - ScreenshotUtils.resizeBrowser(new Dimension(1050, 600)); - showNewDashboard(); - homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - mainMenu = new MainMenuPage(); - CaseWidgetPage caseWidgetPage = mainMenu.openCaseList(); - SelenideElement actionMenu = caseWidgetPage.openActionStepMenu(0); - ScreenshotUtils.executeDecorateJs("highlightShowAdditionalLink()"); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "express-case"); - - caseWidgetPage.openAdditionalCaseDetails(actionMenu); - caseWidgetPage.switchLastBrowserTab(); - - ScreenshotUtils.resizeBrowser(new Dimension(1050, 1000)); - ExpressBusinessViewPage expressBusinessView = new ExpressBusinessViewPage(); - expressBusinessView.clickOnLegendOfFieldset(1); - expressBusinessView.clickOnLegendOfFieldset(2); - expressBusinessView.clickTaskTitle(); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.EXPRESS_FOLDER + "express-business-summary"); - } - - public void completeExpressWorkflowTasks(String firstComment, String secondComment) { - executePromoteResourceTask(); - - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - - homePage.selectTaskWidget("Your Tasks").openTask("Send email to HR"); - executeSendEmailTask(); - - homePage.selectTaskWidget("Your Tasks").openTask("HR review"); - executeReviewTask(); - - homePage.selectTaskWidget("Your Tasks").openTask("Approval Request"); - executeApprovalTask(firstComment); - - homePage.selectTaskWidget("Your Tasks").openTask("Approval Request"); - executeApprovalTask(secondComment); - - homePage.selectTaskWidget("Your Tasks").openTask("Request new Resources - Express process: Final Review"); - executeFinalReviewTask(); - } - - public void executePromoteResourceTask() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Applicant name", "David Rafi"); - expressTaskPage.enterRequiredInputFieldByLabel("Email", "David@email.com"); - expressTaskPage.enterRequiredInputFieldByLabel("Address", "39b Truong Son, Tan Binh"); - expressTaskPage.finish(); - } - - private void executeSendEmailTask() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Welcome", "Welcome Mr.David to axon"); - expressTaskPage.enterRequiredInputFieldByLabel("Start date", "01/09/2023 10:35"); - - UserTaskWithMailFormPage userTaskWithMail = new UserTaskWithMailFormPage(); - userTaskWithMail.selectEmailTab(); - userTaskWithMail.inputData("hr@email.com", "Please review this applicant", "Hello HR team, please proceed."); - userTaskWithMail.finish(); - } - - private void executeReviewTask() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Comment", "Mr.David to axon"); - expressTaskPage.enterRequiredInputFieldByLabel("Approval date", "01/09/2023 10:35"); - expressTaskPage.finish(); - } - - private void executeApprovalTask(String comment) { - ExpressApprovalPage expressApproval = new ExpressApprovalPage(); - expressApproval.waitForCommentContainerDisplay(); - expressApproval.comment(comment); - expressApproval.clickOnApprove(); - } - - private void executeFinalReviewTask() { - ExpressReviewPage expressReview = new ExpressReviewPage(); - expressReview.finish(); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdhocPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdhocPage.java deleted file mode 100644 index e9e15d7b396..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdhocPage.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Condition.disappear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.SelenideElement; - -public class AdhocPage extends TaskIFrameTemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='main-area-panel']"; - } - - public void enterSubject(String subject) { - $("[id='form:defined-tasks-list:0:default-task-name']").sendKeys(subject); - } - - public void addResponsible(String fullname) { - $("[id$=':default-task-responsible-link']").click(); - $("[id='choose-responsible-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - $("[id='assignee-selection-form:user-selection-component:user-selection_input']").sendKeys(fullname); - SelenideElement panel = $("[id='assignee-selection-form:user-selection-component:user-selection_panel']") - .shouldBe(appear, DEFAULT_TIMEOUT); - panel.click(); - panel.shouldBe(disappear, DEFAULT_TIMEOUT); - $("[id='assignee-selection-form:add-assignee-button']").shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - $$(".ui-panelgrid-cell.assignee-name-col").shouldHave(CollectionCondition.size(1), DEFAULT_TIMEOUT); - $("[id='assignee-selection-form:save-assignee-button']").shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - $("[id='choose-responsible-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public void addTask() { - waitForElementClickableThenClick($("[id$=':add-step-button']")); - } - - public void addComment(String comment) { - findElementByCssSelector("*[id$='" + ":comments']").sendKeys(comment); - } - - public void startWorkflow() { - waitForElementClickableThenClick($("[id='form:save']")); - $("[id='form:save']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public TaskWidgetPage send() { - waitForElementClickableThenClick($("*[id$='" + ":send']")); - return new TaskWidgetPage(); - } - - public void addDescription(String description) { - $("[id$=':input-text-area']").sendKeys(description); - $("[id='form:ok-btn']").click(); - $("[id='form:ok-btn']").shouldBe(disappear, DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdminSettingsPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdminSettingsPage.java index fb655bdace4..bda89abb789 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdminSettingsPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AdminSettingsPage.java @@ -104,13 +104,6 @@ public AnnouncementPage openAnnouncementTab() { return new AnnouncementPage(); } - public ExpressManagementPage openExpressManagementTab() { - waitForElementClickableThenClick( - $(By.xpath(("//a[@href='#admin-setting-component:adminTabView:express-management-tab']")))); - waitForElementPresent(By.id("admin-setting-component:adminTabView:express-management-tab"), true); - return new ExpressManagementPage(); - } - public RoleManagementPage openRoleManagementTab() { waitForElementDisplayed(By.cssSelector("[id$='admin-setting-component:adminTabView']"), true); waitForElementClickableThenClick("a[href='#admin-setting-component:adminTabView:role-management-tab']"); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java index 466fe8117ac..eba786e3fb3 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java @@ -676,14 +676,6 @@ public void clickRelatedTaskActionButton(String taskName) { waitForElementDisplayed(By.cssSelector(actionPanel), true); } - public ExpressProcessPage addAdHocTask(int index) { - String commandButton = - String.format("[id$='task-widget:related-tasks:%d:additional-options:task-additional-actions']", index); - waitForElementDisplayed(By.cssSelector(commandButton), true); - findElementByCssSelector(commandButton).click(); - return new ExpressProcessPage(); - } - public int getTaskRowIndexFromDetailPage(String taskName) { List taskNames = $$(".task-name-value"); int taskIndex = IntStream.range(0, taskNames.size()).filter(i -> taskNames.get(i).getText().equals(taskName)) diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetPage.java index cd167086bfa..d9b50c8f574 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetPage.java @@ -1,7 +1,6 @@ package com.axonivy.portal.selenium.page; import static com.codeborne.selenide.Condition.appear; - import static com.codeborne.selenide.Condition.disappear; import static com.codeborne.selenide.Condition.text; import static com.codeborne.selenide.Selenide.$; @@ -435,11 +434,6 @@ public SelenideElement openActionStepMenu(int index) { return $(menuPanelSelector).shouldBe(appear, DEFAULT_TIMEOUT); } - public void openAdditionalCaseDetails(SelenideElement actionMenu) { - actionMenu.$("[id$=':show-additional-case-details-link']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - } - public SelenideElement getSaveFilterDialog() { $(By.id(caseWidgetId + ":filter-save-action")).shouldBe(getClickableCondition()).click(); $(By.id(caseWidgetId + ":filter-save-form:save-filter-set-name-input")).shouldBe(Condition.visible, diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ChatPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ChatPage.java index 69707066a97..d266508dda6 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ChatPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ChatPage.java @@ -17,7 +17,7 @@ import com.codeborne.selenide.ElementsCollection; import com.codeborne.selenide.SelenideElement; -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; +import ch.ivyteam.ivy.project.portal.test.Responsible; public class ChatPage extends TemplatePage { @@ -34,9 +34,9 @@ public void openFirstGroupChat() { } } - public void addUserToChatGroup(List responsibles) { + public void addUserToChatGroup(List responsibles) { waitForElementDisplayed(By.id("chat-assignee-dialog"), true); - for (ExpressResponsible responsible : responsibles) { + for (Responsible responsible : responsibles) { chooseResponsible(responsible.getResponsibleName(), responsible.getIsGroup()); } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpresTaskPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpresTaskPage.java deleted file mode 100644 index 2e87d840a01..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpresTaskPage.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Selenide.$; - -import org.openqa.selenium.By; - -public class DefaultExpresTaskPage extends TaskIFrameTemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='form:cancel-btn']"; - } - - public void enterTextToDefaultTask(String text) { - var textArea = findElementByCssSelector("#form\\:user-task-dyna-form textarea[id$='input-text-area']"); - textArea.clear(); - textArea.sendKeys(text); - var textAreaId = textArea.getAttribute(ID_PROPERTY); - textAreaId.replace(":", "\\\\:"); - } - - public void finishDefaultTask() { - waitForElementClickableThenClick($(By.id("form:ok-btn"))); - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpressTaskPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpressTaskPage.java deleted file mode 100644 index 4f488571e89..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DefaultExpressTaskPage.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; - -public class DefaultExpressTaskPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='form:cancel-btn']"; - } - - public void enterTextToDefaultTask(String text) { - var textArea = $("[id='form:user-task-dyna-form']").shouldBe(appear, DEFAULT_TIMEOUT) - .$("textarea[id$=':input-text-area']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT); - textArea.clear(); - textArea.sendKeys(text); - } - - public void clickOK() { - $("[id='form:ok-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressApprovalPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressApprovalPage.java deleted file mode 100644 index 4ec6902225a..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressApprovalPage.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; - -import com.axonivy.portal.selenium.common.WaitHelper; - -public class ExpressApprovalPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='form']"; - } - - public void approve() { - WaitHelper.waitForNavigation(() -> clickOnApprove()); - - } - - public void clickOnApprove() { - $("button[id$='approve-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public void reject() { - WaitHelper.waitForNavigation( - () -> $("[id='form:refuse-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); - } - - public void waitForCommentContainerDisplay() { - $(".approval-comment-container").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void comment(String comment) { - $("textarea[id$='comment']").shouldBe(appear, DEFAULT_TIMEOUT).clear(); - $("textarea[id$='comment']").click(); - $("textarea[id$='comment']").sendKeys(comment); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressBusinessViewPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressBusinessViewPage.java deleted file mode 100644 index eb878776ccf..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressBusinessViewPage.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; - -import java.util.stream.Collectors; - -import org.openqa.selenium.WebElement; - -import com.axonivy.portal.selenium.common.WaitHelper; -import com.codeborne.selenide.SelenideElement; - -public class ExpressBusinessViewPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='express-view-form']"; - } - - public SelenideElement getEmptyFinishedTask() { - return $("[id$='express-view-form:empty-finished-tasks-container']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public String getEmptyFinishedTaskMessage() { - return getEmptyFinishedTask().$(".no-item-header").shouldBe(appear, DEFAULT_TIMEOUT).getText(); - } - - public void clickOnCloseButton() { - WaitHelper.waitForNavigation( - () -> $("[id$='express-view-form:cancel-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); - } - - public SelenideElement getLegendFisnishedTaskFieldset(int index) { - return $( - String.format("span[id$=':finished-tasks-component:approval-result:%d:finished-task-fieldset-legend']", index)) - .shouldBe(appear, DEFAULT_TIMEOUT); - } - - public String getTextOfLegendFinishedTask(int index) { - return getLegendFisnishedTaskFieldset(index).getText(); - } - - public String getTextOfLegendApprovalResult(int index) { - return $(String.format("span[id$=':approval-result-container:0:approval-result-fieldset-legend']", index)) - .shouldBe(appear, DEFAULT_TIMEOUT).getText(); - } - - public void clickOnLegendOfFieldset(int index) { - getLegendFisnishedTaskFieldset(index).shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public String getApprovalResultsText() { - return $(".approval-result-content").shouldBe(appear, DEFAULT_TIMEOUT) - .$$("tbody[id$=':approval-result-table_data'] td").asFixedIterable().stream().map(WebElement::getText) - .collect(Collectors.joining(",")); - } - - public Integer getIndexOfCurrentProcessChain() { - SelenideElement processChainContainer = - $("[id$='process-chain-component:process-chain-component-id']").shouldBe(appear, DEFAULT_TIMEOUT); - - for (var step : processChainContainer.$$("div[id^='process-chain-component:step-info-']")) { - if (step.getAttribute(CLASS_PROPERTY).contains("current")) { - String stepId = step.getAttribute("id"); - return Integer.valueOf(stepId.replace("process-chain-component:step-info-", "").trim()).intValue(); - } - } - return 0; - } - - public void clickTaskTitle() { - $("[id='task-template-title']").should(appear, DEFAULT_TIMEOUT).click(); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressEndPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressEndPage.java deleted file mode 100644 index 696e8a087e4..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressEndPage.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import org.openqa.selenium.By; - -public class ExpressEndPage extends TemplatePage { - @Override - protected String getLoadedLocator() { - return "[id$='form:close-button']"; - } - - public void finish() { - waitForElementClickableThenClick(By.id("form:close-button")); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressFormDefinitionPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressFormDefinitionPage.java deleted file mode 100644 index c294d24e996..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressFormDefinitionPage.java +++ /dev/null @@ -1,240 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import java.util.Random; - -import org.openqa.selenium.By; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Action; -import org.openqa.selenium.interactions.Actions; - -import com.axonivy.portal.selenium.common.WaitHelper; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; -import com.codeborne.selenide.WebDriverRunner; - -public class ExpressFormDefinitionPage extends TemplatePage { - - private static final String LEFT_POSITION = "leftpanel"; - private static final String RIGHT_POSITION = "rightpanel"; - private static final String HEADER_POSITION = "header"; - private static final String FOOTER_POSITION = "footer"; - private static final String[] POSITIONS = {LEFT_POSITION, HEADER_POSITION, FOOTER_POSITION}; - - @Override - protected String getLoadedLocator() { - return "[id='form:create-tabs']"; - } - - public void createUploadComponent(String label) { - clickOnFormCreationTabIndex(5); - $("input[id$='form:create-tabs:file-upload-label']").sendKeys(label); - $("[id='form:create-tabs:add-upload-file-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("input[id$='form:create-tabs:file-upload-label']").shouldBe(Condition.empty); - } - - public void moveAllElementToDragAndDrogPanel() { - int size = $$(By.xpath("//div[@id='form:available-form-elements_content']/ul/li")).size(); - long startIndex = size - 1; - - for (long i = startIndex; i >= 0; i--) { - String panelSelector = "[id='" + String.format("form:available-form-elements:%d:pnl", i) + "']"; - $(panelSelector).shouldBe(appear, DEFAULT_TIMEOUT); - - if (i == startIndex) { - moveFormElementToPanel(i, RIGHT_POSITION); - } else { - moveFormElementToPanel(i, getRandomPosition()); - } - $$(panelSelector).shouldBe(CollectionCondition.empty); - } - } - - public void countElementPrepareToDrag(int size) { - $$(By.xpath("//div[@id='form:available-form-elements_content']/ul/li")).shouldBe(CollectionCondition.size(size), - DEFAULT_TIMEOUT); - } - - private void moveFormElementToPanel(long index, String position) { - // TODO Need to be fixed - Workaround for scroll-bar issue - JavascriptExecutor jse = (JavascriptExecutor) WebDriverRunner.getWebDriver(); - jse.executeScript("window.scrollTo(0, document.body.scrollHeight);"); - - var formElementSelector = String.format("[id$='form:available-form-elements:%d:pnl_content']", index); - // If elements is FileUpload, move to footer - if (formElementIsFileUpload($(formElementSelector).shouldBe(appear, DEFAULT_TIMEOUT))) { - position = FOOTER_POSITION; - } - - var panelSelector = String.format("[id='form:selected-form-elements-%s-panel']", position); - - Actions builder = new Actions(WebDriverRunner.getWebDriver()); - Action moveProcessSequence = builder.dragAndDrop($(formElementSelector), $(panelSelector)).build(); - moveProcessSequence.perform(); - } - - private boolean formElementIsFileUpload(WebElement formElement) { - WebElement icon = formElement.findElement(By.tagName("img")); - return icon.getAttribute("src").contains("FileUpload"); - } - - private String getRandomPosition() { - int idx = new Random().nextInt(POSITIONS.length); - return (POSITIONS[idx]); - } - - public void nextStep() { - $("[id='next-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public void waitForEmailEditorDisplayed() { - $("[id='form:information-email:email-container']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public WebElement getPageElement() { - return $(".portal-layout-container").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void executeWorkflow() { - waitForElementClickableThenClick(By.id("execute-button")); - waitForElementDisplayed(By.id("form:dynaform-fieldset"), true); - } - - public void createTextInputField(String label, int inputFieldTypeIndex, boolean isRequired) { - waitForElementClickableThenClick(By.xpath("//*[@id='form:create-tabs']/ul/li[@role='tab'][1]")); - waitForElementDisplayed(By.id("form:create-tabs:create-input-field-tab"), true); - $(By.id("form:create-tabs:input-field-label")).sendKeys(label); - chooseInputFieldType(inputFieldTypeIndex); - if (isRequired) { - waitForElementClickableThenClick(By.cssSelector("div[id='form:create-tabs:input-field-required']")); - } - waitForElementClickableThenClick(By.id("form:create-tabs:add-input-text-btn")); - } - - private void chooseInputFieldType(int inputTypeIndex) { - waitForElementClickableThenClick(By.id("form:create-tabs:input-field-type_label")); - waitForElementDisplayed(By.id("form:create-tabs:input-field-type_panel"), true); - waitForElementClickableThenClick(By.id(String.format("form:create-tabs:input-field-type_%d", inputTypeIndex))); - } - - public void finishWorkflow() { - waitForElementClickableThenClick(By.id("finish-button")); - new NewDashboardPage().isDisplayed(); - } - - public NewDashboardPage save() { - waitForElementClickableThenClick(By.id("save-button")); - return new NewDashboardPage(); - } - - public NewDashboardPage cancel() { - waitForElementClickableThenClick(By.id("cancel-button")); - waitForElementDisplayed(By.id("yes-button"), true); - waitForElementClickableThenClick(By.id("yes-button")); - return new NewDashboardPage(); - } - - public void createRadioButtonField(String label, int numberOfOption) { - clickOnFormCreationTabIndex(4); - waitForElementDisplayed(By.id("form:create-tabs:one-radio-label"), true); - addRadioOptions(numberOfOption); - $("input[id$='form:create-tabs:one-radio-label']").sendKeys(label); - waitForElementClickableThenClick(By.id("form:create-tabs:add-radio-btn")); - $("input[id$='form:create-tabs:one-radio-label']").shouldBe(Condition.empty); - } - - private void addRadioOptions(int numberOfOptions) { - for (int i = 1; i <= numberOfOptions; i++) { - waitForElementClickableThenClick(By.id("form:create-tabs:one-radio-options:add-radio-option-btn")); - $(By.xpath(String.format("//*[@id='form:create-tabs:one-radio-options_data']/tr[%d]/td/input", i))) - .sendKeys("Radio " + i); - } - } - - public void createCheckboxField(String label, int numberOfSelection) { - clickOnFormCreationTabIndex(3); - waitForElementDisplayed(By.id("form:create-tabs:many-checkbox-options"), true); - $("input[id='form:create-tabs:many-checkbox-label']").sendKeys(label); - addCheckboxOptions(numberOfSelection); - waitForElementClickableThenClick(By.id("form:create-tabs:add-checkbox-btn")); - $("input[id='form:create-tabs:many-checkbox-label']").shouldBe(Condition.empty); - } - - private void addCheckboxOptions(int numberOfSelection) { - for (int i = 1; i <= numberOfSelection; i++) { - waitForElementClickableThenClick(By.id("form:create-tabs:many-checkbox-options:add-checkbox-option-btn")); - $(By.xpath(String.format("//*[@id='form:create-tabs:many-checkbox-options_data']/tr[%d]/td/input", i))) - .sendKeys("Option " + i); - } - } - - public void createTextAreaField(String label, boolean isRequired) { - clickOnFormCreationTabIndex(2); - waitForElementDisplayed(By.id("form:create-tabs:create-input-area-tab"), true); - $(By.id("form:create-tabs:input-area-label")).sendKeys(label); - if (isRequired) { - waitForElementClickableThenClick(By.cssSelector("div[id='form:create-tabs:input-area-required']")); - } - waitForElementClickableThenClick(By.id("form:create-tabs:add-text-area-btn")); - $(By.id("form:create-tabs:input-area-label")).shouldBe(Condition.empty); - } - - public void createCheckboxFieldWithDataProvider(String label) { - fillDataForCheckboxProvider(label); - waitForElementClickableThenClick(By.id("form:create-tabs:add-checkbox-btn")); - $(By.id("form:create-tabs:many-checkbox-label")).shouldBe(Condition.empty); - } - - public void fillDataForCheckboxProvider(String label) { - clickOnFormCreationTabIndex(3); - waitForElementDisplayed(By.id("form:create-tabs:create-many-checkbox-tab"), true); - waitForElementClickableThenClick(By.id("form:create-tabs:DataProvider_label")); - waitForElementClickableThenClick(By.xpath("//*[@data-label='TestDataProviderForPortalExpress']")); - waitForElementDisplayed(By.cssSelector("div[id$='value-checkbox-label']"), false); - waitForElementDisplayed(By.id("form:create-tabs:many-checkbox-label"), true); - $(By.id("form:create-tabs:many-checkbox-label")).sendKeys(label); - } - - public int countNumberOfElementsInPreviewDialog() { - waitForElementClickableThenClick(By.id("form:show-preview-button")); - waitForElementDisplayed(By.id("form:preview-dialog"), true); - WebElement previewDialog = findElementById("form:preview-dialog"); - int numberOfInput = previewDialog.findElements(By.xpath("//table[@id='form:dyna-form']//input")).size(); - int numberOfTextArea = previewDialog.findElements(By.xpath("//table[@id='form:dyna-form']//textarea")).size(); - int numberOfUploadFile = - previewDialog.findElements(By.xpath("//div[contains(@id,'fileUploadComponent:document-table')]")).size(); - return numberOfInput + numberOfTextArea + numberOfUploadFile; - } - - public int countNumberOfSteps() { - return driver.findElements(By.xpath("//div[@id='defined-task-container']//button")).size(); - } - - public void inputMailRecipient(String content) { - findElementById("form:information-email:email-recipients").sendKeys(content); - } - - public void inputMailSubject(String content) { - findElementById("form:information-email:email-subject").sendKeys(content); - } - - public void inputMailContent(String content) { - ((JavascriptExecutor) WebDriverRunner.getWebDriver()).executeScript( - "document.querySelector(\"input[name='form:information-email:email-content_input'\").value='" + content + "';"); - } - - public void executeWorkflowAndWaitForUserTaskWithEmailDisplay() { - waitForElementClickableThenClick(By.id("execute-button")); - waitForElementDisplayed(By.id("task-form:task-view:dyna-form-fieldset"), true); - } - - private void clickOnFormCreationTabIndex(int tabIndex) { - WaitHelper.waitForActionComplete("#form\\:create-tabs ul", () -> waitForElementClickableThenClick( - By.xpath("//*[@id='form:create-tabs']/ul/li[@role='tab'][" + tabIndex + "]"))); - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressManagementPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressManagementPage.java deleted file mode 100644 index 06185d7730b..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressManagementPage.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Condition.disappear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import org.openqa.selenium.WebElement; - -import com.codeborne.selenide.CollectionCondition; - -public class ExpressManagementPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='admin-setting-component:adminTabView:express-management-component:express-management-form']"; - } - - public void openImportDialog() { - $("button[id$=':express-management-form:import-express-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - $("[id$=':import-express-form:express-process-upload_label']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public WebElement getImportExpressDialog() { - return $("[id$=':express-management-component:import-express-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void selectJSONFile(String pathToFile) { - $("*[id$=':express-process-upload_input']").sendKeys(pathToFile); - $$(".ui-fileupload-upload").shouldBe(CollectionCondition.size(1), DEFAULT_TIMEOUT); - } - - public void clickOnDeployExpress() { - $("[id='admin-setting-component:adminTabView:express-management-component:import-express-dialog']") - .$(".ui-fileupload-upload").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='admin-setting-component:adminTabView:express-management-component:import-express-form:impress-export-output'] pre.express-import-result") - .shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void clickOnCloseButton() { - $("*[id$=':close-import-express']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='admin-setting-component:adminTabView:express-management-component:import-express-dialog']") - .shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public void clickOnSelectAllExpresses() { - $("[id='admin-setting-component:adminTabView:express-management-component:express-management-form:express-workflow-summary-table_head_checkbox']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public void clickOnExportButton() { - $("[id$=':express-management-component:express-management-form:export-express-btn']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='admin-setting-component:adminTabView:express-management-component:export-express-dialog']").shouldBe(appear, - DEFAULT_TIMEOUT); - } - - public WebElement getExportExpressDialog() { - return $("[id$=':express-management-component:export-express-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressProcessPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressProcessPage.java deleted file mode 100644 index 9750a4903df..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressProcessPage.java +++ /dev/null @@ -1,191 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Condition.disappear; -import static com.codeborne.selenide.Selenide.$; - -import java.util.List; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.WebElement; - -import com.axonivy.portal.selenium.common.ScreenshotUtils; -import com.codeborne.selenide.Condition; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -public class ExpressProcessPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='form:process-setting-fieldset']"; - } - - public void createDefaultTask(int taskIndex, String taskName, List responsibles) { - if (taskName != null) { - $("[id='" + String.format("form:defined-tasks-list:%d:default-task-name", taskIndex) + "']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).sendKeys(taskName); - } - $("[id='" + String.format("form:defined-tasks-list:%d:default-task-responsible-link", taskIndex) + "']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - addResponsible(responsibles); - } - - private void addResponsible(List responsibles) { - $("[id='choose-responsible-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - for (ExpressResponsible responsible : responsibles) { - chooseResponsible(responsible.getResponsibleName(), responsible.getIsGroup()); - } - $("[id='assignee-selection-form:save-assignee-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='choose-responsible-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - private void chooseResponsible(String responsible, boolean isGroup) { - if (isGroup) { - $("label[for='assignee-selection-form:assignee-type:1']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - $("[id='assignee-selection-form:role-selection-component:role-selection_input']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).clear(); - $("[id='assignee-selection-form:role-selection-component:role-selection_input']").sendKeys(responsible); - $("[id='assignee-selection-form:role-selection-component:role-selection_panel']").shouldBe(appear, - DEFAULT_TIMEOUT); - $("span[id='assignee-selection-form:role-selection-component:role-selection_panel'] .gravatar") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("span[id='assignee-selection-form:role-selection-component:role-selection_panel'] .gravatar") - .shouldBe(disappear, DEFAULT_TIMEOUT); - } else { - $("[id='assignee-selection-form:user-selection-component:user-selection_input']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).clear(); - $("[id='assignee-selection-form:user-selection-component:user-selection_input']").sendKeys(responsible); - $("[id='assignee-selection-form:user-selection-component:user-selection_panel']").shouldBe(appear, - DEFAULT_TIMEOUT); - $("span[id='assignee-selection-form:user-selection-component:user-selection_panel'] .gravatar") - .shouldBe(appear, DEFAULT_TIMEOUT).click(); - $("span[id='assignee-selection-form:user-selection-component:user-selection_panel'] .gravatar") - .shouldBe(disappear, DEFAULT_TIMEOUT); - } - - $("[id='assignee-selection-form:add-assignee-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $(".assignee-name-col").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void addNewTask(int currentTaskIndex) { - $("[id='" + String.format("form:defined-tasks-list:%d:add-step-button", currentTaskIndex) + "']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='" + String.format("form:defined-tasks-list:%d:process-flow-field", currentTaskIndex + 1) + "']") - .shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void clickSave() { - $("[id='form:save']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT); - clickByJavaScript($("[id='form:save']")); - $("[id='form:save']").shouldBe(Condition.disappear, DEFAULT_TIMEOUT); - } - - public ExpressFormDefinitionPage goToFormDefinition() { - goToFormDefinitionDefaultResolution(); - ScreenshotUtils.resizeBrowser(new Dimension(2560, 1440)); - return new ExpressFormDefinitionPage(); - } - - public ExpressFormDefinitionPage goToFormDefinitionDefaultResolution() { - clickSave(); - return new ExpressFormDefinitionPage(); - } - - public WebElement getDefineTaskStep(int stepIndex) { - String defineTaskStepId = String.format(":defined-tasks-list:%s:process-flow-field", stepIndex); - return $("[id$='" + defineTaskStepId + "']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void fillProcessProperties(boolean isAdhocWF, boolean isCreateOwn, String processName, - String processDescription) { - if (isAdhocWF) { - $("div[id='form:process-type']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("span[id='form:process-type-group']").$(".switch-active").shouldBe(Condition.text("One time"), DEFAULT_TIMEOUT); - } - - if (!isCreateOwn) { - $("div[id='form:user-interface-type']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - agreeToDeleteAllDefineTasks(); - - } - $("[id='form:process-name']").shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(processName); - $("[id='form:process-description']").shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(processDescription); - } - - private void agreeToDeleteAllDefineTasks() { - $("[id='delete-all-defined-tasks-warning']").shouldBe(appear, DEFAULT_TIMEOUT); - $("[id='delete-all-defined-tasks-warning-ok']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='delete-all-defined-tasks-warning']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public void createTask(int taskIndex, int typeIndex, String taskName, String taskDescription, - List responsibles) { - final String TASK_NAME_FORMAT = "input[id$='%d:task-name']"; - final int INFORMATION_EMAIL_INDEX = 2; - - chooseTaskType(taskIndex, typeIndex); - if (typeIndex != INFORMATION_EMAIL_INDEX) { - $("[id='" + String.format("form:defined-tasks-list:%d:task-responsible-link", taskIndex) + "']") - .shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - $("[id='choose-responsible-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - addResponsible(responsibles); - - $(String.format(TASK_NAME_FORMAT, taskIndex)).shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(taskName); - $(String.format("input[id$='%d:task-description']", taskIndex)).shouldBe(appear, DEFAULT_TIMEOUT) - .sendKeys(taskDescription); - } - } - - private void chooseTaskType(int taskIndex, int typeIndex) { - if (typeIndex == 0) { - // If the selected task type is already task type? ignore click on the drop-down - return; - } - - final String TASK_TYPE_FORMAT = "li[id$=':%d:task-type_%d']"; - final String TASK_TYPE_LABEL_FORMAT = "span[id$=':%d:task-type_label']"; - - $(String.format(TASK_TYPE_LABEL_FORMAT, taskIndex)).shouldBe(appear, DEFAULT_TIMEOUT) - .shouldBe(getClickableCondition()).click(); - $(String.format("[id$=':%d:task-type_panel']", taskIndex)).shouldBe(appear, DEFAULT_TIMEOUT); - $(String.format(TASK_TYPE_FORMAT, taskIndex, typeIndex)).shouldBe(appear, DEFAULT_TIMEOUT) - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public void waitUntilExpressProcessDisplay() { - $("[id='form:process-setting-fieldset']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public String getProcessName() { - return findElementById("form:process-name").getAttribute("value"); - } - - public String getProcessOwnerNames() { - return findElementById("form:process-owner-link").getText(); - } - - public String getAbleToStartNames() { - return getResponsiblesOfTask(0); - } - - public String getResponsiblesOfTask(int taskIndex) { - return findElementById(String.format("form:defined-tasks-list:%d:task-responsible-link", taskIndex)).getText(); - } - - public void executeDirectly() { - waitForElementClickableThenClick("[id$='form:save']"); - } - - public NewDashboardPage cancelWorkflowDefinition() { - waitForElementClickableThenClick(By.id("form:cancel-workflow-button")); - return new NewDashboardPage(); - } - - public void fillProcessOwners(List responsibles) { - waitForElementClickableThenClick(By.id("form:process-owner-link")); - addResponsible(responsibles); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressReviewPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressReviewPage.java deleted file mode 100644 index f330a392b46..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressReviewPage.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import java.util.stream.Collectors; - -import com.axonivy.portal.selenium.common.WaitHelper; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; -import com.codeborne.selenide.ElementsCollection; -import com.codeborne.selenide.SelenideElement; - -public class ExpressReviewPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='form:acknowledged']"; - } - - public void finish() { - WaitHelper.waitForNavigation( - () -> $("button[id$='acknowledged']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); - } - - public void clickOnOkButton() { - WaitHelper.waitForNavigation( - () -> $("button[id$='close-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); - } - - public String getApprovalResult() { - $$("fieldset[id *= ':approval-result-fieldset'] .ui-icon-plusthick").asFixedIterable().forEach(elem -> { - elem.shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - elem.ancestor("fieldset").$(".ui-fieldset-content").shouldBe(appear, DEFAULT_TIMEOUT); - }); - $$("div[id*='approval-result'] td").shouldBe(CollectionCondition.sizeGreaterThanOrEqual(1), DEFAULT_TIMEOUT).get(0) - .shouldNotHave(Condition.empty, DEFAULT_TIMEOUT); - return $$("div[id*='approval-result'] td").asFixedIterable().stream().map(SelenideElement::getText) - .collect(Collectors.joining(",")); - } - - public void checkApprovalResult() { - $$("fieldset[id *= ':approval-result-fieldset'] .ui-icon-plusthick").asFixedIterable().forEach(elem -> { - elem.shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - elem.ancestor("fieldset").$(".ui-fieldset-content").shouldBe(appear, DEFAULT_TIMEOUT); - }); - $$("div[id*='approval-result'] td").shouldBe(CollectionCondition.sizeGreaterThanOrEqual(1), DEFAULT_TIMEOUT).get(0) - .shouldNotHave(Condition.empty, DEFAULT_TIMEOUT); - } - - public ElementsCollection getApprovalResults(int index) { - return $( - "[id$='form:finished-tasks-component:approval-result:1:approval-result-component:approval-result-container:" - + index + ":approval-result-fieldset']").shouldBe(appear, DEFAULT_TIMEOUT).$$("tr.ui-widget-content"); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressTaskPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressTaskPage.java deleted file mode 100644 index 244b840af72..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ExpressTaskPage.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; - -import org.openqa.selenium.By; - -import com.codeborne.selenide.SelenideElement; - -public class ExpressTaskPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return ".task-template-container"; - } - - public SelenideElement findExpressTask() { - return $(".js-task-header-container").shouldBe(appear, DEFAULT_TIMEOUT).$("div[id='task-template-title']"); - } - - public void waitForExpressFieldSetDisplay() { - $(".express-fieldset").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void enterRequiredInputFieldByLabel(String label, String data) { - $(String.format("input[data-p-rmsg*='%s']", label)).shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(data); - } - - public void finish() { - $("[id='form:ok-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public boolean isDocumentTableVisible() { - return isElementPresent(By.xpath("//div[contains(@id, 'fileUploadComponent:document-table')]")); - } - - public boolean isDocumentUploadButtonVisible() { - return isElementPresent(By.xpath("//div[contains(@id, 'fileUploadComponent:document-upload')]")); - } - - public void clickTaskActionMenu() { - clickByJavaScript($("button[id$='horizontal-task-actions']")); - waitForElementDisplayed(By.cssSelector("[id$=':horizontal-task-action-menu']"), true); - } - - public void clickChatGroup() { - $("a[id$='chat-group']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - public void clickCreateGroupChatBtn() { - waitForElementDisplayed(By.id("chat-assignee-selection-form:chat-group-create-button"), true); - waitForElementClickableThenClick(By.id("chat-assignee-selection-form:chat-group-create-button")); - waitForElementDisplayed(By.id("chat-assignee-selection-form:chat-group-create-button"), false); - } - - public void joinProcessChatAlreadyCreated() { - waitForElementDisplayed(By.id("chat-group-join-form:chat-group-join-button"), true); - waitForElementClickableThenClick($(By.id("chat-group-join-form:chat-group-join-button"))); - waitForElementDisplayed(By.id("chat-form:group-chat-container"), true); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/GlobalSearchResultPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/GlobalSearchResultPage.java index acc376a1e0b..4f8646a99cf 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/GlobalSearchResultPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/GlobalSearchResultPage.java @@ -6,18 +6,12 @@ import static com.codeborne.selenide.Selenide.$$; import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; import com.codeborne.selenide.Condition; import com.codeborne.selenide.SelenideElement; public class GlobalSearchResultPage extends TemplatePage { - private final String INFO_EXPRESS_WORKFlOW = "span[id$='info-workflow']"; - private final String EDIT_EXPRESS_WORKFlOW = "a[id$='edit-express-workflow']"; - private final String DELETE_EXPRESS_WORKFlOW = "a[id$='delete-express-workflow']"; - private final String EXPRESS_PROCESS_LOGO = "span[id$='express-process-logo']"; - @Override protected String getLoadedLocator() { return "#search-results-tabview"; @@ -135,56 +129,6 @@ private ProcessWidgetPage getProcessWidget() { return new ProcessWidgetPage("search-results-tabview:process-results"); } - public boolean isInfoWorkflowIcon() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement icon = $(".express-workflow").$(".process-image-view-icon"); - return icon.getAttribute("class").contains("si si si-startup-launch"); - } - - WebElement element = findElementByCssSelector(INFO_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-information-circle"); - } - - public boolean isEditExpressWorkflow(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:edit-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(EDIT_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-graphic-tablet-drawing-pen"); - } - - private SelenideElement getImageProcessActionMenuPanel(String processName) { - var selectedProcess = $$("span.process-image-view-name").asFixedIterable().stream() - .filter(process -> processName.equalsIgnoreCase(process.getText())).findFirst().orElse(null); - var processActionMenuId = selectedProcess.getAttribute(ID_PROPERTY).replace("process-item-name", ""); - processActionMenuId = processActionMenuId.concat("process-item:image-process-action-component:process-action-menu"); - return findElementByCssSelector(String.format("div[id$='%s']", processActionMenuId)); - } - - public boolean isDeleteExpressWorkflown(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:delete-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(DELETE_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-bin-1"); - } - - public boolean isExpressProcessLogo() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - return isInfoWorkflowIcon(); - } - SelenideElement element = findElementByCssSelector(EXPRESS_PROCESS_LOGO); - return element.getAttribute("class").contains("si-startup-launch"); - } - public boolean isTaskCategoryColumnDisplayed() { return findElementByCssSelector("span[id$=':task-category-cell']").isDisplayed(); } @@ -198,10 +142,6 @@ public void waitForFirstTabFinishedLoading() { waitForElementDisplayed(By.className("js-process-start-list-container"), true); } - public void clickOnActionButton(String processName) { - $(".express-workflow").$("button[id$=':process-action-button']").shouldBe(getClickableCondition()).click(); - } - public void caseTabShouldBeDisappear() { $("li[class*='case-tab-title']").shouldBe(disappear, DEFAULT_TIMEOUT); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java index 31fd86824e2..90b12800086 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java @@ -197,14 +197,6 @@ public SelenideElement getFilterTextfield() { return $("[id='process-widget:process-search:non-ajax-keyword-filter']").shouldBe(appear, DEFAULT_TIMEOUT); } - public ExpressProcessPage openExpressPage() { - WaitHelper.waitForNavigation(() -> { - clickByJavaScript( - $("[id='process-widget:create-express-workflow']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT)); - }); - return new ExpressProcessPage(); - } - public void startProcessByName(String processName) { WaitHelper.waitForNavigation(() -> getProcessItem(processName).$("[id$=':start-button']") .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); @@ -442,41 +434,4 @@ private void loadLiveSearchTextField() { liveSearchTextField = findElementById(processWidgetId + ":process-search:non-ajax-keyword-filter"); } - public ExpressProcessPage editExpressWF(String wfName) { - int numberOfRefesh = 5; - for (int i = 0; i < numberOfRefesh; i++) { - waitForElementDisplayed(By.id(processWidgetId + ":process-search:non-ajax-keyword-filter"), true); - enterSearchKeyword(wfName); - if (isImageModeActivated()) { - SelenideElement processForm = $("form.image-view-form.is-express"); - var processFormID = processForm.getAttribute("id"); - waitForElementClickableThenClick( - "[id$='" + processFormID + ":image-process-action-component:process-action-button']"); - waitForElementDisplayed(By.cssSelector(".process-action-menu.ui-connected-overlay-enter-done"), true); - if (isElementDisplayed( - By.cssSelector("div[id$='" + processFormID + ":image-process-action-component:process-action-menu']"))) { - SelenideElement actionMenu = - $("div[id$='" + processFormID + ":image-process-action-component:process-action-menu']"); - SelenideElement icon = actionMenu.$("a[id$=':process-item:image-process-action-component:edit-process']"); - icon.click(); - waitForElementDisplayed(By.cssSelector("[id$='process-widget:edit-process-dialog']"), true); - waitForElementClickableThenClick("a[id$='process-widget:edit-process-form:edit-express-workflow']"); - break; - } - } else { - if (isElementDisplayed(By.cssSelector("[id$='edit-express-workflow']"))) { - waitForElementClickableThenClick($("[id$='edit-express-workflow']")); - break; - } - } - - // refresh(); - } - return new ExpressProcessPage(); - } - - public boolean hasCreateNewExpressWorkflowLink() { - return isElementPresent(By.id("process-widget:create-express-workflow")); - } - } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java index a07214807b2..16659e1eb8f 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java @@ -1,20 +1,13 @@ package com.axonivy.portal.selenium.page; import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; import com.codeborne.selenide.SelenideElement; public class SearchResultPage extends TemplatePage { - private final String INFO_EXPRESS_WORKFlOW = "span[id$='info-workflow']"; - private final String EDIT_EXPRESS_WORKFlOW = "a[id$='edit-express-workflow']"; - private final String DELETE_EXPRESS_WORKFlOW = "a[id$='delete-express-workflow']"; - private final String EXPRESS_PROCESS_LOGO = "span[id$='express-process-logo']"; - @Override protected String getLoadedLocator() { return "[id$='search-results-tabview']"; @@ -84,56 +77,6 @@ private ProcessWidgetPage getProcessWidget() { return new ProcessWidgetPage("search-results-tabview:process-results"); } - public boolean isInfoWorkflowIcon() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement icon = $(".express-workflow").$(".process-image-view-icon"); - return icon.getAttribute("class").contains("si si si-startup-launch"); - } - - WebElement element = findElementByCssSelector(INFO_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-information-circle"); - } - - public boolean isEditExpressWorkflow(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:edit-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(EDIT_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-graphic-tablet-drawing-pen"); - } - - private SelenideElement getImageProcessActionMenuPanel(String processName) { - var selectedProcess = $$("span.process-image-view-name").asFixedIterable().stream() - .filter(process -> processName.equalsIgnoreCase(process.getText())).findFirst().orElse(null); - var processActionMenuId = selectedProcess.getAttribute(ID_PROPERTY).replace("process-item-name", ""); - processActionMenuId = processActionMenuId.concat("process-item:image-process-action-component:process-action-menu"); - return findElementByCssSelector(String.format("div[id$='%s']", processActionMenuId)); - } - - public boolean isDeleteExpressWorkflown(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:delete-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(DELETE_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-bin-1"); - } - - public boolean isExpressProcessLogo() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - return isInfoWorkflowIcon(); - } - SelenideElement element = findElementByCssSelector(EXPRESS_PROCESS_LOGO); - return element.getAttribute("class").contains("si-startup-launch"); - } - public boolean isTaskCategoryColumnDisplayed() { return findElementByCssSelector("span[id$=':task-category-cell']").isDisplayed(); } @@ -147,8 +90,4 @@ public void waitForFirstTabFinishedLoading() { waitForElementDisplayed(By.className("js-loading-process-list"), false); waitForElementDisplayed(By.className("js-process-start-list-container"), true); } - - public void clickOnActionButton(String processName) { - $(".express-workflow").$("button[id$=':process-action-button']").shouldBe(getClickableCondition()).click(); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskIFrameTemplatePage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskIFrameTemplatePage.java index 81a48ba7e75..8f3a6c72b31 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskIFrameTemplatePage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskIFrameTemplatePage.java @@ -20,7 +20,6 @@ import com.codeborne.selenide.WebDriverRunner; public class TaskIFrameTemplatePage extends TemplatePage { - private static final String ADHOC_HISTORY_TABLE_CSS_SELECTOR = "div[id*='adhoc-task-history-table'] table>tbody>tr"; @Override protected String getLoadedLocator() { @@ -80,29 +79,6 @@ public void clickActionButton() { $("div[id$='horizontal-task-action-form:horizontal-task-action-menu']").shouldBe(appear, DEFAULT_TIMEOUT); } - public void clickOnStartAdhocLink() { - $("div[id$='horizontal-task-action-form:horizontal-task-action-menu']").$("a[id$='start-adhoc']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-reset-confirmation-dialog_content']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void clickAdhocOkButton() { - $("button[id$='start-adhoc-ok-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-reset-confirmation-dialog_content']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public void closeAdhocHistoryDialog() { - $("button[id$='close-adhoc-dialog-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-history-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public WebElement openAdhocHistoryDialog() { - clickActionButton(); - $("[id='horizontal-task-action-form:show-adhoc-history']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - return $("div[id$='adhoc-task-history-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } - // moved public void clickChatGroup() { $("a[id$='chat-group']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); @@ -270,50 +246,6 @@ public void clickOnCancelButton() { switchBackToParent(); } - public void clickAdhocCreationButton() { - clickTaskActionMenu(); - clickOnStartAdhocLink(); - } - - public boolean isShowAdhocHistoryBtnNotExist() { - String adhocHistoryBtnCSSSelection = "a[id$='show-adhoc-history']"; - return !$(By.cssSelector(adhocHistoryBtnCSSSelection)).exists(); - } - - public boolean isStartAdhocBtnNotExist() { - String startAdhocBtnCSSSelection = "a[id$='start-adhoc']"; - return !$(By.cssSelector(startAdhocBtnCSSSelection)).exists(); - } - - public boolean isAdhocHistoryDialogExistWhenOpenTaskFirstTime() { - return findElementByCssSelector("div[id$='adhoc-task-history-dialog']").isDisplayed(); - } - - public SelenideElement getAdhocHistoryDialog() { - return $("div[id$='adhoc-task-history-dialog']"); - } - - public void clickShowAdhocHistoryBtn() { - waitForElementClickableThenClick("#horizontal-task-actions"); - waitForElementDisplayed(By.cssSelector("a[id$='show-adhoc-history']"), true); - waitForElementClickableThenClick("a[id$='show-adhoc-history']"); - } - - public String getAdhocCreationMessage() { - String adhocCreationMessageCSSSelector = "div[id$='adhoc-creation-message']"; - return findDisplayedElementByCssSelector(adhocCreationMessageCSSSelector).getText(); - } - - public String getTaskNameOfAdhocHistoryRow(int index) { - SelenideElement elem = $$(By.cssSelector(ADHOC_HISTORY_TABLE_CSS_SELECTOR)).get(index); - return elem.findAll(By.xpath("td")).get(2).getText(); - } - - public String getCommentOfAdhocHistoryRow(int index) { - SelenideElement elem = $$(By.cssSelector(ADHOC_HISTORY_TABLE_CSS_SELECTOR)).get(index); - return elem.findAll(By.xpath("td")).get(3).getText(); - } - // moved public void joinProcessChatAlreadyCreated() { waitForElementDisplayed(By.id("chat-group-join-form:chat-group-join-button"), true); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskTemplatePage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskTemplatePage.java index d256fbb13ca..ed6d5053718 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskTemplatePage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskTemplatePage.java @@ -18,7 +18,6 @@ import com.codeborne.selenide.SelenideElement; public class TaskTemplatePage extends TemplatePage { - private static final String ADHOC_HISTORY_TABLE_CSS_SELECTOR = "div[id*='adhoc-task-history-table'] table>tbody>tr"; @Override protected String getLoadedLocator() { @@ -75,29 +74,6 @@ public void clickActionButton() { $("div[id$='horizontal-task-action-form:horizontal-task-action-menu']").shouldBe(appear, DEFAULT_TIMEOUT); } - public void clickOnStartAdhocLink() { - $("div[id$='horizontal-task-action-form:horizontal-task-action-menu']").$("a[id$='start-adhoc']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-reset-confirmation-dialog_content']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void clickAdhocOkButton() { - $("button[id$='start-adhoc-ok-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-reset-confirmation-dialog_content']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public void closeAdhocHistoryDialog() { - $("button[id$='close-adhoc-dialog-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='adhoc-task-history-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); - } - - public WebElement openAdhocHistoryDialog() { - clickActionButton(); - $("[id='horizontal-task-action-form:show-adhoc-history']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - return $("div[id$='adhoc-task-history-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } - // moved public void clickChatGroup() { $("a[id$='chat-group']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); @@ -260,50 +236,6 @@ public void clickOnSubmitButton() { switchBackToParent(); } - public void clickAdhocCreationButton() { - clickTaskActionMenu(); - clickOnStartAdhocLink(); - } - - public boolean isShowAdhocHistoryBtnNotExist() { - String adhocHistoryBtnCSSSelection = "a[id$='show-adhoc-history']"; - return !$(By.cssSelector(adhocHistoryBtnCSSSelection)).exists(); - } - - public boolean isStartAdhocBtnNotExist() { - String startAdhocBtnCSSSelection = "a[id$='start-adhoc']"; - return !$(By.cssSelector(startAdhocBtnCSSSelection)).exists(); - } - - public boolean isAdhocHistoryDialogExistWhenOpenTaskFirstTime() { - return findElementByCssSelector("div[id$='adhoc-task-history-dialog']").isDisplayed(); - } - - public SelenideElement getAdhocHistoryDialog() { - return $("div[id$='adhoc-task-history-dialog']"); - } - - public void clickShowAdhocHistoryBtn() { - waitForElementClickableThenClick("#horizontal-task-actions"); - waitForElementDisplayed(By.cssSelector("a[id$='show-adhoc-history']"), true); - waitForElementClickableThenClick("a[id$='show-adhoc-history']"); - } - - public String getAdhocCreationMessage() { - String adhocCreationMessageCSSSelector = "div[id$='adhoc-creation-message']"; - return findDisplayedElementByCssSelector(adhocCreationMessageCSSSelector).getText(); - } - - public String getTaskNameOfAdhocHistoryRow(int index) { - SelenideElement elem = $$(By.cssSelector(ADHOC_HISTORY_TABLE_CSS_SELECTOR)).get(index); - return elem.findAll(By.xpath("td")).get(2).getText(); - } - - public String getCommentOfAdhocHistoryRow(int index) { - SelenideElement elem = $$(By.cssSelector(ADHOC_HISTORY_TABLE_CSS_SELECTOR)).get(index); - return elem.findAll(By.xpath("td")).get(3).getText(); - } - // moved public void joinProcessChatAlreadyCreated() { waitForElementDisplayed(By.id("chat-group-join-form:chat-group-join-button"), true); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetPage.java index fccd263b443..9b84ad3b767 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetPage.java @@ -372,12 +372,6 @@ public boolean isActionLinkEnable() { return !$(".action-link").getAttribute("class").contains("ui-state-disabled"); } - public ExpressTaskPage startExpressTask(int index) { - waitTaskAppearThenClick(index); - $(By.id(TASK_ACTION)).shouldBe(appear, DEFAULT_TIMEOUT); - return new ExpressTaskPage(); - } - public TaskIFrameTemplatePage startTaskIFrame(int index) { waitTaskAppearThenClick(index); $(By.id(TASK_ACTION)).shouldBe(appear, DEFAULT_TIMEOUT); @@ -417,10 +411,6 @@ public boolean isTaskReserverDisplayed(boolean expected) { return isTaskActionDisplayed("task-reserve-command", 0, expected); } - public boolean isAdhocSideStepDisplayed(boolean expected) { - return isElementDisplayed(By.cssSelector("a[id$='adhoc-side-step-item']"), expected); - } - public void sideStepMenuOnActionButton(int index) { String actionButton = String.format("[id$='%d\\:task-item\\:task-action\\:additional-options\\:task-side-steps-menu']", index); @@ -761,13 +751,6 @@ public String getTaskListCustomCellValue(int index, String columnId) { return cell.getText(); } - public AdhocPage addAdhoc(int taskIndex) { - waitForElementClickableThenClick("[id$=':task-side-steps-menu']"); - waitForElementClickableThenClick("[id$=':adhoc-side-step-item']"); - waitForElementPresent(By.id(TASK_ACTION), true); - return new AdhocPage(); - } - public void clearFilterInput() { $(KEYWORD_FILTER_SELECTOR_EXPANDED_MODE).click(); $(KEYWORD_FILTER_SELECTOR_EXPANDED_MODE).clear(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/UserTaskWithMailFormPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/UserTaskWithMailFormPage.java deleted file mode 100644 index 70cfefaa09d..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/UserTaskWithMailFormPage.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; - -import org.openqa.selenium.JavascriptExecutor; - -import com.codeborne.selenide.WebDriverRunner; - -public class UserTaskWithMailFormPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return "[id='task-form']"; - } - - public void selectEmailTab() { - $("a[href*='mail-tab']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='information-email:email-content_editor']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void inputData(String recipient, String subject, String content) { - inputRecipient(recipient); - inputSubject(subject); - inputContent(content); - } - - private void inputRecipient(String recipient) { - $("[id='task-form:task-view:information-email:email-recipients']").shouldBe(appear, DEFAULT_TIMEOUT) - .sendKeys(recipient); - } - - private void inputSubject(String content) { - $("[id='task-form:task-view:information-email:email-subject']").shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(content); - } - - private void inputContent(String content) { - JavascriptExecutor jse = (JavascriptExecutor) WebDriverRunner.getWebDriver(); - jse.executeScript( - "document.querySelector(\"input[name='task-form:task-view:information-email:email-content_input'\").value='" - + content + "';"); - } - - public void finish() { - $("[id='task-form:ok-btn']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ChatTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ChatTest.java index c64ec90b423..4223cbb887b 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ChatTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ChatTest.java @@ -13,11 +13,11 @@ import com.axonivy.portal.selenium.common.Variable; import com.axonivy.portal.selenium.common.WaitHelper; import com.axonivy.portal.selenium.page.ChatPage; -import com.axonivy.portal.selenium.page.ExpressTaskPage; import com.axonivy.portal.selenium.page.NewDashboardPage; +import com.axonivy.portal.selenium.page.TaskTemplatePage; import com.axonivy.portal.selenium.page.TaskWidgetPage; -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; +import ch.ivyteam.ivy.project.portal.test.Responsible; @IvyWebTest public class ChatTest extends BaseTest { @@ -39,7 +39,7 @@ public void setup() { @Test public void chatAddGroup() { - ExpressResponsible chatUser1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); + Responsible chatUser1 = setResponsible(TestAccount.ADMIN_USER.getUsername(), false); ChatPage chatPage = enableChatGroup(); createChatGroup(TestAccount.DEMO_USER); joinChatGroupWhichAlreadyHadChatGroup(TestAccount.ADMIN_USER); @@ -52,7 +52,7 @@ public void chatAddGroup() { openNewTabOrWindow(WindowType.WINDOW); launchBrowserAndGotoRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); - ExpressResponsible chatGroupEveryBody = setExpressResponsible("Everybody", true); + Responsible chatGroupEveryBody = setResponsible("Everybody", true); createChatGroup(TestAccount.GUEST_USER, chatUser1, chatGroupEveryBody); login(TestAccount.ADMIN_USER); @@ -121,14 +121,14 @@ public void joinChatGroupAlreadyCreated() { new NewDashboardPage().getChat().isNotificationContactChat(); } - private ChatPage createChatGroup(TestAccount creatorChatGroup, ExpressResponsible... participants) { + private ChatPage createChatGroup(TestAccount creatorChatGroup, Responsible... participants) { redirectToRelativeLink(createTestingCaseUrlForDefaultAdditionalCaseDetails); login(creatorChatGroup); redirectToRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); ChatPage chatPage = new NewDashboardPage().getChat(); // Create chat group via task TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); - ExpressTaskPage taskTemplatePage = taskWidgetPage.startExpressTask(0); + TaskTemplatePage taskTemplatePage = taskWidgetPage.startTask(0); taskTemplatePage.clickTaskActionMenu(); taskTemplatePage.clickChatGroup(); if (participants.length != 0) { @@ -155,7 +155,7 @@ private void joinChatGroupWhichAlreadyHadChatGroup(TestAccount userJoined) { login(userJoined); TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); taskWidgetPage.filterTasksInExpandedModeBy("Sick Leave Request Default Case Details Page"); - ExpressTaskPage taskTemplatePage = taskWidgetPage.startExpressTask(0); + TaskTemplatePage taskTemplatePage = taskWidgetPage.startTask(0); taskTemplatePage.clickTaskActionMenu(); taskTemplatePage.clickChatGroup(); taskTemplatePage.joinProcessChatAlreadyCreated(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DisabledUserTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DisabledUserTest.java index 150cf46e5cc..1f91436141e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DisabledUserTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DisabledUserTest.java @@ -9,17 +9,12 @@ import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.FileHelper; import com.axonivy.portal.selenium.common.NavigationHelper; import com.axonivy.portal.selenium.common.TestAccount; import com.axonivy.portal.selenium.common.WaitHelper; import com.axonivy.portal.selenium.page.AbsencePage; -import com.axonivy.portal.selenium.page.AdminSettingsPage; import com.axonivy.portal.selenium.page.CaseWidgetPage; -import com.axonivy.portal.selenium.page.ExpressManagementPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.ProcessWidgetPage; import com.axonivy.portal.selenium.page.TaskWidgetPage; import com.codeborne.selenide.Condition; @@ -71,24 +66,6 @@ public void testFilterByDisabledUserInCaseCreatorFilter() { } - @Test - public void testExpressWfWithDisabledUser() { - redirectToNewDashBoard(); - AdminSettingsPage adminSettingsPage = new NewDashboardPage().openAdminSettings(); - ExpressManagementPage expressManagementPage = adminSettingsPage.openExpressManagementTab(); - expressManagementPage.openImportDialog(); - expressManagementPage.selectJSONFile(FileHelper.getAbsolutePathToTestFile("express-wf-with-disabled-user.json")); - expressManagementPage.clickOnDeployExpress(); - redirectToRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); - new NewDashboardPage().waitPageLoaded(); - ProcessWidgetPage processPage = NavigationHelper.navigateToProcessList(); - ExpressProcessPage expressPage = processPage.editExpressWF("Test disabled user"); - assertEquals("Test disabled user", expressPage.getProcessName()); - assertTrue(expressPage.getProcessOwnerNames().contains(DISABLED_VISIBILITY_USER_BRIEF_DISPLAY_NAME)); - assertTrue(expressPage.getAbleToStartNames().contains(DISABLED_VISIBILITY_USER_BRIEF_DISPLAY_NAME)); - assertTrue(expressPage.getResponsiblesOfTask(1).contains(DISABLED_VISIBILITY_USER_BRIEF_DISPLAY_NAME)); - } - @Test public void testAbsenceWithDisabledUser() { redirectToRelativeLink(cleanUpAbsencesAndSubstituesLink); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/EnhanceVisibilityTasksForMemberOfRoleTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/EnhanceVisibilityTasksForMemberOfRoleTest.java index 8b001569409..45da35e6fd8 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/EnhanceVisibilityTasksForMemberOfRoleTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/EnhanceVisibilityTasksForMemberOfRoleTest.java @@ -71,7 +71,7 @@ public void testVisibilityTaskInprogress() { assertEquals(countTasksReserved, taskWidgetPageGuest.countTasks().size()); assertFalse(taskWidgetPageGuest.isTaskStartEnabled(0)); assertFalseTaskActionsByTaskState("Reserved", - Arrays.asList("Delegate", "Reset", "Clear expiry", "Add Ad-hoc Task")); + Arrays.asList("Delegate", "Reset", "Clear expiry")); } @Test diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/GlobalGrowlTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/GlobalGrowlTest.java index 37bfdd3e90f..9d3d4d00560 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/GlobalGrowlTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/GlobalGrowlTest.java @@ -2,43 +2,28 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.Arrays; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.openqa.selenium.Dimension; import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; import com.axonivy.portal.selenium.common.DateTimePattern; import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.ScreenshotUtils; import com.axonivy.portal.selenium.common.TestAccount; import com.axonivy.portal.selenium.common.WaitHelper; -import com.axonivy.portal.selenium.page.ExpressFormDefinitionPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; import com.axonivy.portal.selenium.page.GlobalGrowlIframeTemplatePage; -import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.SearchResultPage; import com.axonivy.portal.selenium.page.TaskIFrameTemplatePage; import com.axonivy.portal.selenium.page.TaskWidgetPage; import com.axonivy.portal.selenium.page.TemplatePage; -import com.axonivy.portal.selenium.page.TemplatePage.GlobalSearch; -import com.axonivy.portal.selenium.page.WorkingTaskDialogPage; -import com.axonivy.portal.selenium.page.WorkingTaskDialogPageOfApplicationMenu; import com.codeborne.selenide.Condition; -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - @IvyWebTest public class GlobalGrowlTest extends BaseTest { - private static final String FINISH_MESSAGE = "You have finished the task successfully"; private static final String FINISH_MESSAGE_WITH_DETAILS = "You have finished the task successfully.\nClick here for details."; - private static final String CANCEL_MESSAGE = - "You have cancelled and left the task successfully. You can find the task in the dashboard or your task list."; private static final String CANCEL_MESSAGE_WITH_DETAILS = "You have cancelled and left the task successfully. You can find the task in the dashboard or your task list.\nClick here for details."; private static final String GROWL_STANDARD_MESSAGE_URL = @@ -103,92 +88,6 @@ public void waitForTemplateRender() { WaitHelper.waitForPresenceOfElementLocatedInFrame("[class$='task-template-container']"); } - @Test - public void testSaveExpressFormDefinition() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(false, true, "Test approval", "Test description"); - ExpressFormDefinitionPage formDefinition = configureExpressProcess(expressProcessPage); - NewDashboardPage newDashboardPage = formDefinition.save(); - assertGrowlMessage(newDashboardPage, FINISH_MESSAGE_WITH_DETAILS); - } - - @Test - public void testFinishExpressFormDefinition() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(false, true, "Test approval1", "Test description"); - ExpressFormDefinitionPage formDefinition = configureExpressProcess(expressProcessPage); - formDefinition.finishWorkflow(); - NewDashboardPage newDashboardPage = new NewDashboardPage(); - assertGrowlMessage(newDashboardPage, FINISH_MESSAGE); - } - - @Test - public void testTaskLeft() { - leftTaskWhenClickingOnLogo(); - leftTaskWhenClickingOnMenu(); - leftTaskWhenGlobalSearch(); - leftExpressWorkflowDefinition(); - leftExpressFormDefinition(); - } - - private ExpressFormDefinitionPage configureExpressProcess(ExpressProcessPage expressProcessPage) { - ExpressResponsible responsible = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - expressProcessPage.createTask(0, 0, "Task 1", "Task 1 description", Arrays.asList(responsible)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - ScreenshotUtils.resizeBrowser(new Dimension(2560, 1440)); - formDefinition.createTextInputField("Input Text", 0, false); - formDefinition.countElementPrepareToDrag(1); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - return formDefinition; - } - - private void leftExpressWorkflowDefinition() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - NewDashboardPage newDashboardPage = expressProcessPage.cancelWorkflowDefinition(); - assertGrowlMessage(newDashboardPage, CANCEL_MESSAGE); - } - - private void leftTaskWhenGlobalSearch() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - GlobalSearch globalSearch = expressProcessPage.getGlobalSearch(); - SearchResultPage searchResultPage = globalSearch.inputSearchKeywordForWorkingTask("a"); - assertGrowlMessage(searchResultPage, CANCEL_MESSAGE); - } - - private void leftTaskWhenClickingOnMenu() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - MainMenuPage mainMenuPage = expressProcessPage.openMainMenu(); - WorkingTaskDialogPageOfApplicationMenu leaveTaskDialogOfMenu = mainMenuPage.selectDashboardMenu(); - NewDashboardPage newDashboardPage = leaveTaskDialogOfMenu.leaveTask(); - assertGrowlMessage(newDashboardPage, CANCEL_MESSAGE); - } - - private void leftTaskWhenClickingOnLogo() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.clickOnLogo(); - WorkingTaskDialogPage dialogPage = new WorkingTaskDialogPage(); - NewDashboardPage newDashboardPage = dialogPage.leaveTask(); - assertGrowlMessage(newDashboardPage, CANCEL_MESSAGE); - } - - private void leftExpressFormDefinition() { - redirectToRelativeLink(expressStartLink); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test approval", "Test description"); - expressProcessPage.createTask(0, 0, "Task 1", "Task 1 description", - Arrays.asList(setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false))); - ExpressFormDefinitionPage expressFormDefinitionPage = expressProcessPage.goToFormDefinition(); - NewDashboardPage newDashboardPage = expressFormDefinitionPage.cancel(); - assertGrowlMessage(newDashboardPage, CANCEL_MESSAGE); - } - private void assertGrowlMessage(TemplatePage templatePage, String message) { templatePage.getGlobalGrowlMessage().shouldBe(Condition.text(message)); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java index 42db19d4e92..1fae8251d9e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java @@ -109,7 +109,6 @@ public void testShowHideTaskActions() { assertTrue(taskWidgetPage.isTaskResetDisplayed(false)); assertTrue(taskWidgetPage.isTaskDelegateDisplayed(false)); assertTrue(taskWidgetPage.isTaskReserverDisplayed(false)); - assertTrue(taskWidgetPage.isAdhocSideStepDisplayed(false)); grantTaskActionsPermissions(); taskWidgetPage = NavigationHelper.navigateToTaskList(); @@ -117,7 +116,6 @@ public void testShowHideTaskActions() { assertTrue(taskWidgetPage.isTaskResetDisplayed(true)); assertTrue(taskWidgetPage.isTaskDelegateDisplayed(true)); assertTrue(taskWidgetPage.isTaskReserverDisplayed(true)); - assertTrue(taskWidgetPage.isAdhocSideStepDisplayed(true)); } @Test diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ProcessViewerTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ProcessViewerTest.java index d761564d169..2d7c9197aa3 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ProcessViewerTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ProcessViewerTest.java @@ -6,14 +6,12 @@ import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.TestAccount; import com.axonivy.portal.selenium.common.WaitHelper; import com.axonivy.portal.selenium.page.CaseWidgetPage; import com.axonivy.portal.selenium.page.NewDashboardPage; import com.axonivy.portal.selenium.page.ProcessViewerPage; import com.axonivy.portal.selenium.page.TaskWidgetPage; import com.axonivy.portal.selenium.page.component.ProcessViewerComponentPage; -import com.axonivy.portal.selenium.test.express.ExpressManagementTest; @IvyWebTest public class ProcessViewerTest extends BaseTest { @@ -109,24 +107,6 @@ public void testNotShowProcessViewerForTechnicalCase() { assertTrue(!detailPageSteps.contains(PROCESS_VIEWER), PROCESS_VIEWER_IS_FOUND_ON_CASE_DETAILS_PAGE); } - @Test - public void testNotShowProcessViewerForExpressCase() { - login(TestAccount.ADMIN_USER); - var expressManagementTest = new ExpressManagementTest(); - expressManagementTest.prepareExpressWorkflowStep(); - expressManagementTest.executePromoteResourceTask(); - redirectToRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); - gotoCaseList(); - caseWidgetPage.openActionStepMenu(); - var steps = caseWidgetPage.getAvailableActionSteps(); - assertTrue(!steps.contains(PROCESS_VIEWER), PROCESS_VIEWER_IS_FOUND_IN_CASE_LIST); - - var caseDetailsPage = caseWidgetPage.openDetailsOfCaseHasName("Request new Resources - Express process"); - caseDetailsPage.openActionMenu(); - var detailPageSteps = caseDetailsPage.getAvailableActionSteps(); - assertTrue(!detailPageSteps.contains(PROCESS_VIEWER), PROCESS_VIEWER_IS_FOUND_ON_CASE_DETAILS_PAGE); - } - @Test public void testCanSeeProcessViewerInTaskAction() { createTestingTasks(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ShowRelatedTasksTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ShowRelatedTasksTest.java index bce62f5bbee..76dfd3a6817 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ShowRelatedTasksTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/ShowRelatedTasksTest.java @@ -15,7 +15,7 @@ import com.axonivy.portal.selenium.page.NoteHistoryPage; import com.axonivy.portal.selenium.page.TaskDetailsPage; -@IvyWebTest(headless = false) +@IvyWebTest public class ShowRelatedTasksTest extends BaseTest { private static final String TASK_DETAILS_TITLE = "Task Details - Portal - Axon Ivy"; diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/SideStepTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/SideStepTest.java index cd1e599c5ba..be1a8f53785 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/SideStepTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/SideStepTest.java @@ -6,14 +6,11 @@ import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.AdhocPage; import com.axonivy.portal.selenium.page.CaseWidgetPage; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; import com.axonivy.portal.selenium.page.TaskTemplatePage; import com.axonivy.portal.selenium.page.TaskWidgetPage; -import com.codeborne.selenide.CollectionCondition; @IvyWebTest public class SideStepTest extends BaseTest { @@ -48,28 +45,4 @@ private TaskTemplatePage startATask() { return taskTemplatePage; } - @Test - public void testAddAdhocTask() { - login(TestAccount.ADMIN_USER); - int firstTask = 0; - final String TASK_NAME = "Case Map Leave Request"; - TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(2)); - assertEquals(taskWidgetPage.getNameOfTaskAt(0), TASK_NAME); - AdhocPage adhocPage = taskWidgetPage.addAdhoc(firstTask); - adhocPage.enterSubject("Collect Information"); - adhocPage.addResponsible(TestAccount.DEMO_USER.getFullName()); - adhocPage.startWorkflow(); - adhocPage = new AdhocPage(); - login(TestAccount.DEMO_USER); - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(1)); - assertEquals(taskWidgetPage.getNameOfTaskAt(0), "Collect Information"); - taskWidgetPage.startTask(0); - adhocPage = new AdhocPage(); - adhocPage.addDescription("Annual leaves are available"); - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(1)); - assertEquals(taskWidgetPage.getNameOfTaskAt(0), TASK_NAME); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/UserMenuConfigurationTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/UserMenuConfigurationTest.java index 77c932bc854..34fe41e61b4 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/UserMenuConfigurationTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/UserMenuConfigurationTest.java @@ -6,7 +6,6 @@ import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.ExpressTaskPage; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; import com.axonivy.portal.selenium.page.TaskTemplatePage; @@ -52,18 +51,4 @@ public void testUserMenuIvyProcessStarts() { templatePage.switchToIFrameOfTask(); templatePage.getElementInPortalIFramTask("[id$=':investment-table']").shouldBe(Condition.appear); } - - @Test - public void testUserMenuPortalExpressProcess() { - login(TestAccount.ADMIN_USER); - createJSonFile("custom-user-menu.json", PortalVariable.USER_MENU.key); - createJSonFile("custom-express.json", PortalVariable.EXPRESS_PROCESS.key); - newDashboardPage.waitForAbsencesGrowlMessageDisplay(); - mainMenuPage.openUserSettingMenu(); - UserMenuPage userMenu = new UserMenuPage(); - userMenu.findMenu("Portal Express process").shouldBe(Condition.appear); - userMenu.accessMenu("Portal Express process"); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.findExpressTask().shouldHave(Condition.text("Express user task")); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/caze/CaseDetailsTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/caze/CaseDetailsTest.java index 37c049e9950..35cfef391fd 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/caze/CaseDetailsTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/caze/CaseDetailsTest.java @@ -25,7 +25,6 @@ import com.axonivy.portal.selenium.page.AdditionalCaseDetailsPage; import com.axonivy.portal.selenium.page.CaseDetailsPage; import com.axonivy.portal.selenium.page.CaseWidgetPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; import com.axonivy.portal.selenium.page.NoteHistoryPage; @@ -369,15 +368,6 @@ public void testRelatedTaskOpenWorkflowEvents() { WaitHelper.assertTrueWithWait(() -> detailsPage.isRelatedTaskWorkflowEventsOpened()); } - @Test - public void testRelatedTaskAddAdHocTask() { - createTestingTask(); - detailsPage.clickRelatedTaskActionButton(SICK_LEAVE_REQUEST_TASK); - ExpressProcessPage expressProcessPage = - detailsPage.addAdHocTask(detailsPage.getTaskRowIndex(SICK_LEAVE_REQUEST_TASK)); - assertTrue(expressProcessPage.getProcessName().endsWith(SICK_LEAVE_REQUEST_TASK)); - } - @Test public void testRelatedTaskExportToExcel() { createTestingTask(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java index bd4f0661c52..4ca462b702d 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java @@ -27,7 +27,7 @@ @IvyWebTest public class DashboardProcessWidgetTest extends BaseTest { private static final String YOUR_PROCESSES = "Your Processes"; - private static final String EXPRESS_PROCESS = "EXPRESS_PROCESS"; + private static final String EXTERNAL_LINK = "EXTERNAL_LINK"; private static final String CASE_LEAVE_REQUEST_TEST_FOR_IVYPORTAL_3369 = "Case: Leave Request Test For IVYPORTAL-3369"; private static final String TASK_SICK_LEAVE_REQUEST = "Task: Sick Leave Request"; @@ -530,7 +530,7 @@ public void testFilterCompactModeProcessFilterProcessNameWhenExpanded() { public void testFilterCompactModeProcessFilterProcessType() { newDashboardPage.checkCompactModeProcessDisplayedProcessItem(CREATE_INVESTMENT_IFRAME); - newDashboardPage.applyFilterCompactModeProcessProcessType(EXPRESS_PROCESS); + newDashboardPage.applyFilterCompactModeProcessProcessType(EXTERNAL_LINK); newDashboardPage.checkCompactModeProcessDisappearedProcessItem(CREATE_INVESTMENT_IFRAME); } @@ -540,7 +540,7 @@ public void testFilterCompactModeProcessFilterProcessTypeWhenExpanded() { newDashboardPage.checkCompactModeProcessDisplayedProcessItem(CREATE_INVESTMENT_IFRAME); newDashboardPage.expandCompactModeProcess(); - newDashboardPage.applyFilterCompactModeProcessProcessTypeWhenExpanded(EXPRESS_PROCESS); + newDashboardPage.applyFilterCompactModeProcessProcessTypeWhenExpanded(EXTERNAL_LINK); newDashboardPage.checkCompactModeProcessDisappearedProcessItem(CREATE_INVESTMENT_IFRAME); } @@ -615,7 +615,7 @@ public void testOpenCompactModeProcessStatistic() { newDashboardPage.checkDisplayedCompactModeProcessContainer(); newDashboardPage.openCompactModeProcessInforPanel(); - newDashboardPage.getCompactModeProcessInfoProcessTypes().shouldHave(size(3), DEFAULT_TIMEOUT); + newDashboardPage.getCompactModeProcessInfoProcessTypes().shouldHave(size(2), DEFAULT_TIMEOUT); } @Test @@ -624,7 +624,7 @@ public void testOpenCompactModeProcessStatisticWhenExpanded() { newDashboardPage.expandCompactModeProcess(); newDashboardPage.openCompactModeProcessInforPanelWhenExpanded(); - newDashboardPage.getCompactModeProcessInfoProcessTypesWhenExpanded().shouldHave(size(3), DEFAULT_TIMEOUT); + newDashboardPage.getCompactModeProcessInfoProcessTypesWhenExpanded().shouldHave(size(2), DEFAULT_TIMEOUT); } @Test diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetActionTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetActionTest.java index fece6ed825a..d82c1771c20 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetActionTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetActionTest.java @@ -41,7 +41,6 @@ public class DashboardTaskWidgetActionTest extends BaseTest { static final String CLEAR_EXPIRY = "Clear expiry"; static final String DELEGATE = "Delegate"; static final String RESERVE = "Reserve"; - static final String ADD_AD_HOC_TASK = "Add Ad-hoc Task"; static final String RESET = "Reset"; static final String DESTROY = "Destroy"; static final String WORKFLOW_EVENTS = "Workflow Events"; @@ -76,7 +75,7 @@ public void testVisibilityTaskActionForNormalUser() { removeAllExistingFilter(); taskWidget.applyFilter(); assertTaskActionsByTaskState("Open", - Arrays.asList(DETAILS, DELEGATE, RESERVE, CLEAR_EXPIRY, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, DELEGATE, RESERVE, CLEAR_EXPIRY, PROCESS_VIEWER)); // TaskState : Done <=> TaskBusinessState : Done taskWidget.openFilterWidget(); removeAllExistingFilter(); @@ -99,7 +98,7 @@ public void testVisibilityTaskActionForAdminUser() { removeAllExistingFilter(); taskWidget.applyFilter(); assertTaskActionsByTaskStateAndName(OPEN, "Sick Leave Request", Arrays.asList(DETAILS, DELEGATE, RESERVE, - CLEAR_EXPIRY, DESTROY, TRIGGER_ESCALATION, WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + CLEAR_EXPIRY, DESTROY, TRIGGER_ESCALATION, WORKFLOW_EVENTS, PROCESS_VIEWER)); // Done taskWidget.openFilterWidget(); @@ -113,7 +112,7 @@ public void testVisibilityTaskActionForAdminUser() { removeAllExistingFilter(); taskWidget.applyFilter(); assertTaskActionsByTaskStateAndName(DELAYED, "Task Switch C", - Arrays.asList(DETAILS, DELEGATE, CLEAR_DELAY, DESTROY, WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, DELEGATE, CLEAR_DELAY, DESTROY, WORKFLOW_EVENTS, PROCESS_VIEWER)); // Destroyed taskWidget.openFilterWidget(); @@ -144,7 +143,7 @@ public void testVisibilityTaskActionForInprogressTasks() { taskWidget.removeFilter(0); taskWidget.applyFilter(); assertTaskActionsByTaskState(IN_PROGRESS, Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, DESTROY, - WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + WORKFLOW_EVENTS, PROCESS_VIEWER)); login(TestAccount.DEMO_USER); createTasksForTesting(); @@ -160,7 +159,7 @@ public void testVisibilityTaskActionForInprogressTasks() { taskWidget.removeFilter(1); taskWidget.applyFilter(); assertTaskActionsByTaskState(IN_PROGRESS, - Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER)); } private void filterTaskByNameAndState(String name, String state) { @@ -183,7 +182,7 @@ public void testVisibilityTaskActionForReserveTasks() { // Reserved for admin user assertTaskActionsByTaskState(OPEN, Arrays.asList(DETAILS, DELEGATE, RESET, CLEAR_EXPIRY, DESTROY, - TRIGGER_ESCALATION, WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + TRIGGER_ESCALATION, WORKFLOW_EVENTS, PROCESS_VIEWER)); login(TestAccount.DEMO_USER); createTasksForTesting(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/AdhocExpressTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/AdhocExpressTest.java deleted file mode 100644 index 047c4464183..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/AdhocExpressTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.axonivy.portal.selenium.test.express; - -import java.util.Arrays; -import java.util.List; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.DefaultExpresTaskPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; -import com.axonivy.portal.selenium.page.TaskTemplatePage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; -import com.axonivy.portal.selenium.page.WorkingTaskDialogPage; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -@IvyWebTest -public class AdhocExpressTest extends BaseTest { - - @Override - @BeforeEach - public void setup() { - super.setup(); - redirectToRelativeLink(createTestingTasksUrl); - } - - @Test - public void testAddAdhocForTask() { - String taskNamePrefix = "Maternity"; - String defaultTaskName1 = "Task 1"; - String defaultTaskName2 = "Task 2"; - String defaultTaskComment1 = "good"; - String defaultTaskComment2 = "it's okay"; - - // check if task Maternity exists - TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterTasksInExpandedModeBy(taskNamePrefix, 1); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(1)); - String taskId = taskWidgetPage.getTaskId(); - TaskTemplatePage taskTemplatePage = taskWidgetPage.startTask(0); - - // create adhoc from Maternity task - assertEquals(true, taskTemplatePage.isShowAdhocHistoryBtnNotExist()); - taskTemplatePage.clickAdhocCreationButton(); - assertEquals("You may lose your work in progress and start the Ad-hoc process. Do you want to continue?", - taskTemplatePage.getAdhocCreationMessage()); - taskTemplatePage.clickAdhocOkButton(); - - // create tasks in adhoc page - ExpressProcessPage expressPage = new ExpressProcessPage(); - String processName = expressPage.getProcessName(); - assertTrue(processName.startsWith(String.format("AdHoc Process for Task %s -", taskId))); - ExpressResponsible responsible = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - List responsibles = Arrays.asList(responsible); - expressPage.createDefaultTask(0, defaultTaskName1, responsibles); - expressPage.addNewTask(0); - expressPage.createDefaultTask(1, defaultTaskName2, responsibles); - expressPage.executeDirectly(); - - // first task of adhoc - DefaultExpresTaskPage defaultExpressTaskPage = new DefaultExpresTaskPage(); - defaultExpressTaskPage.enterTextToDefaultTask(defaultTaskComment1); - defaultExpressTaskPage.finishDefaultTask(); - - // approval task of adhoc - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterTasksInExpandedModeBy(defaultTaskName2, 1); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(1)); - taskWidgetPage.startTask(0); - defaultExpressTaskPage = new DefaultExpresTaskPage(); - defaultExpressTaskPage.enterTextToDefaultTask(defaultTaskComment2); - defaultExpressTaskPage.finishDefaultTask(); - - // check if task Maternity task - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterTasksInExpandedModeBy(taskNamePrefix, 1); - taskWidgetPage.countTasks().shouldHave(CollectionCondition.size(1)); - taskWidgetPage.startTask(0); - - // check adhoc history - assertEquals(true, taskTemplatePage.isAdhocHistoryDialogExistWhenOpenTaskFirstTime()); - assertEquals(defaultTaskName2, taskTemplatePage.getTaskNameOfAdhocHistoryRow(0)); - assertEquals(defaultTaskComment2, taskTemplatePage.getCommentOfAdhocHistoryRow(0)); - assertEquals(defaultTaskName1, taskTemplatePage.getTaskNameOfAdhocHistoryRow(1)); - assertEquals(defaultTaskComment1, taskTemplatePage.getCommentOfAdhocHistoryRow(1)); - - // open again by clicking adhoc dialog icon - taskTemplatePage.closeAdhocHistoryDialog(); - taskTemplatePage.clickShowAdhocHistoryBtn(); - taskTemplatePage.getAdhocHistoryDialog().shouldBe(Condition.appear, DEFAULT_TIMEOUT); - taskTemplatePage.closeAdhocHistoryDialog(); - - // open Maternity task again and make sure adhoc history dialog doesn't appear - taskTemplatePage.clickOnLogo(); - WorkingTaskDialogPage dialogPage = new WorkingTaskDialogPage(); - dialogPage.leaveTask(); - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskTemplatePage = taskWidgetPage.startTask(0); - - taskTemplatePage.getAdhocHistoryDialog().shouldBe(Condition.disappear, DEFAULT_TIMEOUT); - - // click adhoc creation button and check warning message - taskTemplatePage.clickAdhocCreationButton(); - assertEquals("There is already an adhoc process for this task, do you want to create another one?", - taskTemplatePage.getAdhocCreationMessage()); - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressManagementTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressManagementTest.java deleted file mode 100644 index 996f3a0fa1d..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressManagementTest.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.axonivy.portal.selenium.test.express; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.time.Duration; -import java.util.Arrays; - -import org.junit.jupiter.api.BeforeEach; -import org.openqa.selenium.support.ui.WebDriverWait; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.FileHelper; -import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.CaseDetailsPage; -import com.axonivy.portal.selenium.page.CaseWidgetPage; -import com.axonivy.portal.selenium.page.ExpressApprovalPage; -import com.axonivy.portal.selenium.page.ExpressReviewPage; -import com.axonivy.portal.selenium.page.ExpressTaskPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.ProcessWidgetPage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; -import com.axonivy.portal.selenium.page.UserTaskWithMailFormPage; -import com.codeborne.selenide.WebDriverRunner; - -@IvyWebTest -public class ExpressManagementTest extends BaseTest { - - public static final String REQUEST_NEW_RESOURCE_PROCESS = "Request new Resources - Express process"; - public static final String FIRST_COMMENT = "This is great news"; - public static final String SECOND_COMMENT = "I totally agree"; - - private NewDashboardPage newDashboardPage; - private ProcessWidgetPage processWidget; - private TaskWidgetPage taskWidgetPage; - - @Override - @BeforeEach - public void setup() { - super.setup(); - login(TestAccount.ADMIN_USER); - this.newDashboardPage = new NewDashboardPage(); - } - - public void prepareExpressWorkflowStep() { - try { - importExpressFile(FileHelper.getAbsolutePathToTestFile("express-wf-request-resource.json")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - startExpressHelperProcess(REQUEST_NEW_RESOURCE_PROCESS); - } - - private void importExpressFile(String pathName) throws UnsupportedEncodingException { - String filepath = URLEncoder.encode(pathName, "UTF-8"); - redirectToRelativeLink( - "PortalKitTestHelper/153CACC26D0D4C3D/createSampleExpressWorkflowProcess.ivp?filePath=" + filepath); - } - - private void startExpressHelperProcess(String processName) { - newDashboardPage = new NewDashboardPage(); - processWidget = NavigationHelper.navigateToProcessList(); - assertTrue(processWidget.isExpandedMode()); - processWidget.enterSearchKeyword(processName); - new WebDriverWait(WebDriverRunner.getWebDriver(), Duration.ofSeconds(30)) - .until((driver) -> processWidget.isProcessDisplay(processName)); - processWidget.startProcess(processName); - } - - public void openAdditionalBusinessPage(String caseName) { - redirectToRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); - newDashboardPage = new NewDashboardPage(); - CaseWidgetPage caseWidgetPage = newDashboardPage.openCaseList(); - CaseDetailsPage caseDetailsPage = caseWidgetPage.openCaseDetailsFromActionMenuByCaseName(caseName); - caseDetailsPage.openActionMenu(); - caseDetailsPage.openAdditionalCaseDetailsPage(); - new WebDriverWait(WebDriverRunner.getWebDriver(), Duration.ofSeconds(30)) - .until((driver) -> newDashboardPage.countBrowserTab() > 1); - newDashboardPage.switchLastBrowserTab(); - } - - public void completeExpressWorkflowTasks(String firstComment, String secondComment) { - executePromoteResourceTask(); - // Filter open Task - gotoTaskList(); - taskWidgetPage.clickOnTaskStatesAndApply(Arrays.asList("Suspended")); - executeSendEmailTask(); - executeReviewTask(); - taskWidgetPage.resetFilter(); - taskWidgetPage.clickOnTaskStatesAndApply(Arrays.asList("Suspended")); - executeApprovalTask(firstComment); - executeApprovalTask(secondComment); - executeFinalReviewTask(); - } - - private void gotoTaskList() { - newDashboardPage = new NewDashboardPage(); - taskWidgetPage = NavigationHelper.navigateToTaskList(); - } - - private void executeFinalReviewTask() { - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.clickOnStartTaskLink(0); - ExpressReviewPage expressReview = new ExpressReviewPage(); - expressReview.finish(); - redirectToRelativeLink(NewDashboardPage.PORTAL_HOME_PAGE_URL); - } - - private void executeApprovalTask(String comment) { - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.clickOnStartTaskLink(0); - ExpressApprovalPage expressApproval = new ExpressApprovalPage(); - expressApproval.waitForCommentContainerDisplay(); - expressApproval.comment(comment); - expressApproval.clickOnApprove(); - } - - private void executeReviewTask() { - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.clickOnStartTaskLink(0); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Comment", "Mr.David to axon"); - expressTaskPage.finish(); - } - - private void executeSendEmailTask() { - taskWidgetPage.clickOnStartTaskLink(0); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Welcome", "Welcome Mr.David to axon"); - - UserTaskWithMailFormPage userTaskWithMail = new UserTaskWithMailFormPage(); - userTaskWithMail.selectEmailTab(); - userTaskWithMail.inputData("hr@email.com", "Please review this applicant", "Hello HR team, please proceed."); - userTaskWithMail.finish(); - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.filterTasksInExpandedModeBy("HR", 1); - taskWidgetPage.waitForActionGroupDisplay(); - } - - public void executePromoteResourceTask() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.waitForExpressFieldSetDisplay(); - expressTaskPage.enterRequiredInputFieldByLabel("Applicant name", "David Rafi"); - expressTaskPage.enterRequiredInputFieldByLabel("Email", "David@email.com"); - expressTaskPage.enterRequiredInputFieldByLabel("Address", "39b Truong Son, Tan Binh"); - expressTaskPage.finish(); - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressTest.java deleted file mode 100644 index 6635c4aaaf4..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/ExpressTest.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.axonivy.portal.selenium.test.express; - -import java.util.Arrays; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.ExpressApprovalPage; -import com.axonivy.portal.selenium.page.ExpressEndPage; -import com.axonivy.portal.selenium.page.ExpressFormDefinitionPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; -import com.axonivy.portal.selenium.page.ExpressReviewPage; -import com.axonivy.portal.selenium.page.ExpressTaskPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; -import com.codeborne.selenide.ElementsCollection; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -@IvyWebTest -public class ExpressTest extends BaseTest { - private static final int USER_TASK_INDEX = 0; - private static final int APPROVAL_INDEX = 3; - - private static final int INPUT_TEXT_TYPE_INDEX = 0; - private static final int INPUT_NUMBER_TYPE_INDEX = 1; - - private NewDashboardPage newDashboardPage; - private TaskWidgetPage taskWidgetPage; - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - - @Override - @BeforeEach - public void setup() { - super.setup(); - newDashboardPage = new NewDashboardPage(); - } - - @Test - public void testAdhocMultiApprovalWhenMultiTask() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test approval", "Test description"); - ExpressFormDefinitionPage formDefinition = configureExpressProcessWhenMultiApproval(expressProcessPage); - formDefinition.executeWorkflow(); - executeExpressProcessWhenMultiApproval(); - } - - @Test - public void testBreadCrumb() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - assertEquals("Express Workflow", expressProcessPage.getTextOfCurrentBreadcrumb()); - - expressProcessPage.fillProcessProperties(true, true, "Test approval", "Test description"); - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", Arrays.asList(responsible1)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - assertEquals("Express Workflow", formDefinition.getTextOfCurrentBreadcrumb()); - - newDashboardPage = formDefinition.goToHomeFromBreadcrumbWithWarning(); - assertEquals(true, newDashboardPage.isDisplayed()); - } - - private ExpressFormDefinitionPage configureExpressProcessWhenMultiApproval(ExpressProcessPage expressProcessPage) { - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", - Arrays.asList(responsible1, responsible2)); - - expressProcessPage.addNewTask(0); - expressProcessPage.createTask(1, APPROVAL_INDEX, "Task 2", "Task 2 description", Arrays.asList(responsible2)); - - expressProcessPage.addNewTask(1); - expressProcessPage.createTask(2, APPROVAL_INDEX, "Task 3", "Task 3 description", - Arrays.asList(responsible1, responsible2)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createTextInputField("Input Text 1", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.createTextInputField("Input Number 2", INPUT_NUMBER_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(2); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - return formDefinition; - } - - private void executeExpressProcessWhenMultiApproval() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - login(TestAccount.ADMIN_USER); - newDashboardPage.waitPageLoaded(); - executeUserTask(); - // work-around so that engine has more time to finish the task (we do not want - // spend too much time on this test) - NavigationHelper.navigateToCaseList(); - login(TestAccount.DEMO_USER); - executeApproval("Approved at first level", TestAccount.DEMO_USER.getFullName()); - executeApproval("Approved at second level", TestAccount.DEMO_USER.getFullName()); - login(TestAccount.ADMIN_USER); - executeApproval("Approved at second level", "Task 3", 1, 0, TestAccount.ADMIN_USER.getFullName()); - login(TestAccount.DEMO_USER); - - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.clearFilterInput(); - taskWidgetPage.startTask(0); - ExpressReviewPage reviewPage = new ExpressReviewPage(); - ElementsCollection task2 = reviewPage.getApprovalResults(0); - assertEquals("Portal Demo User Approved at first level Yes", task2.get(0).getText()); - ElementsCollection task3 = reviewPage.getApprovalResults(1); - assertEquals("Portal Demo User Approved at second level Yes", task3.get(0).getText()); - assertEquals("Portal Admin User Approved at second level Yes", task3.get(1).getText()); - reviewPage.finish(); - new ExpressEndPage().finish(); - } - - private void executeUserTask() { - TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterByResponsible(TestAccount.ADMIN_USER.getFullName()); - taskWidgetPage.startTask(0); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - new TaskWidgetPage(); - } - - private void executeApproval(String comment, String responsible) { - executeApproval(comment, "Task", 1, 0, responsible); - } - - private void executeApproval(String comment, String taskNameFilter, int expectedNumber, int startTaskIndex, - String responsible) { - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterByResponsible(responsible); - taskWidgetPage.filterTasksInExpandedModeBy(taskNameFilter, expectedNumber); - taskWidgetPage.startTask(startTaskIndex); - ExpressApprovalPage approvalPage1 = new ExpressApprovalPage(); - approvalPage1.comment(comment); - approvalPage1.approve(); - } - - private void goToExpressCreationPage() { - redirectToRelativeLink(expressStartLink); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/PortalExpressTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/PortalExpressTest.java deleted file mode 100644 index 19dccccf28c..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/express/PortalExpressTest.java +++ /dev/null @@ -1,519 +0,0 @@ -package com.axonivy.portal.selenium.test.express; - -import static com.codeborne.selenide.Selenide.$; - -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.NavigationHelper; -import com.axonivy.portal.selenium.common.ScreenshotUtils; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.common.WaitHelper; -import com.axonivy.portal.selenium.page.DefaultExpresTaskPage; -import com.axonivy.portal.selenium.page.ExpressApprovalPage; -import com.axonivy.portal.selenium.page.ExpressEndPage; -import com.axonivy.portal.selenium.page.ExpressFormDefinitionPage; -import com.axonivy.portal.selenium.page.ExpressProcessPage; -import com.axonivy.portal.selenium.page.ExpressReviewPage; -import com.axonivy.portal.selenium.page.ExpressTaskPage; -import com.axonivy.portal.selenium.page.GlobalSearchResultPage; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.ProcessWidgetPage; -import com.axonivy.portal.selenium.page.SearchResultPage; -import com.axonivy.portal.selenium.page.TaskTemplatePage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; -import com.axonivy.portal.selenium.page.TemplatePage.GlobalSearch; -import com.axonivy.portal.selenium.page.UserTaskWithMailFormPage; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; - -import ch.ivyteam.ivy.project.portal.test.ExpressResponsible; - -@IvyWebTest -public class PortalExpressTest extends BaseTest { - protected static final int USER_TASK_INDEX = 0; - protected static final int USER_TASK_WITH_EMAIL_INDEX = 1; - protected static final int INFORMATION_EMAIL_INDEX = 2; - protected static final int APPROVAL_INDEX = 3; - - protected static final int INPUT_TEXT_TYPE_INDEX = 0; - protected static final int INPUT_NUMBER_TYPE_INDEX = 1; - protected static final int INPUT_DATE_TYPE_INDEX = 2; - final String testProcessName = "Test approval"; - - protected NewDashboardPage newDashboardPage; - protected ProcessWidgetPage processWidget; - protected TaskWidgetPage taskWidgetPage; - - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - ExpressResponsible groupHr = setExpressResponsible("Human resources department", true); - - - @Override - @BeforeEach - public void setup() { - super.setup(); - redirectToRelativeLink(grantPortalPermission); - newDashboardPage = new NewDashboardPage(); - } - - @Test - public void testOpenProcessWidgetWithoutCreateExpressWorkflowPermission() throws Exception { - String denyAllPermissionsForAdminUserURL = "portalKitTestHelper/14DE09882B540AD5/denyPortalPermission.ivp"; - redirectToRelativeLink(denyAllPermissionsForAdminUserURL); - MainMenuPage mainMenuPage = newDashboardPage.openMainMenu(); - processWidget = mainMenuPage.selectProcessesMenu(); - assertEquals(false, processWidget.hasCreateNewExpressWorkflowLink()); - // run process to grant permission back to normal - String grantAllPermissionsForAdminUserURL = "portalKitTestHelper/14DE09882B540AD5/grantPortalPermission.ivp"; - redirectToRelativeLink(grantAllPermissionsForAdminUserURL); - } - - @Test - public void testCreateDocumentElement() { - goToCreateExpressProcess(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test 1", "Test description"); - - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", Arrays.asList(responsible1)); - - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createUploadComponent("Upload"); - formDefinition.countElementPrepareToDrag(1); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.executeWorkflow(); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - assertTrue(expressTaskPage.isDocumentTableVisible()); - assertTrue(expressTaskPage.isDocumentUploadButtonVisible()); - expressTaskPage.finish(); - } - - @Test - public void createFullElementsOfForm() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test 1", "Test description"); - - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", Arrays.asList(responsible1)); - - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - ScreenshotUtils.resizeBrowser(new Dimension(2560, 1440)); - formDefinition.createTextInputField("Input Text", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.createTextInputField("Input number", INPUT_NUMBER_TYPE_INDEX, true); - formDefinition.createTextInputField("Input date", INPUT_DATE_TYPE_INDEX, true); - formDefinition.createRadioButtonField("Radio", 3); - formDefinition.createUploadComponent("Upload"); - formDefinition.createCheckboxField("Checkbox", 3); - formDefinition.createTextAreaField("Text area", true); - formDefinition.createCheckboxFieldWithDataProvider("Checkbox with data provider"); - formDefinition.countElementPrepareToDrag(8); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - - assertEquals(14, formDefinition.countNumberOfElementsInPreviewDialog()); - $(By.xpath("//label[text()='Data Provider Item 1']")).shouldBe(Condition.exist, DEFAULT_TIMEOUT); - $(By.xpath("//label[text()='Data Provider Item 2']")).shouldBe(Condition.exist, DEFAULT_TIMEOUT); - $(By.xpath("//label[text()='Data Provider Item 3']")).shouldBe(Condition.exist, DEFAULT_TIMEOUT); - } - - @Test - public void createFullTaskType() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test full task type", "Test description"); - - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", - Arrays.asList(responsible1, responsible2)); - - expressProcessPage.addNewTask(0); - expressProcessPage.createTask(1, USER_TASK_WITH_EMAIL_INDEX, "Task 2", "Task 2 description", - Arrays.asList(responsible2)); - - expressProcessPage.addNewTask(1); - expressProcessPage.createTask(2, INFORMATION_EMAIL_INDEX, null, null, null); - - expressProcessPage.addNewTask(2); - expressProcessPage.createTask(3, APPROVAL_INDEX, "Task 4", "Task 4 description", Arrays.asList(responsible1)); - - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - assertEquals(4, formDefinition.countNumberOfSteps()); - } - - @Test - public void testStartFirstTaskIfCreatorIsAssigned() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, "Test 1 Process for creator", - "Test description Process for creator"); - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task for creator", "Task 1 description for creator", - Arrays.asList(responsible2)); - - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createTextInputField("Input Text", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(1); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.executeWorkflow(); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - NewDashboardPage home = new NewDashboardPage(); - assertTrue(home.isDisplayed()); - } - - @Test - public void createUserDefaultProcess() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, false, "Test create default process", "Test description"); - - ExpressResponsible demoResponsible = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - expressProcessPage.createDefaultTask(0, "Default Task", Arrays.asList(demoResponsible)); - expressProcessPage.addNewTask(0); - expressProcessPage.createDefaultTask(1, "Next Default Task", Arrays.asList(demoResponsible)); - WaitHelper.waitForNavigation(() -> { - expressProcessPage.executeDirectly(); - }); - - DefaultExpresTaskPage defaultExpresTaskPage = new DefaultExpresTaskPage(); - defaultExpresTaskPage.enterTextToDefaultTask("Test input"); - defaultExpresTaskPage.finishDefaultTask(); - - taskWidgetPage = new NewDashboardPage().openTaskList(); - taskWidgetPage.filterTasksInExpandedModeBy("Next Default Task"); - taskWidgetPage.startTask(0); - defaultExpresTaskPage = new DefaultExpresTaskPage(); - defaultExpresTaskPage.enterTextToDefaultTask("Comment"); - defaultExpresTaskPage.finishDefaultTask(); - - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.filterTasksInExpandedModeBy("Test create default process: Final Review"); - taskWidgetPage.startTask(0); - - ExpressReviewPage reviewPage = new ExpressReviewPage(); - reviewPage.finish(); - } - - @Test - public void testMultiApprovalWhenMultiTask() { - createAdministratedWorkflow(testProcessName, Arrays.asList(responsible1, groupHr), true); - startExpressProcess(testProcessName); - executeExpressProcessWhenMultiApproval(); - } - - @Test - public void testAbleToStartAdministratedWorkflow() { - createAdministratedWorkflow(testProcessName, Arrays.asList(responsible1, groupHr), false); - // responsible1, groupHr is able to start process - login(TestAccount.ADMIN_USER); - startExpressProcess(testProcessName); - login(TestAccount.HR_ROLE_USER); - startExpressProcess(testProcessName); - // creator is able to start process - login(TestAccount.DEMO_USER); - startExpressProcess(testProcessName); - } - - @Test - public void testUserAdminCanViewEditDeleteProcess() { - createAdministratedWorkflow(testProcessName, Arrays.asList(responsible1, groupHr), false); - login(TestAccount.ADMIN_USER); - newDashboardPage = new NewDashboardPage(); - GlobalSearchResultPage searchResultPage = newDashboardPage.inputGlobalSearchKeyword(testProcessName); - searchResultPage.waitForFirstTabFinishedLoading(); - searchResultPage.clickOnActionButton(testProcessName); - - assertTrue(searchResultPage.isInfoWorkflowIcon()); - assertTrue(searchResultPage.isEditExpressWorkflow(testProcessName)); - assertTrue(searchResultPage.isDeleteExpressWorkflown(testProcessName)); - assertTrue(searchResultPage.isExpressProcessLogo()); - } - - @Test - public void testUserCreatorCanViewEditDeleteProcess() { - createAdministratedWorkflow(testProcessName, Arrays.asList(responsible1, groupHr), false); - newDashboardPage = new NewDashboardPage(); - GlobalSearchResultPage searchResultPage = newDashboardPage.inputGlobalSearchKeyword(testProcessName); - searchResultPage.waitForFirstTabFinishedLoading(); - searchResultPage.clickOnActionButton(testProcessName); - - assertTrue(searchResultPage.isInfoWorkflowIcon()); - assertTrue(searchResultPage.isEditExpressWorkflow(testProcessName)); - assertTrue(searchResultPage.isDeleteExpressWorkflown(testProcessName)); - assertTrue(searchResultPage.isExpressProcessLogo()); - } - - @Test - public void testProcessOwnerCanViewAndEditProcess() { - createAdministratedWorkflow(testProcessName, Arrays.asList(responsible1, groupHr), false); - login(TestAccount.HR_ROLE_USER); - newDashboardPage = new NewDashboardPage(); - GlobalSearchResultPage searchResultPage = newDashboardPage.inputGlobalSearchKeyword(testProcessName); - searchResultPage.waitForFirstTabFinishedLoading(); - - assertTrue(searchResultPage.isInfoWorkflowIcon()); - assertTrue(searchResultPage.isExpressProcessLogo()); - - searchResultPage.clickOnActionButton(testProcessName); - - assertTrue(searchResultPage.isEditExpressWorkflow(testProcessName)); - assertTrue(searchResultPage.isDeleteExpressWorkflown(testProcessName)); - } - - @Test - public void testAbleToStartCanViewProcess() { - login(TestAccount.ADMIN_USER); - createAdministratedWorkflow(testProcessName, Arrays.asList(groupHr), false); - login(TestAccount.DEMO_USER); - newDashboardPage = new NewDashboardPage(); - GlobalSearchResultPage searchResultPage = newDashboardPage.inputGlobalSearchKeyword(testProcessName); - searchResultPage.waitForFirstTabFinishedLoading(); - - assertTrue(searchResultPage.isInfoWorkflowIcon()); - assertTrue(searchResultPage.isExpressProcessLogo()); - } - - @Test - public void testRejectedApprovalWhenMultiTask() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(false, true, testProcessName, "Test description"); - expressProcessPage.fillProcessOwners(Arrays.asList(responsible1, groupHr)); - ExpressFormDefinitionPage formDefinition = configureExpressProcessWhenMultiApproval(expressProcessPage); - formDefinition.finishWorkflow(); - startExpressProcess(testProcessName); - rejectWhenMultiApproval(); - } - - @Test - public void testComplexProcess() { - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(true, true, testProcessName, "Test description"); - ExpressFormDefinitionPage formDefinition = configureComplexProcess(expressProcessPage); - formDefinition.executeWorkflowAndWaitForUserTaskWithEmailDisplay(); - executeComplexProcess(); - } - - protected void goToCreateExpressProcess() { - processWidget = NavigationHelper.navigateToProcessList(); - processWidget.openExpressPage(); - } - - protected void goToExpressCreationPage() { - redirectToRelativeLink(expressStartLink); - } - - private void createAdministratedWorkflow(String expressProcessName, List processOwners, - Boolean isMultiApproved) { - ExpressFormDefinitionPage formDefinition; - goToExpressCreationPage(); - ExpressProcessPage expressProcessPage = new ExpressProcessPage(); - expressProcessPage.fillProcessProperties(false, true, expressProcessName, "Test description"); - expressProcessPage.fillProcessOwners(processOwners); - if (isMultiApproved) { - formDefinition = configureExpressProcessWhenMultiApproval(expressProcessPage); - } else { - formDefinition = configureExpressProcessWhenOneApproval(expressProcessPage); - } - formDefinition.finishWorkflow(); - } - - protected ExpressFormDefinitionPage configureExpressProcessWhenMultiApproval(ExpressProcessPage expressProcessPage) { - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", - Arrays.asList(responsible1, responsible2)); - - expressProcessPage.addNewTask(0); - expressProcessPage.createTask(1, APPROVAL_INDEX, "Task 2", "Task 2 description", Arrays.asList(responsible2)); - - expressProcessPage.addNewTask(1); - expressProcessPage.createTask(2, APPROVAL_INDEX, "Task 3", "Task 3 description", - Arrays.asList(responsible1, responsible2)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createTextInputField("Input Text 1", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.createTextInputField("Input Number 2", INPUT_NUMBER_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(2); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - return formDefinition; - } - - protected ExpressFormDefinitionPage configureExpressProcessWhenOneApproval(ExpressProcessPage expressProcessPage) { - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_INDEX, "Task 1", "Task 1 description", - Arrays.asList(responsible1, responsible2)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createTextInputField("Input Text 1", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.createTextInputField("Input Number 2", INPUT_NUMBER_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(2); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - return formDefinition; - } - - protected void startExpressProcess(String processName) { - newDashboardPage = new NewDashboardPage(); - GlobalSearch globalSearch = newDashboardPage.getGlobalSearch(); - SearchResultPage searchResultPage = globalSearch.inputSearchKeyword(processName); - searchResultPage.waitForFirstTabFinishedLoading(); - searchResultPage.startProcess(processName); - new TaskTemplatePage().isDisplayed(); - } - - protected void executeExpressProcessWhenMultiApproval() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - executeApproval("Approved at first level", 0); - executeApproval("Approved at second level", 0); - login(TestAccount.ADMIN_USER); - executeApproval("Approved at second level", 1, "Task 3", 2); - login(TestAccount.DEMO_USER); - taskWidgetPage = NavigationHelper.navigateToTaskList(); - String approvalResult = executeReview(); - assertEquals( - "Portal Demo User,Approved at first level,Yes," + TestAccount.DEMO_USER.getFullName() - + ",Approved at second level,Yes," + TestAccount.ADMIN_USER.getFullName() + ",Approved at second level,Yes", - approvalResult); - new ExpressEndPage().finish(); - } - - protected void executeApproval(String comment, int taskIndex, String taskNameFilter, int taskCountAfterFiltering) { - taskWidgetPage = NavigationHelper.navigateToTaskList(); - if (taskWidgetPage.countTasks().size() <= taskIndex) { - taskWidgetPage.filterTasksInExpandedModeBy("Task", taskCountAfterFiltering); - } - if (StringUtils.isNotEmpty(taskNameFilter)) { - taskWidgetPage.filterTasksInExpandedModeBy(taskNameFilter, taskCountAfterFiltering); - } - taskWidgetPage.openStateFilter(); - taskWidgetPage.startTask(taskIndex); - ExpressApprovalPage approvalPage1 = new ExpressApprovalPage(); - approvalPage1.comment(comment); - approvalPage1.approve(); - } - - protected void executeApproval(String comment, int taskIndex) { - executeApproval(comment, taskIndex, null, 1); - } - - protected String executeReview() { - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.startTask(0); - ExpressReviewPage reviewPage = new ExpressReviewPage(); - String approvalResult = reviewPage.getApprovalResult(); - reviewPage.finish(); - return approvalResult; - } - - protected void rejectWhenMultiApproval() { - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - new NewDashboardPage().waitPageLoaded(); - TaskWidgetPage taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.countTasks().shouldBe(CollectionCondition.size(1)); - rejectApproval("Rejected at first level"); - String approvalResult = executeReview(); - assertEquals("Portal Demo User,Rejected at first level,No", approvalResult); - new ExpressEndPage().finish(); - } - - protected void rejectApproval(String comment) { - taskWidgetPage = new TaskWidgetPage(); - taskWidgetPage.startTask(0); - ExpressApprovalPage approvalPage1 = new ExpressApprovalPage(); - approvalPage1.comment(comment); - approvalPage1.reject(); - } - - - protected ExpressFormDefinitionPage configureComplexProcess(ExpressProcessPage expressProcessPage) { - ExpressResponsible responsible1 = setExpressResponsible(TestAccount.ADMIN_USER.getUsername(), false); - ExpressResponsible responsible2 = setExpressResponsible(TestAccount.DEMO_USER.getUsername(), false); - - expressProcessPage.createTask(0, USER_TASK_WITH_EMAIL_INDEX, "Task 1", "Task 1 description", - Arrays.asList(responsible2)); - - expressProcessPage.addNewTask(0); - expressProcessPage.createTask(1, APPROVAL_INDEX, "Task 2", "Task 2 description", Arrays.asList(responsible2)); - - expressProcessPage.addNewTask(1); - expressProcessPage.createTask(2, INFORMATION_EMAIL_INDEX, "Task 3", "Task 3 description", - Arrays.asList(responsible1, responsible2)); - expressProcessPage.addNewTask(2); - expressProcessPage.createTask(3, USER_TASK_INDEX, "Task 4", "Task 4 description", Arrays.asList(responsible2)); - ExpressFormDefinitionPage formDefinition = expressProcessPage.goToFormDefinition(); - formDefinition.createTextInputField("Input Text", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(1); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - formDefinition.nextStep(); - formDefinition.inputMailRecipient("wawa@axongroupio.ch"); - formDefinition.inputMailSubject("Information for task 2"); - formDefinition.inputMailContent("Task is finished"); - formDefinition.nextStep(); - formDefinition = new ExpressFormDefinitionPage(); - resizeBrowserTo2kResolution(); - formDefinition.createTextInputField("Input Text 1", INPUT_TEXT_TYPE_INDEX, false); - formDefinition.createTextInputField("Input Number 2", INPUT_NUMBER_TYPE_INDEX, false); - formDefinition.countElementPrepareToDrag(2); - formDefinition.moveAllElementToDragAndDrogPanel(); - formDefinition.countElementPrepareToDrag(0); - return formDefinition; - } - - protected void executeComplexProcess() { - UserTaskWithMailFormPage userTaskWithMailFormPage = new UserTaskWithMailFormPage(); - userTaskWithMailFormPage.waitPageLoaded(); - userTaskWithMailFormPage.selectEmailTab(); - userTaskWithMailFormPage.inputData("wawa@axongroupio.ch", "Task information", "Task is created"); - userTaskWithMailFormPage.finish(); - new NewDashboardPage(); - executeApproval("Approved at first level", 0); - executeUserTask(); - String approvalResult = executeReview("Test approval: Final Review"); - assertEquals("Portal Demo User,Approved at first level,Yes", approvalResult); - new ExpressEndPage().finish(); - } - - protected void executeUserTask() { - taskWidgetPage = new TaskWidgetPage(); - refreshPage(); - taskWidgetPage.countTasks().shouldBe(CollectionCondition.size(1)); - taskWidgetPage.startTask(0); - ExpressTaskPage expressTaskPage = new ExpressTaskPage(); - expressTaskPage.finish(); - taskWidgetPage = new TaskWidgetPage(); - } - - - protected String executeReview(String taskName) { - taskWidgetPage = NavigationHelper.navigateToTaskList(); - taskWidgetPage.filterTasksInExpandedModeBy(taskName); - taskWidgetPage.startTask(0); - ExpressReviewPage reviewPage = new ExpressReviewPage(); - String approvalResult = reviewPage.getApprovalResult(); - reviewPage.finish(); - return approvalResult; - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskActionTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskActionTest.java index 479bed4363c..e459a9b8e66 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskActionTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskActionTest.java @@ -44,7 +44,6 @@ public class TaskActionTest extends BaseTest { private static final String CLEAR_EXPIRY = "Clear expiry"; private static final String DELEGATE = "Delegate"; private static final String RESERVE = "Reserve"; - private static final String ADD_AD_HOC_TASK = "Add Ad-hoc Task"; private static final String RESET = "Reset"; private static final String DESTROY = "Destroy"; private static final String WORKFLOW_EVENTS = "Workflow Events"; @@ -70,14 +69,14 @@ public void testVisibilityTaskActionForNormalUser() { // Suspended assertTaskActionsByTaskState(SUSPENDED, - Arrays.asList(DETAILS, DELEGATE, RESERVE, CLEAR_EXPIRY, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, DELEGATE, RESERVE, CLEAR_EXPIRY, PROCESS_VIEWER)); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); // Reserved taskWidgetPage.clickOnTaskActionLink(0); taskWidgetPage.reserveTask(0); assertTaskActionsByTaskState(RESERVED, - Arrays.asList(DETAILS, DELEGATE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, DELEGATE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER)); // In progress TaskIFrameTemplatePage taskTemplatePage = taskDetailsPage.clickStartTask(); @@ -85,7 +84,7 @@ public void testVisibilityTaskActionForNormalUser() { taskDetailsPage = new TaskDetailsPage(); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); assertTaskActionsByTaskState(IN_PROGRESS, - Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, PROCESS_VIEWER)); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); } @@ -102,14 +101,14 @@ public void testVisibilityTaskActionForAdminUser() { // Suspended assertTaskActionsByTaskState(SUSPENDED, Arrays.asList(DETAILS, DELEGATE, RESERVE, CLEAR_EXPIRY, DESTROY, - WORKFLOW_EVENTS, TRIGGER_ESCALATION, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + WORKFLOW_EVENTS, TRIGGER_ESCALATION, PROCESS_VIEWER)); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); // Reserved taskWidgetPage.clickOnTaskActionLink(0); taskWidgetPage.reserveTask(0); assertTaskActionsByTaskState(RESERVED, Arrays.asList(DETAILS, DELEGATE, RESET, CLEAR_EXPIRY, DESTROY, - WORKFLOW_EVENTS, TRIGGER_ESCALATION, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + WORKFLOW_EVENTS, TRIGGER_ESCALATION, PROCESS_VIEWER)); // In progress TaskIFrameTemplatePage taskTemplatePage = taskDetailsPage.clickStartTask(); @@ -117,7 +116,7 @@ public void testVisibilityTaskActionForAdminUser() { taskDetailsPage = new TaskDetailsPage(); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); assertTaskActionsByTaskState(IN_PROGRESS, Arrays.asList(DETAILS, RESERVE, RESET, CLEAR_EXPIRY, DESTROY, - WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + WORKFLOW_EVENTS, PROCESS_VIEWER)); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); // Done @@ -126,7 +125,7 @@ public void testVisibilityTaskActionForAdminUser() { // Delayed assertTaskActionsByTaskState(DELAYED, - Arrays.asList(DETAILS, DELEGATE, CLEAR_DELAY, DESTROY, WORKFLOW_EVENTS, PROCESS_VIEWER, ADD_AD_HOC_TASK)); + Arrays.asList(DETAILS, DELEGATE, CLEAR_DELAY, DESTROY, WORKFLOW_EVENTS, PROCESS_VIEWER)); taskWidgetPage = taskDetailsPage.goBackToTaskListFromTaskDetails(); // Destroyed diff --git a/AxonIvyPortal/portal/cms/cms.yaml b/AxonIvyPortal/portal/cms/cms.yaml index 0a2e406ac75..9595ebd440a 100644 --- a/AxonIvyPortal/portal/cms/cms.yaml +++ b/AxonIvyPortal/portal/cms/cms.yaml @@ -1,26 +1,11 @@ -Categories: - AdhocExpressTasks: - name: Adhoc Express Tasks - CreateExpressWorkflow: - name: Create Express Workflow - ExpressWorkflow: - name: Express Workflow ch.ivy.addon.portal.generic: CaseDetailsTemplate: noCaseId: No case-Id specified requestTabTitle: Request statusTabTitle: Case Information OpenTaskTemplate: - adhocHistory: Adhoc history - adhocHistoryTooltip: Show adhoc history browserTabClosingWarning: You may lose your work in progress. Do you want to continue? - goToAdhocWarning: You may lose your work in progress and start the Ad-hoc process. Do you want to continue? goToSidestepWarning: Your current modifications will not be saved, when a sidestep process is started directly from a task. Do you want to continue? - noteOfResultFromAdhocProcess: 'Note: You will find all these entries also in the process history' - reCreateAdhocWarning: There is already an adhoc process for this task, do you want to create another one? - resultFromAdhocProcess: Results from the Ad-Hoc Process - startAdHoc: Start Adhoc - startAdHocTooltip: Reroute this process using ad-hoc steps ch.ivy.addon.portalkit.ui.jsf: AbsenceAndDeputy: Messages: @@ -102,7 +87,6 @@ ch.ivy.addon.portalkit.ui.jsf: GRID: Grid IMAGE: Image ProcessType: - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Business Process ProcessWidgetMode: @@ -204,7 +188,6 @@ ch.ivy.addon.portalkit.ui.jsf: enableProcessViewer: Set this property to true to enable process viewer option in Task/Case actions enableScriptCheckingForUploadedDocumentNote: Set to true to enable script checking for uploaded document. Currently this function supports checking for PDF, Excel, Word. enableVirusScannerForUploadedDocumentNote: Set to true to enable virus scanner for uploaded document. Currently this function is using API VIRUSTOTAL. - expressEndPageNote: Display the custom end page at the end of each Express process. hideCaseDocument: Set to true, the document section in case detail page will be hidden, otherwise it will be shown. hideChangePasswordButtonNote: Set this variable to true to hide the "Change Password" option in the top menu and the "Forgotten Password" option on the login page. If set to false, these options will be shown. hideLogoutButtonNote: If true, the logout button on top menu will be hidden, otherwise it will be shown. @@ -365,7 +348,6 @@ ch.ivy.addon.portalkit.ui.jsf: add: Add addDocument: Add document addNote: Add note - adhoc: Adhoc allCategories: All Categories allowPng: Only png types allowed apply: Apply @@ -548,45 +530,6 @@ ch.ivy.addon.portalkit.ui.jsf:
    {2}
tooltipHelper: Click to show all users which own this role directly or indirectly userOfRoleTitle: User of {0} group - expressManagement: - deployButton: Deploy - deployMessage: 'Deploying processes ... ' - exportExpress: Export Express - exportExpressProcessTitle: Export Express Processes - expressExportName: AXONIVY_Dataset_ExpressWorkflow_{0}.json - expressManagement: Express Management - expressMessages: - deployErrorLog: Error while deploying {0} - deploymentFinishedLog: Process(es) of file {0} successful deployed into Portal in {1}ms - endDeployLog: Deployment Express finished - invalidVersionLog: Non supported version {0} of Express - process: - duplicateProcessNameLog: '- Duplicate process name {0}' - installProcessFailedLog: '- Deploy process {0} failed' - installProcessFinishedLog: Installing process {0} successfully - installedProcessLog: Process installed {0} - startDeployProcessLog: Start deploying process {0} - startDeployLog: Start deploying the Express process(es) of file {0} to Portal - status: - error: Error - failed: Failed - info: Info - successful: Success - warning: Warning - validate: - validateExpressVersion: Could not find the Express Version variable in System. Please contact your adminstrator. - validateProcessCoOwnerLog: '- Validate Process Co-Owner of {0}, user {1} is not available in system' - validateProcessOwnerLog: '- Validate Process Owner of {0}, user {1} is not available in system, change process owner to {2}' - validateProcessPermissionLog: '- Validate Process Permission of {0}, user {1} is not available in system' - validateTaskDefUserLog: '- Validate Task Definition Responsibles of {0}, user {1} is not available in system' - versionLog: 'Version of Express: {0}' - fileEmptyMessage: File is empty - importDialogHeaderTitle: Choose a Dataset of Express workflow, it should be a JSON file. - importExpress: Import Express - importExpressProcessTitle: Import Express Processes - importHeaderTitle: 'List of Express processes will be exported:' - processCount: process(es) - waitingMessage: 'Data is collecting ... ' processChain: currentStepIsNotDefined: Current step ({0}) of process chain is not defined taskStart: @@ -783,6 +726,7 @@ ch.ivy.addon.portalkit.ui.jsf: processElementId: Process element Id stackTrace: StackTrace forgotPassword: + EmailAddress: E-Mail address empty: Empty forgotPassword: Forgot my password forgotPasswordError: An error occurred while processing your request. Please try again later. @@ -852,7 +796,6 @@ ch.ivy.addon.portalkit.ui.jsf: addNewProcess: Add new process addNewProcessDialogHeader: Add new user process backToOverview: Back to overview - deleteExpressWorkflowTooltip: Delete Express Workflow deleteExternalLinkTooltip: Delete external link deleteProcess: Delete Process deleteProcessItemConfirmation: Are you sure you want to delete the following process? @@ -863,9 +806,7 @@ ch.ivy.addon.portalkit.ui.jsf: dialogEditInfoTitle: '{0} Information' dialogHeaderDescription: In this area you can edit some information related to the selected process. dialogHeaderTitle: Edit information for {0} - editExpressWorkflowTooltip: Edit Express Workflow editProcesses: Edit processes - expressWorkflow: Express workflow externalLink: External link externalLinkVisibility: Visibility goTo: 'Go to: ' @@ -898,8 +839,6 @@ ch.ivy.addon.portalkit.ui.jsf: process: Process searchResults: Search Results searchResultsFor: '{0} search results for "{1}"' - sidestep: - addAdhocTask: Add Ad-hoc Task taskActivator: assign: Assign cannotAssignTask: This task cannot be assigned to any other user or group. @@ -944,7 +883,6 @@ ch.ivy.addon.portalkit.ui.jsf: expiry: Expiry failedDelayValidation: Task delay timestamp cannot be an empty value or invalid date format failedExpiryValidation: Task expiry timestamp cannot be in the past. - noAdhoc: No Adhoc available noDescription: No description noNotes: No notes processingTime: Processing Time @@ -1092,60 +1030,13 @@ Dialogs: CaseDescription: Edit an existing workflow CaseName: Edit workflow Tasks: - CreateWorkflow: - TaskDescription: Workflow has been created - TaskName: Workflow has been created - EditWorkflow: - TaskDescription: A process has been edited. - TaskName: Process edited - FinalReview: - TaskName: Final Review - FinalWorkflowTask: - taskDescription: The workflow {0} has been finished! - FormDefinition: - TaskDescription: Please define the form! - TaskName: Form creation! - ProcessLoaded: - TaskName: AdHoc Configuration Task - SaveWorkflow: - TaskName: Express workflow creation in progress TaskDetail: DataDescription: Data and Description restoreToDefaultSettings: Restore to default settings switchToEditMode: Edit switchToViewMode: Save - WorkflowProperties: - TaskDescription: Please configure the workflow properties! - TaskName: Workflow properties - WorkflowExecution: - ApprovalForm: - Approve: Approve! - ApproveComment: Approved - CommentLabel: Comment of approver - FieldSetApplicant: Requester - FieldSetForm: Form - FinishedTasks: Finished Tasks - Fullname: Full name - Reject: Reject! - RejectComment: Rejected - FinalReviewForm: - approvalStatus: Approval status - approver: Approver - noticed: Acknowledged! - FinishedTasksForm: - Applicant: Applicant - ApprovalResult: Approval result - FinishedTasks: Finished Tasks - FormDetails: Form Details - UserTaskForm: - ApprovalResult: - Approved: Approved - Rejected: Rejected - Formular: Form agileBPM: - TooltipForOriginalTask: Your current task will return once previous steps of the ad hoc workflow are finished. define_WF: - AdhocWorkflowTasks: Workflow Tasks ErrorSelectInvalidAssignee: Assignee is already selected or invalid ListOfSelectedUser: List of selected users ResponsibleDialogHeader: Responsible Users @@ -1162,14 +1053,6 @@ Dialogs: ch: ivy: addon: - express: - generic: - endpage: - subtitle: The last task was completed successfully - title: Task completed successfully! - expressNoItem: There is no completed Express Task yet - expressNoItemDescription: The results of completed tasks are displayed here - expressWorkflowName: 'Business Details of Case #{0}' portal: generic: GlobalSearch: @@ -1236,104 +1119,7 @@ Dialogs: general: MaxLabelLenght: '35' maxOptionsLength: '20' - workflowCreation: - AdhocProcessName: AdHoc Process for Task {0} - {1} - FormDefinition: - AddCheckboxField: Add new field - AddOptionboxField: Append new option - AllowedFiletypes: Allowed file types - BroadFooterArea: Wide footer - BroadHeaderArea: Wide Header - CheckboxFields: Checkbox fields - CreateField: Create - DataProvider: Data provider - DragAndDropTooltip: Drag and Drop the available elements to the Header, left column, right column or to the Footer! - ElementLabel: Label - ElementName: Name of element - Email: - Attachment: Attachment - EmailAddress: E-Mail address - EmailText: Email text - ResponseTo: Response to - Subject: Subject - ExecuteWorkflow: Execute workflow directly - ExecuteWorkflowWarning: You have to fulfil all tasks before execute this workflow - FieldSetAvailableFormelements: Form elements - FieldSetFormelements: Create form element - FieldSetFormelementsPlacing: Placement of form elements - FieldSetPreviewArea: Preview of the defined form - FinishWorkflow: Finish Workflow - InputArea: Input area - InputCheckbox: Checkbox - InputField: Input field - InputFileUpload: File upload - InputOptions: Radio button - InputType: Input type - InputTypes: - DateSelection: Date picker - NumberField: Number field - TextBox: Text field - LeftColumn: left column - NoCheckboxFieldYet: No checkbox field types are defined yet - NoDataProvider: Special static data provider - NoFormelementsAvailable: No form elements are available! - NoOptionboxFieldsYet: No checkbox types are defined yet - NumberOfFiles: Number of files - NumberOfRows: Number of rows - OptionboxFields: Radio buttons - OptionboxPlaceholder: Option - Preview: Preview - RightColumn: right column - SaveWorkflow: Save Workflow - UploadFileFormat: - Excel: Excel (xls/xlsx) - OtherFormats: Other file formats - PDF: PDF (pdf) - Word: Word (doc/docx) - cancelCreateForm: Do you really want to cancel? All your data will be lost! - otherFiletype: Other file types - ProcessName: Create Express Workflow - TaskType: - Approval: Approval - Email: Information E-mail - Review: Review - UserTask: User task - UserTaskWithEmail: User task with E-mail - WorkflowDefinition: - AbleToStart: Able to Start - AddProcessStep: Add process step - ChooseAssignee: - AddUserOrRole: 'Select a group or a user, please:' - SelectedAssigneesFieldSet: Selected assignees - UserTooltip: User - DefaultTemplateDescription: Below is the default template - DeleteProcessStep: Remove process step - Description: Describe your process - DueTimeInDays: Expiry in days - EndStep: End - FormDefinitionStep: Form definition - ProcessNameExists: This process name was used before - ProcessOwner: Process Owner - Processdescription: Process description - Processdetails: Process properties - Processflow: Process flow - Processstep: Process step - Processtype: Type of process - ProcesstypeAdHoc: One time - ProcesstypeRepeating: Repeatable - TaskType: Task Type - UntilDaysTooltip: After expiry, the task will be assigned to Everybody and its priority becomes High. - UserInterface: - ChangeSettingWarning: All defined tasks will be deleted. Are you sure? - CreateOwn: Create own - UseDefault: Use default - UserInterface: User Interface - WorkflowPropertiesStep: Workflow properties - requiredMsgs: - ReqMsgGeneric: ' is a required field!' - processStep: Process Step Labels: - AdhocWorkflow: Describe your Workflow AppendTask-Explain: The task is added to the sequence after my task. AppendTheTask: Append the task CreateNewDashboard: Create new dashboard @@ -1348,9 +1134,7 @@ Labels: TaskItemDetail: Task Details TaskUser-Explain: Comma separated list of users ViewAllResults: View all results - adhocTaskRequired: You must add at least one new task. disabledUserPrefix: (disabled) - title: Self Service Ad-hoc Workflow patterns: datePattern: dd.MM.yyyy dateTimePattern: dd.MM.yyyy HH:mm @@ -1380,18 +1164,7 @@ Processes: SynchronizeServerConfigurationCaseName: Synchronize server configuration portalHome: Portal Home portalSettingSaved: Portal settings are saved -ProcessPages: - selfServiceAdhocProcess: Axon Ivy Self Service - selfServiceDescription: 'Self Service Prozess: Launch an ad-hoc Workflow based on a predefined flow pattern.' Texts: - Adhoc-Explain: |+ -

- - Enter your comment and press Send to proceed the workflow. - -

- - AdhocWF-Explain: "

\n\nDefine and launch a Workflow at your fingertip: Select a flow pattern, add some tasks and start the Workflow. \n\n

\n\n

\n\n\n\n

\n\n" Approval-Explain: |+

diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index bbb5cc393cc..d1413293d30 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -1,26 +1,11 @@ -Categories: - AdhocExpressTasks: - name: Adhoc Express Aufgaben - CreateExpressWorkflow: - name: Express Workflow erstellen - ExpressWorkflow: - name: Express-Workflow ch.ivy.addon.portal.generic: CaseDetailsTemplate: noCaseId: Keine Vorgangs-ID spezifiziert requestTabTitle: Anfrage statusTabTitle: Vorgangsinformationen OpenTaskTemplate: - adhocHistory: AdHoc Prozesshistorie - adhocHistoryTooltip: AdHoc Prozesshistorie anzeigen browserTabClosingWarning: Durch diese Aktion gehen ungespeicherte Änderungen verloren. Möchten Sie wirklich fortfahren? - goToAdhocWarning: Beim starten von Ad-hoc Prozess gehen Ihre nicht gespeicherte Eingaben verloren. Möchten Sie weiter? goToSidestepWarning: Bei starten eines Sidestep Prozesses werden die aktuelle Eingaben nicht gespeichert. Möchten Sie sich trotzdem fortsetzen? - noteOfResultFromAdhocProcess: 'Achtung: alle Einträge sind auch in der Vorgangshistorie' - reCreateAdhocWarning: Es gibt bereits einen AdHoc Prozess zu dieser Aufgabe. Möchten Sie einen neuen erstellen? - resultFromAdhocProcess: Ergebnisse aus dem Ad-Hoc Prozess - startAdHoc: Start Adhoc - startAdHocTooltip: Neue Aufgabe hinzufügen, und den aktuellen Prozess umleiten. PortalName: PortalName: Portal ch.ivy.addon.portalkit.ui.jsf: @@ -111,7 +96,6 @@ ch.ivy.addon.portalkit.ui.jsf: BY_CUSTOM_ORDER: Benutzerdefinierte Reihenfolge BY_INDEX: Sortierindex ProcessType: - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Geschäftsprozess ProcessWidgetMode: @@ -252,7 +236,6 @@ ch.ivy.addon.portalkit.ui.jsf: enableProcessViewer: Setzen Sie diese Einstellung auf true, um die Prozess-Viewer-Option in Aufgaben-/Vorgang-Aktionen zu aktivieren enableScriptCheckingForUploadedDocumentNote: 'Auf "true" setzen, um die Skriptüberprüfung zu aktivieren. Es werden die Formate PDF, Excel und Word unterstützt. ' enableVirusScannerForUploadedDocumentNote: Auf true setzen, um den Virenscanner für das hochgeladene Dokument zu aktivieren. Derzeit verwendet diese Funktion die API VIRUSTOTAL. - expressEndPageNote: Anzeigen der angepassten Endseite nach dem Ende eines Express Prozesses. hideCaseCreator: | Auf true setzen, um den Fallersteller in der Fallliste, dem Fall-Widget und den Falldetails auszublenden. Diese Einstellung wirkt sich auf alle Fallabfragen aus, z. B. für Fallliste, globale Suche, Statistik. @@ -428,7 +411,6 @@ ch.ivy.addon.portalkit.ui.jsf: add: Hinzufügen addDocument: Dokument hinzufügen addNote: Notiz hinzufügen - adhoc: Adhoc allCategories: Alle Kategorien allowPng: Nur das png Format wird unterstützt apply: Anwenden @@ -651,45 +633,6 @@ ch.ivy.addon.portalkit.ui.jsf: noUser: Es sind keine Benutzer vorhanden. tooltipHelper: Klicken Sie hier, um alle Benutzer anzuzeigen, die diese Rolle direkt oder indirekt besitzen userOfRoleTitle: Benutzer der Gruppe {0} - expressManagement: - deployButton: Hochladen - deployMessage: Prozesse werden deployt - exportExpress: Export Express - exportExpressProcessTitle: Export Express Prozesse - expressExportName: AXONIVY_Dataset_ExpressWorkflow_{0}.json - expressManagement: Express Management - expressMessages: - deployErrorLog: Fehler beim Deployen {0} - deploymentFinishedLog: Prozess(e) der Datei {0} erfolgreich im Portal deployt in {1}ms - endDeployLog: Express Deployment beendet - invalidVersionLog: Nicht unterstützte Version {0} von Express - process: - duplicateProcessNameLog: '- Duplizierter Prozessname {0}' - installProcessFailedLog: '- Prozessdeployment {0} fehlgeschlagen' - installProcessFinishedLog: Installation von Prozess {0} erfolgreich - installedProcessLog: Prozess installiert {0} - startDeployProcessLog: Start des Deployments von Prozess {0} - startDeployLog: Start des Deployments des/der Express-Prozesses(e) der Datei {0} ins Portal - status: - error: Fehler - failed: Fehlgeschlagen - info: Info - successful: Erfolg - warning: Warnung - validate: - validateExpressVersion: Die Variable Express-Version konnte im System nicht gefunden werden. Bitte kontaktieren Sie Ihren Administrator. - validateProcessCoOwnerLog: '- Validierung des Prozesses Co-Owner von {0}, Benutzer {1} ist nicht im System verfügbar' - validateProcessOwnerLog: '- Validierung des Prozesses Owner von {0}, Benutzer {1} ist nicht im System verfügbar, ändern Sie den Prozesseigner auf {2}' - validateProcessPermissionLog: '- Validierung der Prozessberechtigung von {0}, Benutzer {1} ist im System nicht verfügbar' - validateTaskDefUserLog: '- Validierung der Task-Definition Verantwortliche von {0},Benutzer {1} ist im System nicht verfügbar' - versionLog: 'Express Version: {0}' - fileEmptyMessage: Datei ist leer - importDialogHeaderTitle: Wählen Sie ein Dataset für den Express-Workflow, es sollte eine JSON-Datei sein. - importExpress: Express importieren - importExpressProcessTitle: Express Prozess importieren - importHeaderTitle: 'Liste von Express Prozessen werden exportiert:' - processCount: Prozess(e) - waitingMessage: Daten werden gesammelt… passwordValidation: criteria: Kriterien enablePasswordValidation: Kennwortüberprüfung einschalten @@ -959,6 +902,7 @@ ch.ivy.addon.portalkit.ui.jsf: processElementId: Prozesselement Id stackTrace: StackTrace forgotPassword: + EmailAddress: E-Mail Adresse empty: Leer forgotPassword: Ich habe mein Passwort vergessen. forgotPasswordError: Bei der Bearbeitung Ihrer Anfrage ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut. @@ -1067,7 +1011,6 @@ ch.ivy.addon.portalkit.ui.jsf: addNewProcess: Prozess hinzufügen addNewProcessDialogHeader: Neuen Prozess hinzufügen backToOverview: Zurück zur Übersicht - deleteExpressWorkflowTooltip: Express Workflow entfernen deleteExternalLinkTooltip: Externen Link löschen deleteProcess: Prozess löschen deleteProcessItemConfirmation: Sind sie sicher das Sie folgenden Prozess löschen wollen? @@ -1078,9 +1021,7 @@ ch.ivy.addon.portalkit.ui.jsf: dialogEditInfoTitle: '{0} Informationen' dialogHeaderDescription: In diesem Bereich können Sie einige Informationen bearbeiten, die sich auf den ausgewählten Prozess beziehen. dialogHeaderTitle: Informationen bearbeiten für {0} - editExpressWorkflowTooltip: Express Workflow bearbeiten editProcesses: Prozesse bearbeiten - expressWorkflow: Express Workflow externalLink: Externer Link externalLinkVisibility: Sichtbarkeit goTo: 'Gehe zu: ' @@ -1117,8 +1058,6 @@ ch.ivy.addon.portalkit.ui.jsf: process: Prozess searchResults: Suchresultate searchResultsFor: '{0} Suchresultate für "{1}"' - sidestep: - addAdhocTask: Ad-hoc Aufgabe hinzufügen taskActivator: assign: Zuweisen cannotAssignTask: Diese Aufgabe kann keinem anderen Benutzer oder keiner anderen Gruppe zugewiesen werden. @@ -1163,7 +1102,6 @@ ch.ivy.addon.portalkit.ui.jsf: expiry: Ablauffrist failedDelayValidation: Der Zeitstempel der Aufgabenverzögerung darf kein leerer Wert oder ungültiges Datumsformat sein failedExpiryValidation: Der Ablauf der Aufgabe darf nicht in der Vergangenheit liegen. - noAdhoc: AdHoc nicht verfügbar noDescription: Keine Beschreibung vorhanden noNotes: Keine Notizen processingTime: Bearbeitungszeit @@ -1315,60 +1253,13 @@ Dialogs: CaseDescription: Bearbeiten eines existierenden Workflows CaseName: Workflow editieren Tasks: - CreateWorkflow: - TaskDescription: Workflow wurde angelegt - TaskName: Workflow wurde angelegt - EditWorkflow: - TaskDescription: Ein Prozess wurde bearbeitet - TaskName: Prozess bearbeitet - FinalReview: - TaskName: Schlusskontrolle - FinalWorkflowTask: - taskDescription: Der Prozess {0} wurde beendet! - FormDefinition: - TaskDescription: Bitte definieren Sie das Formular! - TaskName: Formulardefinition! - ProcessLoaded: - TaskName: Aufgabe für die Adhoc Konfiguration - SaveWorkflow: - TaskName: Ein Express Workflowprozess ist gerade am Entstehen TaskDetail: DataDescription: Daten und Beschreibung restoreToDefaultSettings: Standardeinstellungen wiederherstellen switchToEditMode: Bearbeiten switchToViewMode: Speichern - WorkflowProperties: - TaskDescription: Bitte definieren Sie die Workfloweigenschaften! - TaskName: Workflow Einstellungen - WorkflowExecution: - ApprovalForm: - Approve: Genehmigen! - ApproveComment: Genehmigen - CommentLabel: Kommentar des Genehmigers - FieldSetApplicant: Antragssteller - FieldSetForm: Formular - FinishedTasks: Erledigte Aufgaben - Fullname: vollständiger Name - Reject: Ablehnen! - RejectComment: Ablehnen - FinalReviewForm: - approvalStatus: Freigabestatus - approver: Genehmiger - noticed: Zur Kenntnis genommen! - FinishedTasksForm: - Applicant: Antragssteller - ApprovalResult: Freigabestatus - FinishedTasks: Erledigte Aufgaben - FormDetails: Formulardetails - UserTaskForm: - ApprovalResult: - Approved: Genehmigt - Rejected: Abgelehnt - Formular: Formular agileBPM: - TooltipForOriginalTask: Ihre aktuelle Aufgabe wird wieder auftauchen sobald der Ad hoc Workflow fertiggestellt ist. define_WF: - AdhocWorkflowTasks: Workflow Aufgaben ErrorSelectInvalidAssignee: Der Beauftragte ist bereits ausgewählt oder ungültig ListOfSelectedUser: Liste ausgewählter Benutzer ResponsibleDialogHeader: Verantwortliche Benutzer @@ -1385,14 +1276,6 @@ Dialogs: ch: ivy: addon: - express: - generic: - endpage: - subtitle: Die letzte Aufgabe wurde erfolgreich abgeschlossen - title: Aufgabe erfolgreich abgeschlossen! - expressNoItem: Es gibt noch keine abgeschlossene Express Aufgabe - expressNoItemDescription: Hier werden die Ergebnisse der abgeschlossenen Aufgaben angezeigt - expressWorkflowName: 'Business Details des Vorgangs: #{0}' portal: generic: GlobalSearch: @@ -1503,104 +1386,7 @@ Dialogs: invalidFileMessage: Dateityp nicht gültig! invalidSizeMessage: Datei zu groß! maximumFileUploadElement: Es gibt bereits ein Datei-Upload-Element - workflowCreation: - AdhocProcessName: AdHoc Prozess für Aufgabe {0} - {1} - FormDefinition: - AddCheckboxField: Neues Feld hinzufügen - AddOptionboxField: Neue Option hinzufügen - AllowedFiletypes: Erlaubte Dateiformate - BroadFooterArea: Breiter Footer Bereich - BroadHeaderArea: Breiter Header Bereich - CheckboxFields: Auswahlfelder - CreateField: Erstellen - DataProvider: Datenanbieter - DragAndDropTooltip: Ziehen Sie per Drag and Drop die verfügbaren Elemente in den Header, die linke Spalte, die rechte Spalte oder in den Footer um sie zu platzieren! - ElementLabel: Label - ElementName: Elementbezeichnung - Email: - Attachment: Anhang - EmailAddress: E-Mail Adresse - EmailText: Emailnachricht - ResponseTo: Antwort an - Subject: Betreff - ExecuteWorkflow: Workflow direkt ausführen - ExecuteWorkflowWarning: Sie müssen alle Aufgaben ausführen, bevor Sie diesen Workflow ausführen können - FieldSetAvailableFormelements: Formularelemente - FieldSetFormelements: Formularelemente erstellen - FieldSetFormelementsPlacing: Platzierung der Formularelemente - FieldSetPreviewArea: Formularvorschau - FinishWorkflow: Workflowende - InputArea: Eingabebereich - InputCheckbox: Auswahlfeld - InputField: Eingabefeld - InputFileUpload: Dateiupload - InputOptions: Optionsfeld - InputType: Eingabe-Typ - InputTypes: - DateSelection: Datumsauswahl - NumberField: Nummernfeld - TextBox: Textfeld - LeftColumn: Linke Spalte - NoCheckboxFieldYet: Bisher keine Auswahlfelder angelegt - NoDataProvider: 'Daten Provider ' - NoFormelementsAvailable: Keine Formularelemente verfügbar! - NoOptionboxFieldsYet: Bisher keine Auswahloptionen angelegt - NumberOfFiles: Dateianzahl - NumberOfRows: Zeilenanzahl - OptionboxFields: Optionsfelder - OptionboxPlaceholder: Option - Preview: Vorschau - RightColumn: Rechte Spalte - SaveWorkflow: Workflow speichern - UploadFileFormat: - Excel: Excel (xls/xlsx) - OtherFormats: Andere Dateiformate - PDF: PDF (pdf) - Word: Word (doc/docx) - cancelCreateForm: Wollen Sie wirklich abbrechen? Alle Daten gehen verloren! - otherFiletype: Andere Dateiformate - ProcessName: Express Workflow erstellen - TaskType: - Approval: Genehmigung - Email: Information E-Mail - Review: Überprüfung - UserTask: Aufgabe - UserTaskWithEmail: Aufgabe mit E-Mail Schritt - WorkflowDefinition: - AbleToStart: Startberechtigung - AddProcessStep: Prozessschritt hinzufügen - ChooseAssignee: - AddUserOrRole: 'Wählen Sie eine Gruppe oder Benutzer aus, bitte:' - SelectedAssigneesFieldSet: Ausgewählte Genehmiger - UserTooltip: Benutzer - DefaultTemplateDescription: Unten befindet sich das Standard Template - DeleteProcessStep: Prozessschritt löschen - Description: Beschriben Sie Ihren Prozess - DueTimeInDays: Fälligkeitsfrist in Tagen - EndStep: Ende - FormDefinitionStep: Formular-definition - ProcessNameExists: Dieser Prozessname wurde bereits benutzt - ProcessOwner: Prozessverantwortliche - Processdescription: Prozessbeschreibung - Processdetails: Prozesseigenschaften - Processflow: Prozessfluss - Processstep: Prozessschritt - Processtype: Prozessart - ProcesstypeAdHoc: Einmalig - ProcesstypeRepeating: Wiederkehrend - TaskType: Aufgabentyp - UntilDaysTooltip: Nach Ablauf wird die Aufgabe an die Rolle Everybody zugeteilt, und ihre Priorität auf Hoch gesetzt. - UserInterface: - ChangeSettingWarning: Alle definierten Aufgaben werden gelöscht. Sind Sie sicher? - CreateOwn: Erstellen - UseDefault: Standardoberfläche - UserInterface: Benutzeroberfläche - WorkflowPropertiesStep: Workfloweigenschaften - requiredMsgs: - ReqMsgGeneric: ' ist ein erforderliches Feld!' - processStep: Prozessschritt Labels: - AdhocWorkflow: Beschreiben Sie Ihren Workflow AppendTask-Explain: Die Aufgabe wird in der Sequenz nach meiner Aufgabe hinzugefügt. AppendTheTask: Aufgabe anhängen CreateNewDashboard: Neues Dashboard erstellen @@ -1698,9 +1484,7 @@ Labels: TaskUser-Explain: Kommaseparierte Liste von Benutzern ToggleMenu: Menü umschalten ViewAllResults: Alle Ergebnisse anzeigen - adhocTaskRequired: Zumindest eine Aufgabe ist erforderlich. disabledUserPrefix: (inaktiv) - title: Self Service Ad-hoc Workflow patterns: datePattern: dd.MM.yyyy dateTimePattern: dd.MM.yyyy HH:mm @@ -1730,12 +1514,7 @@ Processes: SynchronizeServerConfigurationCaseName: Server Konfiguration synchronisieren portalHome: Portal Home portalSettingSaved: Portaleinstellungen sind gespeichert -ProcessPages: - selfServiceAdhocProcess: Axon Ivy Self Service - selfServiceDescription: 'Self Service Prozess: ein ad-hoc Workflow starten' Texts: - Adhoc-Explain: '

Geben Sie Ihren Kommentar ein und drücken Sie Senden um weiterzufahren.

' - AdhocWF-Explain: "

\n\nDefinieren und starten Sie einen Workflow auf Knopfdruck. \n\n

\n\n" Approval-Explain: "

\n\nTreffen Sie Ihre Entscheidung und klicken Sie auf Senden um weiterzufahren. \n\n

\n\n" QA-Explain: |+

diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index 50b16a225cf..42159db74e6 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -1,26 +1,11 @@ -Categories: - AdhocExpressTasks: - name: Adhoc Express Tasks - CreateExpressWorkflow: - name: Create Express Workflow - ExpressWorkflow: - name: Express Workflow ch.ivy.addon.portal.generic: CaseDetailsTemplate: noCaseId: No case-Id specified requestTabTitle: Request statusTabTitle: Case Information OpenTaskTemplate: - adhocHistory: Adhoc history - adhocHistoryTooltip: Show adhoc history browserTabClosingWarning: You may lose your work in progress. Do you want to continue? - goToAdhocWarning: You may lose your work in progress and start the Ad-hoc process. Do you want to continue? goToSidestepWarning: Your current modifications will not be saved, when a sidestep process is started directly from a task. Do you want to continue? - noteOfResultFromAdhocProcess: 'Note: You will find all these entries also in the process history' - reCreateAdhocWarning: There is already an adhoc process for this task, do you want to create another one? - resultFromAdhocProcess: Results from the Ad-Hoc Process - startAdHoc: Start Adhoc - startAdHocTooltip: Reroute this process using ad-hoc steps PortalName: PortalName: Portal ch.ivy.addon.portalkit.ui.jsf: @@ -111,7 +96,6 @@ ch.ivy.addon.portalkit.ui.jsf: BY_CUSTOM_ORDER: Custom order BY_INDEX: Sorting index ProcessType: - EXPRESS_PROCESS: Express Workflow EXTERNAL_LINK: External Link IVY_PROCESS: Business Process ProcessWidgetMode: @@ -251,7 +235,6 @@ ch.ivy.addon.portalkit.ui.jsf: enableProcessViewer: Set this property to true to enable process viewer option in Task/Case actions enableScriptCheckingForUploadedDocumentNote: Set to true to enable script checking for uploaded document. Currently this function supports checking for PDF, Excel, Word. enableVirusScannerForUploadedDocumentNote: Set to true to enable virus scanner for uploaded document. Currently this function is using API VIRUSTOTAL. - expressEndPageNote: Display the custom end page at the end of each Express process. hideCaseCreator: |- Set to true to hide case creator in case list, case widget and case details. This setting affects all case queries, e.g. for case list, global search, statistic. @@ -427,7 +410,6 @@ ch.ivy.addon.portalkit.ui.jsf: add: Add addDocument: Add document addNote: Add note - adhoc: Adhoc allCategories: All Categories allowPng: Only png types allowed apply: Apply @@ -655,45 +637,6 @@ ch.ivy.addon.portalkit.ui.jsf:

    {2}
tooltipHelper: Click to show all users which own this role directly or indirectly userOfRoleTitle: User of {0} group - expressManagement: - deployButton: Deploy - deployMessage: 'Deploying processes ... ' - exportExpress: Export Express - exportExpressProcessTitle: Export Express Processes - expressExportName: AXONIVY_Dataset_ExpressWorkflow_{0}.json - expressManagement: Express Management - expressMessages: - deployErrorLog: Error while deploying {0} - deploymentFinishedLog: Process(es) of file {0} successful deployed into Portal in {1}ms - endDeployLog: Deployment Express finished - invalidVersionLog: Non supported version {0} of Express - process: - duplicateProcessNameLog: '- Duplicate process name {0}' - installProcessFailedLog: '- Deploy process {0} failed' - installProcessFinishedLog: Installing process {0} successfully - installedProcessLog: Process installed {0} - startDeployProcessLog: Start deploying process {0} - startDeployLog: Start deploying the Express process(es) of file {0} to Portal - status: - error: Error - failed: Failed - info: Info - successful: Success - warning: Warning - validate: - validateExpressVersion: Could not find the Express Version variable in System. Please contact your adminstrator. - validateProcessCoOwnerLog: '- Validate Process Co-Owner of {0}, user {1} is not available in system' - validateProcessOwnerLog: '- Validate Process Owner of {0}, user {1} is not available in system, change process owner to {2}' - validateProcessPermissionLog: '- Validate Process Permission of {0}, user {1} is not available in system' - validateTaskDefUserLog: '- Validate Task Definition Responsibles of {0}, user {1} is not available in system' - versionLog: 'Version of Express: {0}' - fileEmptyMessage: File is empty - importDialogHeaderTitle: Choose a Dataset of Express workflow, it should be a JSON file. - importExpress: Import Express - importExpressProcessTitle: Import Express Processes - importHeaderTitle: 'List of Express processes will be exported:' - processCount: process(es) - waitingMessage: 'Data is collecting ... ' passwordValidation: criteria: Criteria enablePasswordValidation: Enable password validation @@ -961,6 +904,7 @@ ch.ivy.addon.portalkit.ui.jsf: processElementId: Process element Id stackTrace: StackTrace forgotPassword: + EmailAddress: E-Mail address empty: Empty forgotPassword: Forgot my password forgotPasswordError: An error occurred while processing your request. Please try again later. @@ -1069,7 +1013,6 @@ ch.ivy.addon.portalkit.ui.jsf: addNewProcess: Add new process addNewProcessDialogHeader: Add new user process backToOverview: Back to overview - deleteExpressWorkflowTooltip: Delete Express Workflow deleteExternalLinkTooltip: Delete external link deleteProcess: Delete Process deleteProcessItemConfirmation: Are you sure you want to delete the following process? @@ -1080,9 +1023,7 @@ ch.ivy.addon.portalkit.ui.jsf: dialogEditInfoTitle: '{0} Information' dialogHeaderDescription: In this area you can edit some information related to the selected process. dialogHeaderTitle: Edit information for {0} - editExpressWorkflowTooltip: Edit Express Workflow editProcesses: Edit processes - expressWorkflow: Express workflow externalLink: External link externalLinkVisibility: Visibility goTo: 'Go to: ' @@ -1119,8 +1060,6 @@ ch.ivy.addon.portalkit.ui.jsf: process: Process searchResults: Search Results searchResultsFor: '{0} search results for "{1}"' - sidestep: - addAdhocTask: Add Ad-hoc Task taskActivator: assign: Assign cannotAssignTask: This task cannot be assigned to any other user or group. @@ -1165,7 +1104,6 @@ ch.ivy.addon.portalkit.ui.jsf: expiry: Expiry failedDelayValidation: Task delay timestamp cannot be an empty value or invalid date format failedExpiryValidation: Task expiry timestamp cannot be in the past. - noAdhoc: No Adhoc available noDescription: No description noNotes: No notes processingTime: Processing Time @@ -1316,60 +1254,13 @@ Dialogs: CaseDescription: Edit an existing workflow CaseName: Edit workflow Tasks: - CreateWorkflow: - TaskDescription: Workflow has been created - TaskName: Workflow has been created - EditWorkflow: - TaskDescription: A process has been edited. - TaskName: Process edited - FinalReview: - TaskName: Final Review - FinalWorkflowTask: - taskDescription: The workflow {0} has been finished! - FormDefinition: - TaskDescription: Please define the form! - TaskName: Form creation! - ProcessLoaded: - TaskName: AdHoc Configuration Task - SaveWorkflow: - TaskName: Express workflow creation in progress TaskDetail: DataDescription: Data and Description restoreToDefaultSettings: Restore to default settings switchToEditMode: Edit switchToViewMode: Save - WorkflowProperties: - TaskDescription: Please configure the workflow properties! - TaskName: Workflow properties - WorkflowExecution: - ApprovalForm: - Approve: Approve! - ApproveComment: Approved - CommentLabel: Comment of approver - FieldSetApplicant: Requester - FieldSetForm: Form - FinishedTasks: Finished Tasks - Fullname: Full name - Reject: Reject! - RejectComment: Rejected - FinalReviewForm: - approvalStatus: Approval status - approver: Approver - noticed: Acknowledged! - FinishedTasksForm: - Applicant: Applicant - ApprovalResult: Approval result - FinishedTasks: Finished Tasks - FormDetails: Form Details - UserTaskForm: - ApprovalResult: - Approved: Approved - Rejected: Rejected - Formular: Form agileBPM: - TooltipForOriginalTask: Your current task will return once previous steps of the ad hoc workflow are finished. define_WF: - AdhocWorkflowTasks: Workflow Tasks ErrorSelectInvalidAssignee: Assignee is already selected or invalid ListOfSelectedUser: List of selected users ResponsibleDialogHeader: Responsible Users @@ -1386,14 +1277,6 @@ Dialogs: ch: ivy: addon: - express: - generic: - endpage: - subtitle: The last task was completed successfully - title: Task completed successfully! - expressNoItem: There is no completed Express Task yet - expressNoItemDescription: The results of completed tasks are displayed here - expressWorkflowName: 'Business Details of Case #{0}' portal: generic: GlobalSearch: @@ -1507,104 +1390,7 @@ Dialogs: general: MaxLabelLenght: '35' maxOptionsLength: '20' - workflowCreation: - AdhocProcessName: AdHoc Process for Task {0} - {1} - FormDefinition: - AddCheckboxField: Add new field - AddOptionboxField: Append new option - AllowedFiletypes: Allowed file types - BroadFooterArea: Wide footer - BroadHeaderArea: Wide Header - CheckboxFields: Checkbox fields - CreateField: Create - DataProvider: Data provider - DragAndDropTooltip: Drag and Drop the available elements to the Header, left column, right column or to the Footer! - ElementLabel: Label - ElementName: Name of element - Email: - Attachment: Attachment - EmailAddress: E-Mail address - EmailText: Email text - ResponseTo: Response to - Subject: Subject - ExecuteWorkflow: Execute workflow directly - ExecuteWorkflowWarning: You have to fulfil all tasks before execute this workflow - FieldSetAvailableFormelements: Form elements - FieldSetFormelements: Create form element - FieldSetFormelementsPlacing: Placement of form elements - FieldSetPreviewArea: Preview of the defined form - FinishWorkflow: Finish Workflow - InputArea: Input area - InputCheckbox: Checkbox - InputField: Input field - InputFileUpload: File upload - InputOptions: Radio button - InputType: Input type - InputTypes: - DateSelection: Date picker - NumberField: Number field - TextBox: Text field - LeftColumn: left column - NoCheckboxFieldYet: No checkbox field types are defined yet - NoDataProvider: Special static data provider - NoFormelementsAvailable: No form elements are available! - NoOptionboxFieldsYet: No checkbox types are defined yet - NumberOfFiles: Number of files - NumberOfRows: Number of rows - OptionboxFields: Radio buttons - OptionboxPlaceholder: Option - Preview: Preview - RightColumn: right column - SaveWorkflow: Save Workflow - UploadFileFormat: - Excel: Excel (xls/xlsx) - OtherFormats: Other file formats - PDF: PDF (pdf) - Word: Word (doc/docx) - cancelCreateForm: Do you really want to cancel? All your data will be lost! - otherFiletype: Other file types - ProcessName: Create Express Workflow - TaskType: - Approval: Approval - Email: Information E-mail - Review: Review - UserTask: User task - UserTaskWithEmail: User task with E-mail - WorkflowDefinition: - AbleToStart: Able to Start - AddProcessStep: Add process step - ChooseAssignee: - AddUserOrRole: 'Select a group or a user, please:' - SelectedAssigneesFieldSet: Selected assignees - UserTooltip: User - DefaultTemplateDescription: Below is the default template - DeleteProcessStep: Remove process step - Description: Describe your process - DueTimeInDays: Expiry in days - EndStep: End - FormDefinitionStep: Form definition - ProcessNameExists: This process name was used before - ProcessOwner: Process Owner - Processdescription: Process description - Processdetails: Process properties - Processflow: Process flow - Processstep: Process step - Processtype: Type of process - ProcesstypeAdHoc: One time - ProcesstypeRepeating: Repeatable - TaskType: Task Type - UntilDaysTooltip: After expiry, the task will be assigned to Everybody and its priority becomes High. - UserInterface: - ChangeSettingWarning: All defined tasks will be deleted. Are you sure? - CreateOwn: Create own - UseDefault: Use default - UserInterface: User Interface - WorkflowPropertiesStep: Workflow properties - requiredMsgs: - ReqMsgGeneric: ' is a required field!' - processStep: Process Step Labels: - AdhocWorkflow: Describe your Workflow AppendTask-Explain: The task is added to the sequence after my task. AppendTheTask: Append the task CreateNewDashboard: Create new dashboard @@ -1702,9 +1488,7 @@ Labels: TaskUser-Explain: Comma separated list of users ToggleMenu: Toggle menu ViewAllResults: View all results - adhocTaskRequired: You must add at least one new task. disabledUserPrefix: (disabled) - title: Self Service Ad-hoc Workflow patterns: datePattern: dd.MM.yyyy dateTimePattern: dd.MM.yyyy HH:mm @@ -1734,18 +1518,7 @@ Processes: SynchronizeServerConfigurationCaseName: Synchronize server configuration portalHome: Portal Home portalSettingSaved: Portal settings are saved -ProcessPages: - selfServiceAdhocProcess: Axon Ivy Self Service - selfServiceDescription: 'Self Service Prozess: Launch an ad-hoc Workflow based on a predefined flow pattern.' Texts: - Adhoc-Explain: |+ -

- - Enter your comment and press Send to proceed the workflow. - -

- - AdhocWF-Explain: "

\n\nDefine and launch a Workflow at your fingertip: Select a flow pattern, add some tasks and start the Workflow. \n\n

\n\n

\n\n\n\n

\n\n" Approval-Explain: |+

diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index ff26912e4bf..5a4b128adfd 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -1,26 +1,11 @@ -Categories: - AdhocExpressTasks: - name: Tareas Adhoc de Express - CreateExpressWorkflow: - name: Crear Express Workflow - ExpressWorkflow: - name: Flujo de trabajo exprés ch.ivy.addon.portal.generic: CaseDetailsTemplate: noCaseId: No hay ID de caso especificado requestTabTitle: Solicitud statusTabTitle: Información del caso OpenTaskTemplate: - adhocHistory: Historial del proceso AdHoc - adhocHistoryTooltip: Mostrar historial del proceso AdHoc browserTabClosingWarning: Puede perder su trabajo en progreso. ¿Quiere continuar? - goToAdhocWarning: Puede perder su trabajo en progreso e iniciar el proceso Ad-hoc. ¿Quiere continuar? goToSidestepWarning: Sus modificaciones actuales no se guardarán cuando se inicie un proceso de paso lateral directamente desde una tarea. ¿Quiere continuar? - noteOfResultFromAdhocProcess: 'Nota: podrá encontrar este historial también en el historial del caso.' - reCreateAdhocWarning: Ya existe un proceso AdHoc para esta tarea. ¿Desea crear un proceso nuevo? - resultFromAdhocProcess: Resultados del proceso AdHoc - startAdHoc: Comenzar Adhoc - startAdHocTooltip: Redirija este proceso usando pasos ad-hoc PortalName: PortalName: Portal ch.ivy.addon.portalkit.ui.jsf: @@ -111,7 +96,6 @@ ch.ivy.addon.portalkit.ui.jsf: BY_CUSTOM_ORDER: Pedido personalizado BY_INDEX: Índice de clasificación ProcessType: - EXPRESS_PROCESS: Flujo de trabajo exprés EXTERNAL_LINK: Link externo IVY_PROCESS: Proceso de negocio ProcessWidgetMode: @@ -253,7 +237,6 @@ ch.ivy.addon.portalkit.ui.jsf: enableProcessViewer: Defina esta propiedad como true para habilitar la opción de visor de procesos en las acciones de Tarea/Caso enableScriptCheckingForUploadedDocumentNote: 'Cambiar a "True" para activar el control de anexos permitidos. De momento se pueden controlar archivos en PDF, word y excel. ' enableVirusScannerForUploadedDocumentNote: Cambiar a "true" para habilitar el escáner de virus para el documento cargado. Actualmente esta función utiliza la API VIRUSTOTAL. - expressEndPageNote: Mostrar la página de final de flujo de trabajo express propia. hideCaseCreator: |- Establecer a true para ocultar el creador de casos en la lista de casos, widget de casos y detalles de casos. Este ajuste afecta a todas las consultas de casos, por ejemplo, para la lista de casos, la búsqueda global o la estadística. @@ -429,7 +412,6 @@ ch.ivy.addon.portalkit.ui.jsf: add: Añadir addDocument: Agregar documento addNote: Agregar nota - adhoc: Adhoc allCategories: Todas las categorias allowPng: Solo se permiten los tipos png apply: Aplicar @@ -652,45 +634,6 @@ ch.ivy.addon.portalkit.ui.jsf: noUser: No hay usuarios tooltipHelper: Click para ver todos los usuarios que tienen este rol de forma directa o indirecta userOfRoleTitle: 'Usuarios del rol {0} ' - expressManagement: - deployButton: Desplegar - deployMessage: Desplegando procesos - exportExpress: Export Express - exportExpressProcessTitle: 'Exportar procesos Express ' - expressExportName: AXONIVY_Dataset_ExpressWorkflow_{0}.json - expressManagement: Gestionar Express - expressMessages: - deployErrorLog: Error durante el despliegue {0} - deploymentFinishedLog: Proceso(s) del archivo {0} han sido desplegados con éxito en {1}ms - endDeployLog: Despliegue Express finalizado - invalidVersionLog: Versión de Express {0} no apoyada - process: - duplicateProcessNameLog: Nombre de proceso duplicado {0} - installProcessFailedLog: Error al desplegar proceso {0} - installProcessFinishedLog: Instalación de proceso {0} con éxito. - installedProcessLog: Procesos instalados {0} - startDeployProcessLog: Comienzo de la instalación del proceso {0} - startDeployLog: Empezando el despliegue de los procesos del documento {0} - status: - error: Error - failed: Error - info: Info - successful: Éxito - warning: Atención - validate: - validateExpressVersion: La variable "Version Express" no ha sido encontrada. Por favor contacte a su administrador. - validateProcessCoOwnerLog: '- Validación del copropietario del proceso {0}. Usuario {1} no existe en el sistema' - validateProcessOwnerLog: '- Validación del propietario del proceso {0}. Usuario {1} no existe en el sistema. Cambie el propietario a {2}' - validateProcessPermissionLog: '- Validación del permiso para el proceso {0}. Usuario {1} no existe en el sistema' - validateTaskDefUserLog: '- Validación del responsable de tarea {0}. Usuario {1} no existe en el sistema' - versionLog: 'Versión de Express: {0}' - fileEmptyMessage: Archivo está vacío - importDialogHeaderTitle: Seleccione un archivo de procesos Express. El formato tiene que ser JSON. - importExpress: Importar Express - importExpressProcessTitle: Importar procesos Express - importHeaderTitle: 'Lista de procesos Express será exportada:' - processCount: proceso(s) - waitingMessage: Coleccionando datos… passwordValidation: criteria: Criterios enablePasswordValidation: Activar la validación de contraseñas @@ -958,6 +901,7 @@ ch.ivy.addon.portalkit.ui.jsf: processElementId: ID del elemento del proceso stackTrace: Conjunto de trazas forgotPassword: + EmailAddress: Dirección de E-Mail empty: Vacío forgotPassword: Olvidé mi contraseña forgotPasswordError: Ha habido un error mientras se procesaba su solicitud. Por favor inténtelo más tarde. @@ -1066,7 +1010,6 @@ ch.ivy.addon.portalkit.ui.jsf: addNewProcess: Agregar nuevo proceso addNewProcessDialogHeader: Agregar nuevo proceso de usuario backToOverview: De regreso a la visión general - deleteExpressWorkflowTooltip: Eliminar Express Workflow deleteExternalLinkTooltip: Borrar enlace externo deleteProcess: Eliminar proceso deleteProcessItemConfirmation: ¿Seguro que quiere eliminar el siguiente proceso? @@ -1077,9 +1020,7 @@ ch.ivy.addon.portalkit.ui.jsf: dialogEditInfoTitle: '{0} Información' dialogHeaderDescription: Aqui puede configurar parámetros relacionados con el proceso seleccionado. dialogHeaderTitle: Editar información para {0} - editExpressWorkflowTooltip: Editar Express Workflow editProcesses: Editar procesos - expressWorkflow: Workflow Express externalLink: Enlace externo externalLinkVisibility: Visibilidad goTo: 'Ir a:' @@ -1116,8 +1057,6 @@ ch.ivy.addon.portalkit.ui.jsf: process: Proceso searchResults: Resultados de la búsqueda searchResultsFor: '{0} resultados de búsqueda para "{1}"' - sidestep: - addAdhocTask: Añadir tarea Ad-hoc taskActivator: assign: Asignar cannotAssignTask: Esta tarea no puede ser asignada a otro usuario o grupo. @@ -1162,7 +1101,6 @@ ch.ivy.addon.portalkit.ui.jsf: expiry: Expiración failedDelayValidation: La marca de tiempo del retraso de la tarea no puede ser un valor vacío o un formato de fecha inválido failedExpiryValidation: La fecha de vencimiento de la tarea no puede estar en el pasado. - noAdhoc: Proceso AdHoc no disponible noDescription: Sin descripción noNotes: Sin notas processingTime: Tiempo de procesado @@ -1314,60 +1252,13 @@ Dialogs: CaseDescription: Editar un flujo de trabajo existente CaseName: Editar flujo de trabajo Tasks: - CreateWorkflow: - TaskDescription: Flujo de trabajo ha sido creado - TaskName: Flujo de trabajo ha sido creado - EditWorkflow: - TaskDescription: Un flujo de trabajo ha sido editado - TaskName: Flujo de trabajo editado - FinalReview: - TaskName: Control final - FinalWorkflowTask: - taskDescription: ¡El flujo de trabajo {0} ha sido {1}! - FormDefinition: - TaskDescription: ¡Por favor define el formulario! - TaskName: ¡Creación de formulario! - ProcessLoaded: - TaskName: Tarea para configurar el proceso Adhoc - SaveWorkflow: - TaskName: El flujo de trabajo express en tramitación TaskDetail: DataDescription: Datos y Descripción restoreToDefaultSettings: 'Restablecer la configuración por defecto ' switchToEditMode: Editar switchToViewMode: Guardar - WorkflowProperties: - TaskDescription: ¡Por favor configure las propiedades del flujo de trabajo! - TaskName: Propiedades del flujo de trabajo - WorkflowExecution: - ApprovalForm: - Approve: Aprobar - ApproveComment: Aprobar - CommentLabel: Comentario del aprobador - FieldSetApplicant: Solicitante - FieldSetForm: Formulario - FinishedTasks: Tareas terminadas - Fullname: Nombre completo - Reject: Rechazar - RejectComment: Rechazar - FinalReviewForm: - approvalStatus: Estado del aprobado - approver: Aprovador - noticed: Verificado - FinishedTasksForm: - Applicant: Solicitante - ApprovalResult: Estado del aprobado - FinishedTasks: Tareas terminadas - FormDetails: Detalles del formulario - UserTaskForm: - ApprovalResult: - Approved: Aprobado - Rejected: Rechazado - Formular: Formulario agileBPM: - TooltipForOriginalTask: Su tarea actual volverá a evaluarse cuando estén completados los flujos de trabajo ad hoc previos. define_WF: - AdhocWorkflowTasks: Tareas del flujo de trabajo ErrorSelectInvalidAssignee: El destinatario ya está seleccionado o es inválido ListOfSelectedUser: Lista de usuarios seleccionados ResponsibleDialogHeader: Usuarios responsables @@ -1384,14 +1275,6 @@ Dialogs: ch: ivy: addon: - express: - generic: - endpage: - subtitle: La última tarea se completó con éxito. - title: ¡Tarea completada con éxito! - expressNoItem: Aún no se ha completado ninguna Tarea Express - expressNoItemDescription: Aquí se mostrarán los resultados de las tareas completadas - expressWorkflowName: 'Detalles de negocio del caso #{0}' portal: generic: GlobalSearch: @@ -1502,104 +1385,7 @@ Dialogs: invalidFileMessage: Tipo de archivo no permitido invalidSizeMessage: ¡El archivo es muy grande! maximumFileUploadElement: Ya existe un elemento de subir documentos - workflowCreation: - AdhocProcessName: Proceso adHoc para la tarea {0} - {1} - FormDefinition: - AddCheckboxField: Agregar nuevo campo - AddOptionboxField: Anexar nueva opción - AllowedFiletypes: Tipos de Archivo permitidos - BroadFooterArea: Pie de pagina amplio - BroadHeaderArea: Encabezado amplio - CheckboxFields: Campos de casillas de verificación - CreateField: Crear - DataProvider: Proveedor de datos - DragAndDropTooltip: Arrastre y suelte los elementos disponibles al encabezado, columna de la izquierda o de la derecha o al pie de página - ElementLabel: Etiqueta - ElementName: Nombre del elemento - Email: - Attachment: Anexo - EmailAddress: Dirección de E-Mail - EmailText: Texto de E-Mail - ResponseTo: Respuesta a - Subject: Asunto - ExecuteWorkflow: Ejecutar flujo de trabajo directamente - ExecuteWorkflowWarning: Tiene que procesar todas las tareas antes de poder ejecutar este processo - FieldSetAvailableFormelements: Elementos del formulario - FieldSetFormelements: Crear elementos de formulario - FieldSetFormelementsPlacing: Ubicación de elementos de formulario - FieldSetPreviewArea: Vista previa del formulario definido - FinishWorkflow: Fin del flujo de trabajo - InputArea: Área de entrada - InputCheckbox: Casilla de verificación - InputField: Campo de entrada - InputFileUpload: Carga de archivo - InputOptions: Botón Radial - InputType: Tipo de Entrada - InputTypes: - DateSelection: Seleccionador de Fecha - NumberField: Campo de numero - TextBox: Campo de texto - LeftColumn: Columna izquierda - NoCheckboxFieldYet: No hay campos de verificación definidos todavía - NoDataProvider: Proveedor de datos - NoFormelementsAvailable: ¡No hay elementos de formulario disponibles! - NoOptionboxFieldsYet: No hay tipos de casillas de verificación definidos todavía - NumberOfFiles: Numero de archivos - NumberOfRows: Numero de filas - OptionboxFields: Botones Radiales - OptionboxPlaceholder: Opción - Preview: Vista previa - RightColumn: Columna derecha - SaveWorkflow: Guardar Flujo de trabajo - UploadFileFormat: - Excel: Excel (xls/xlsx) - OtherFormats: Otros formatos de archivo - PDF: PDF (pdf) - Word: Word (doc/docx) - cancelCreateForm: 'Seguro que quiere cancelar? Perderá todos los datos. ' - otherFiletype: Otros tipos de archivos - ProcessName: Crear Flujo de Trabajo Express - TaskType: - Approval: Aprobado - Email: E-Mail de información - Review: Comprobación - UserTask: Tarea - UserTaskWithEmail: 'Tarea con E-Mail ' - WorkflowDefinition: - AbleToStart: Permiso de ejecución - AddProcessStep: Agregar paso de proceso - ChooseAssignee: - AddUserOrRole: 'Selecione un grupo o usuario porfavor:' - SelectedAssigneesFieldSet: Usuarios seleccionados - UserTooltip: Usuario - DefaultTemplateDescription: Abajo verá el patrón estandard - DeleteProcessStep: Retirar paso del proceso - Description: Describa su proceso - DueTimeInDays: Expiración en días - EndStep: Terminar - FormDefinitionStep: Definición de formulario - ProcessNameExists: Este nombre para el flujo de trabajo ya ha sido seleccionado - ProcessOwner: Responsable del proceso - Processdescription: Descripción de proceso - Processdetails: Propiedades del proceso - Processflow: Flujo de proceso - Processstep: Paso del proceso - Processtype: Tipo de proceso - ProcesstypeAdHoc: Una vez - ProcesstypeRepeating: Recurrente - TaskType: Tipo de tarea - UntilDaysTooltip: Después de la fecha de caducidad, esta tarea será asignada al grupo "todos" y su prioridad será alta - UserInterface: - ChangeSettingWarning: Todas las tareas definidas serán borradas, desea proceder? - CreateOwn: Crear propia - UseDefault: Usar patrón estandard - UserInterface: Interfaz de usuario - WorkflowPropertiesStep: Propiedades del flujo de trabajo - requiredMsgs: - ReqMsgGeneric: ¡Es un campo requerido! - processStep: Paso del proceso Labels: - AdhocWorkflow: Describe tu Flujo de Trabajo AppendTask-Explain: La tarea es añadida a la secuencia después de mi tarea. AppendTheTask: Anexar la tarea CreateNewDashboard: Crear un nuevo cuadro de mandos @@ -1697,9 +1483,7 @@ Labels: TaskUser-Explain: Lista de usuario separados por coma ToggleMenu: Menú alternativo ViewAllResults: Ver todos los resultados - adhocTaskRequired: Deberá agregar al menos una tarea. disabledUserPrefix: (inactivo) - title: Flujo de trabajo Ad-hoc de auto servicio patterns: datePattern: dd.MM.yyyy dateTimePattern: dd.MM.yyyy HH:mm @@ -1729,18 +1513,7 @@ Processes: SynchronizeServerConfigurationCaseName: Sincronizar configuración del servidor portalHome: Portal Principal portalSettingSaved: Ajustes del portal guardados -ProcessPages: - selfServiceAdhocProcess: Auto servicio Axon Ivy - selfServiceDescription: 'Proceso de auto servicio: Lanzar un flujo de trabajo ad-hoc basado en un patrón de flujo predefinido' Texts: - Adhoc-Explain: |+ -

- - Introduzca sus comentarios y presione Enviar para proceder al flujo de trabajo. - -

- - AdhocWF-Explain: "

\n\nDefinir y lanzar un flujo de trabajo es muy sencillo: seleccione un patrón de flujo, agregue algunas tareas y empieze el flujo de trabajo. \n\n

\n\n

\n\n\n\n

\n\n" Approval-Explain: |+

diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 4fe4a3ffa1b..7e9c1bd8225 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -1,26 +1,11 @@ -Categories: - AdhocExpressTasks: - name: Tâches Adhoc Express - CreateExpressWorkflow: - name: Créer un workflow express - ExpressWorkflow: - name: Flux de travail express ch.ivy.addon.portal.generic: CaseDetailsTemplate: noCaseId: Aucun numéro de dossier n'a été indiqué requestTabTitle: Demande statusTabTitle: Informations sur le dossier OpenTaskTemplate: - adhocHistory: l'historique adhoc - adhocHistoryTooltip: Afficher l'historique adhoc browserTabClosingWarning: Votre travail risque d'être perdu. Souhaitez-vous continuer ? - goToAdhocWarning: En démarrant un processus ad hoc, vos données non sauvegardées seront perdues. Voulez-vous continuer? goToSidestepWarning: En démarrant un processus sidestep, vos données non sauvegardées seront perdues. Voulez-vous continuer? - noteOfResultFromAdhocProcess: 'Remarque : Vous trouverez également toutes ces entrées dans l''historique du processus.' - reCreateAdhocWarning: Il existe déjà un processus ad hoc pour cette tâche, voulez-vous en créer un autre ? - resultFromAdhocProcess: Résultats du processus ad hoc - startAdHoc: Démarrer ad-hoc - startAdHocTooltip: Rediriger ce processus en ajoutant une étape ad hoc. PortalName: PortalName: Portal ch.ivy.addon.portalkit.ui.jsf: @@ -111,7 +96,6 @@ ch.ivy.addon.portalkit.ui.jsf: BY_CUSTOM_ORDER: Commande personnalisée BY_INDEX: Index de tri ProcessType: - EXPRESS_PROCESS: Flux de travail express EXTERNAL_LINK: Lien externe IVY_PROCESS: Processus d'entreprise ProcessWidgetMode: @@ -250,7 +234,6 @@ ch.ivy.addon.portalkit.ui.jsf: enableProcessViewer: Définissez cette propriété à true pour activer l'option de visualisation de processus dans les actions de Task/Case. enableScriptCheckingForUploadedDocumentNote: Défini sur true pour activer la vérification de script pour le document téléchargé. Actuellement, cette fonction prend en charge la vérification de PDF, Excel, Word. enableVirusScannerForUploadedDocumentNote: Définie sur true pour activer le scanner de virus pour le document téléchargé. Actuellement, cette fonction utilise l'API VIRUSTOTAL. - expressEndPageNote: Affiche la page de fin personnalisée à la fin de chaque processus Express. hideCaseCreator: |- La valeur "true" permet de masquer le créateur du dossier dans la liste des dossiers, le widget du dossier et les détails du dossier. Ce paramètre affecte toutes les requêtes de cas, par exemple pour la liste des cas, la recherche globale, les statistiques. @@ -426,7 +409,6 @@ ch.ivy.addon.portalkit.ui.jsf: add: Ajouter addDocument: Ajouter un document addNote: Ajouter une note - adhoc: Adhoc allCategories: Toutes les catégories allowPng: Seulement les types .png autorisés apply: Utiliser @@ -649,45 +631,6 @@ ch.ivy.addon.portalkit.ui.jsf: noUser: Il n'y a pas d'utilisateurs. tooltipHelper: Cliquez pour afficher tous les utilisateurs qui possèdent ce rôle directement ou indirectement userOfRoleTitle: Utilisateur du groupe {0} - expressManagement: - deployButton: Déployer - deployMessage: 'Déploiement des processus en cours ... ' - exportExpress: Export Express - exportExpressProcessTitle: Exporter des processus express - expressExportName: AXONIVY_Dataset_ExpressWorkflow_{0}.json - expressManagement: Gestion de l'express - expressMessages: - deployErrorLog: Erreur lors du déploiement {0} - deploymentFinishedLog: Processus du fichier {0} déployé avec succès dans Portal en {1}ms - endDeployLog: Déploiement Express terminé - invalidVersionLog: Version non supportée {0} d'Express - process: - duplicateProcessNameLog: '- Nom du processus dupliqué {0}' - installProcessFailedLog: '- Le déploiement du processus {0} a échoué' - installProcessFinishedLog: Installation du processus {0} réussie - installedProcessLog: Processus installé {0} - startDeployProcessLog: Commencer à déployer le processus {0} - startDeployLog: Commencez à déployer le(s) processus Express du fichier {0} vers Portal - status: - error: Erreur - failed: Echoué - info: Info - successful: Succès - warning: Attention - validate: - validateExpressVersion: Impossible de trouver la variable Express Version dans le système. Veuillez contacter votre administrateur. - validateProcessCoOwnerLog: '- Valider le processus Copropriétaire de {0}, l''utilisateur {1} n''est pas disponible dans le système' - validateProcessOwnerLog: '- Valider le propriétaire du processus de {0}, l''utilisateur {1} n''est pas disponible dans le système, changer le propriétaire du processus pour {2}.' - validateProcessPermissionLog: '- Valider la permission de processus de {0}, l''utilisateur {1} n''est pas disponible dans le système' - validateTaskDefUserLog: '- Valider les responsabilités de la définition de tâche de {0}, l''utilisateur {1} n''est pas disponible dans le système' - versionLog: 'Version de l''Express : {0}' - fileEmptyMessage: Le fichier est vide - importDialogHeaderTitle: Choisissez un Dataset de workflow Express, il doit s'agir d'un fichier JSON. - importExpress: Importation Express - importExpressProcessTitle: Importation de processus express - importHeaderTitle: 'La liste des processus Express sera exportée :' - processCount: processus(s) - waitingMessage: Les données sont recueillies … passwordValidation: criteria: Critères enablePasswordValidation: Activer la validation du mot de passe @@ -955,6 +898,7 @@ ch.ivy.addon.portalkit.ui.jsf: processElementId: Id de l'élément de processus stackTrace: StackTrace forgotPassword: + EmailAddress: Adresse e-mail empty: Vide forgotPassword: J'ai oublié mon mot de pas forgotPasswordError: Une erreur s'est produite lors du traitement de votre demande. Veuillez réessayer plus tard. @@ -1063,7 +1007,6 @@ ch.ivy.addon.portalkit.ui.jsf: addNewProcess: Ajouter un processus addNewProcessDialogHeader: Ajouter un nouveau processus utilisateur backToOverview: Retour à l'aperçu - deleteExpressWorkflowTooltip: Supprimer le Workflow Express deleteExternalLinkTooltip: Supprimer le lien externe deleteProcess: Supprimer processus deleteProcessItemConfirmation: Êtes-vous sûr de vouloir détruire le processus suivant ? @@ -1074,9 +1017,7 @@ ch.ivy.addon.portalkit.ui.jsf: dialogEditInfoTitle: '{0} Informations' dialogHeaderDescription: Dans cette zone, vous pouvez modifier certaines informations relatives au processus sélectionné. dialogHeaderTitle: Modifier les informations pour {0} - editExpressWorkflowTooltip: Modifier le Workflow Express editProcesses: Modifier des processus - expressWorkflow: Workflow Express externalLink: lien externe externalLinkVisibility: Visibilité goTo: 'Aller à:' @@ -1113,8 +1054,6 @@ ch.ivy.addon.portalkit.ui.jsf: process: Processus searchResults: Résultats de la recherche searchResultsFor: '{0} résultats pour "{1}"' - sidestep: - addAdhocTask: Ajouter une Ad-hoc tâche taskActivator: assign: Assigner cannotAssignTask: Cette tâche ne peut être assignée à aucun autre utilisateur ou groupe. @@ -1159,7 +1098,6 @@ ch.ivy.addon.portalkit.ui.jsf: expiry: Expiration failedDelayValidation: L'horodatage du délai des tâches ne peut pas être une valeur vide ou un format de date non valide failedExpiryValidation: L'horodatage de l'expiration des tâches ne peut pas être dans le passé. - noAdhoc: Pas d'Adhoc disponible noDescription: Aucune description noNotes: Aucune note processingTime: Durée de traitement @@ -1311,60 +1249,13 @@ Dialogs: CaseDescription: Modifier un workflow existant CaseName: Modifier workflow Tasks: - CreateWorkflow: - TaskDescription: Le workflow a été créé - TaskName: Le workflow a été créé - EditWorkflow: - TaskDescription: Un processus a été modifié. - TaskName: Processus modifié - FinalReview: - TaskName: Finales chèques - FinalWorkflowTask: - taskDescription: Le workflow {0} a été terminé! - FormDefinition: - TaskDescription: Veuillez définir le formulaire ! - TaskName: Création du formulaire! - ProcessLoaded: - TaskName: Tâche pour la configuration Adhoc - SaveWorkflow: - TaskName: Création de workflow express en cours TaskDetail: DataDescription: Données et description restoreToDefaultSettings: Rétablir les paramètres par défaut switchToEditMode: Editer switchToViewMode: Enregistrer - WorkflowProperties: - TaskDescription: Veuillez configurer les propriétés du workflow ! - TaskName: Propriétés de workflow - WorkflowExecution: - ApprovalForm: - Approve: Approuver ! - ApproveComment: Approuver - CommentLabel: Commentaire de l'approbateur - FieldSetApplicant: Demandeur - FieldSetForm: Formulaire - FinishedTasks: Tâches finies - Fullname: Nom complet - Reject: Refuser ! - RejectComment: Refuser - FinalReviewForm: - approvalStatus: Statut d'approbation - approver: Approbateur - noticed: Prendre acte! - FinishedTasksForm: - Applicant: Demandeur - ApprovalResult: Résultat d'approbation - FinishedTasks: Tãches finies - FormDetails: Détails du formulaire - UserTaskForm: - ApprovalResult: - Approved: Approuvé - Rejected: Refusé - Formular: Formulaire agileBPM: - TooltipForOriginalTask: 'Votre tâche actuelle réapparaîtra dès que le workflow ad hoc sera terminé. ' define_WF: - AdhocWorkflowTasks: Tâches du workflow ErrorSelectInvalidAssignee: Le destinataire est déjà sélectionné ou invalide ListOfSelectedUser: Liste des utilisateurs sélectionnés ResponsibleDialogHeader: Utilisateurs responsables @@ -1381,14 +1272,6 @@ Dialogs: ch: ivy: addon: - express: - generic: - endpage: - subtitle: La dernière tâche a été accomplie avec succès - title: Tâche terminée avec succès! - expressNoItem: Pas de tâche Express terminée - expressNoItemDescription: Les résultats des tâches terminées sont affichés ici - expressWorkflowName: 'Détails de cas #{0}' portal: generic: GlobalSearch: @@ -1499,104 +1382,7 @@ Dialogs: invalidFileMessage: Ce type de fichier n'est pas accepté! invalidSizeMessage: Le fichier est trop volumineux ! maximumFileUploadElement: Il existe déjà un élément de téléchargement de fichiers - workflowCreation: - AdhocProcessName: AdHoc processues pour tâche {0} - {1} - FormDefinition: - AddCheckboxField: Ajouter un nouveau champs - AddOptionboxField: Ajouter une nouvelle option - AllowedFiletypes: Types de fichier autorisés - BroadFooterArea: Zone de bas de page large - BroadHeaderArea: En-tête large - CheckboxFields: Champs de cases à cocher - CreateField: Créer - DataProvider: Fournisseur de données - DragAndDropTooltip: Veuillez placer les éléments disponibles par glisser/déposer dans l’en-tête, dans la colonne de droite ou en pied de page. - ElementLabel: Label - ElementName: Nom de l’élément - Email: - Attachment: Pièce jointe - EmailAddress: Adresse e-mail - EmailText: Texte d'email - ResponseTo: Réponse à - Subject: Sujet - ExecuteWorkflow: Lancer le workflow directement - ExecuteWorkflowWarning: Vous devez effectuer toutes les tâches avant de pouvoir exécuter ce workflow - FieldSetAvailableFormelements: Éléments de formulaire - FieldSetFormelements: Créer un élément de formulaire - FieldSetFormelementsPlacing: Placer les éléments de formulaire - FieldSetPreviewArea: Pré-visualiser le formulaire - FinishWorkflow: Fin de workflow - InputArea: Zone de texte - InputCheckbox: Case d’option à cocher - InputField: Champ de texte - InputFileUpload: Téléchargement de fichier - InputOptions: Bouton radio - InputType: Type d’entrée - InputTypes: - DateSelection: Calendrier - NumberField: Champ numérique - TextBox: Champ de texte - LeftColumn: Colonne de gauche - NoCheckboxFieldYet: Aucun type de champ de case d’option à cocher n’est pour l’instant défini - NoDataProvider: Fournisseur de données statiques spéciales - NoFormelementsAvailable: Aucun élément de formulaire n’est disponible ! - NoOptionboxFieldsYet: Aucun type de case d’’option à cocher n’est pour l’instant défini - NumberOfFiles: Nombre de fichiers - NumberOfRows: Nombre de lignes - OptionboxFields: Boutons radio - OptionboxPlaceholder: Option - Preview: Aperçu - RightColumn: Colonne de droite - SaveWorkflow: Sauvegarder le workflow - UploadFileFormat: - Excel: Excel (xls/xlsx) - OtherFormats: Autres formats de fichier - PDF: PDF (pdf) - Word: Word (doc/docx) - cancelCreateForm: Voulez-vous vraiment annuler? Toutes vos données seront perdues! - otherFiletype: Autres types de fichier - ProcessName: Créer un flux de travail Express - TaskType: - Approval: Approbation - Email: email d'information - Review: Revue - UserTask: Tâche - UserTaskWithEmail: Tâche avec email - WorkflowDefinition: - AbleToStart: Capable de commencer - AddProcessStep: Ajouter une étape de processus - ChooseAssignee: - AddUserOrRole: 'Veuillez sélectionner un groupe ou un utilisateur :' - SelectedAssigneesFieldSet: Cessionnaires sélectionnés - UserTooltip: Utilisateur - DefaultTemplateDescription: Voici le modèle par défaut - DeleteProcessStep: Supprimer l’étape de processus - Description: Décrivez votre processus - DueTimeInDays: Expiration en jours - EndStep: Fin - FormDefinitionStep: Définition du formulaire - ProcessNameExists: Ce nom de processus a été utilisé avant - ProcessOwner: Propriétaire du processus - Processdescription: Description du processus - Processdetails: Propriétés du processus - Processflow: Flux du processus - Processstep: Étape de processus - Processtype: Type de processus - ProcesstypeAdHoc: Une fois - ProcesstypeRepeating: Rrépétitif - TaskType: Type de tâche - UntilDaysTooltip: Après expiration, la tâche sera assignée au role “Everybody” et sa priorité sera passée en “haute”. - UserInterface: - ChangeSettingWarning: Toutes les tâches définies seront supprimées. Êtes-vous sûr? - CreateOwn: Créer propre - UseDefault: Coutume - UserInterface: Iinterface utilisateur - WorkflowPropertiesStep: Propriétés du workflow ! - requiredMsgs: - ReqMsgGeneric: est un champ obligatoire ! - processStep: Étape du processus Labels: - AdhocWorkflow: Décrivez votre workflow AppendTask-Explain: La tâche est ajoutée à la séquence après ma tâche. AppendTheTask: Ajouter la tâche CreateNewDashboard: Créer un nouveau tableau de bord @@ -1686,9 +1472,7 @@ Labels: TaskUser-Explain: Liste d’utilisateurs séparés par des virgules ToggleMenu: Menu à bascule ViewAllResults: Voir tous les résultats - adhocTaskRequired: Vous devez ajouter au moins une tâche. disabledUserPrefix: (désactivé) - title: Workflow ad hoc Self Service patterns: datePattern: dd.MM.yyyy dateTimePattern: dd.MM.yyyy HH:mm @@ -1718,12 +1502,7 @@ Processes: SynchronizeServerConfigurationCaseName: Synchroniser la configuration du serveur portalHome: Page d'accueil portalSettingSaved: Les paramètres du portail sont enregistrés -ProcessPages: - selfServiceAdhocProcess: Axon Ivy Self Service - selfServiceDescription: 'Processus en libre service: lance un workflow ad hoc basé sur un modèle prédéfini. ' Texts: - Adhoc-Explain: '

Rentrez votre commentaire et cliquez sur Envoyer afin de poursuivre.

' - AdhocWF-Explain: "

\n\nDéfinir et démarrer un workflow en un clic. \n\n

" Approval-Explain: "

\n\nVeuillez choisir et cliquez sur Envoyer pour poursuivre. \n\n

" QA-Explain: |-

diff --git a/AxonIvyPortal/portal/config/variables.yaml b/AxonIvyPortal/portal/config/variables.yaml index 8a4d45cbd59..8822454e377 100644 --- a/AxonIvyPortal/portal/config/variables.yaml +++ b/AxonIvyPortal/portal/config/variables.yaml @@ -33,9 +33,6 @@ Variables: # For switch on/off the display icon in button. ShowButtonIcon: true - # Display the custom end page at the end of each Express process. - ExpressEndPage: true - # This setting is using for SecurityMemberDisplayName component. # If the SecurityMember is a role, set this setting to true to list out all users of this role. # If set to true, icon info is shown beside the role name. @@ -98,10 +95,6 @@ Variables: # [file: json] ExternalLinks: - # The standard express processes of Portal. - # [file: json] - ExpressProcesses: - # Set to true to disable link to Show Information of process on Processes page (grid mode) and Case Details. ShowInformation: true diff --git a/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json b/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json b/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json index 788d1b0623c..da5eb804fdc 100644 --- a/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json +++ b/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json @@ -1068,10 +1068,6 @@ " if (!in.isTaskStartedInDetails || in.backFromTaskDetails) {", " SecurityServiceUtils.removeSessionAttribute(taskEndInfoSessionAttributeKey);", " }", - " ", - " if (in.isTaskFinished) {", - " in.callbackUrl = taskWithTaskEndInfo.customFields().stringField(CustomFields.EXPRESS_END_PAGE_URL.toString()).getOrDefault(\"\");", - " }", " }", " in.caseSelected = task.getCase();", "} else {", @@ -2501,11 +2497,7 @@ "at" : { "x" : 224, "y" : 96 } }, "connect" : [ - { "id" : "S10-f8", "to" : "S10-f7", "label" : { - "name" : "Express end page", - "segment" : 0.47, - "offset" : { "y" : -11 } - } }, + { "id" : "S10-f8", "to" : "S10-f7" }, { "id" : "S10-f2", "to" : "S10-f68", "via" : [ { "x" : 288, "y" : 192 } ] }, { "id" : "S10-f3", "to" : "S10-f17", "via" : [ { "x" : 288, "y" : 288 } ] }, { "id" : "S10-f4", "to" : "S10-f19", "via" : [ { "x" : 256, "y" : 384 } ] }, diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java index e6cdba4d490..2691ea927f8 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java @@ -274,9 +274,7 @@ public void loadBreadcrumb(String viewName, ITask userTask, ICase userCase) { case PROCESS -> buildBreadCrumbForProcess(); case TASK_DETAIL -> buildBreadCrumbForTaskDetails(userTask); case CASE_DETAIL -> buildBreadCrumbForCaseDetails(userCase); - case EXPRESS -> buildBreadCrumbForExpress(); case USER_PROFILE -> buildBreadCrumbForUserProfile(); - case EXPRESS_BUSINESS -> buildBreadCrumbForExpressBusiness(userCase); case ABSENCES_MANAGEMENT -> buildBreadCrumbForAbsences(); case DASHBOARD_CONFIGURATION -> buildBreadCrumbForDashboardConfiguration(); case EDIT_DASHBOARD_DETAILS -> buildBreadCrumbForEditDashboardDetail(); @@ -367,16 +365,6 @@ private void buildBreadCrumbForCaseDetails(ICase userCase) { breadcrumbModel.getElements().add(buildCaseDetailsMenuItem(userCase)); } - private void buildBreadCrumbForExpress() { - setPortalHomeMenuToBreadcrumbModel(); - breadcrumbModel.getElements().add(buildGenericMenuItem("/Categories/ExpressWorkflow/name")); - } - - private void buildBreadCrumbForExpressBusiness(ICase userCase) { - setPortalHomeMenuToBreadcrumbModel(); - breadcrumbModel.getElements().add(buildExpressBusinessMenuItem(Long.toString(userCase.getId()))); - } - private void buildBreadCrumbForDashboardConfiguration() { setPortalHomeMenuToBreadcrumbModel(); breadcrumbModel.getElements() @@ -439,14 +427,6 @@ private MenuItem buildCaseDetailsMenuItem(ICase userCase) { .build(); } - private MenuItem buildExpressBusinessMenuItem(String caseId) { - return DefaultMenuItem.builder() - .value(Ivy.cms().co("/Dialogs/ch/ivy/addon/express/generic/expressWorkflowName", Arrays.asList(caseId))) - .url("#") - .disabled(true) - .build(); - } - private MenuItem buildGenericMenuItem(String cms) { return DefaultMenuItem.builder() .value(Ivy.cms().co(cms)) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java index 12d52a2910f..5fbf065d0b5 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java @@ -7,15 +7,9 @@ import javax.faces.context.FacesContext; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; -import org.primefaces.PrimeFaces; import ch.ivy.addon.portal.generic.navigation.PortalNavigator; -import ch.ivy.addon.portalkit.bo.AdhocHistory; -import ch.ivy.addon.portalkit.enums.AdditionalProperty; -import ch.ivy.addon.portalkit.service.AdhocHistoryService; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.util.TaskUtils; import ch.ivy.addon.portalkit.util.UrlUtils; import ch.ivy.addon.portalkit.util.UserUtils; @@ -36,7 +30,6 @@ public abstract class AbstractTaskTemplateBean implements Serializable { protected List sideStepList; protected IStartableSideStep selectedSideStep; - protected List adhocHistories; protected String caseDetailsLink; protected ITask task; protected ITask currentTask; @@ -49,23 +42,12 @@ public void setSelectedSideStep(IStartableSideStep selectedSideStep) { this.selectedSideStep = selectedSideStep; } - public void startAdhoc(Long taskId) { - String url = ExpressProcessService.getInstance().findExpressAdhocWFLink(); - url = url + "?originalTaskId=" + taskId; - PortalNavigator.redirect(url); - } - public void startSideStep(ITask task) { TaskUtils.resetTask(task); String link = UrlUtils.formatLinkWithEmbedInFrameParam(selectedSideStep.getStartLink().getRelativeEncoded()); PortalNavigator.redirect(link); } - public boolean hasExpressAdhocWF() { - String adhocUrl = ExpressProcessService.getInstance().findExpressAdhocWFLink(); - return !adhocUrl.isEmpty(); - } - public List generateSideStepList(ICase iCase) { if (iCase == null) { return Collections.emptyList(); @@ -87,37 +69,6 @@ private boolean isSkippingTaskList() { return task != null && currentTask != null && currentTask.getId() != task.getId(); } - public boolean hasAdhocTasks(ITask task) { - if (task == null) { - return false; - } - boolean isFirstTimeOpenOriginalAdhocTask = AdditionalProperty.FIRST_TIME_OPEN_ORIGINAL_ADHOC_TASK.toString() - .equals(task.customFields().stringField(AdditionalProperty.FIRST_TIME_OPEN_ORIGINAL_ADHOC_TASK.toString()).getOrNull()); - if (isFirstTimeOpenOriginalAdhocTask) { - PrimeFaces.current().executeScript("PF('adhoc-task-history-dialog').show()"); - } - return AdditionalProperty.ORIGINAL_ADHOC_EXPRESS_TASK.toString().equals(task.customFields().stringField(AdditionalProperty.ORIGINAL_ADHOC_EXPRESS_TASK.toString()).getOrNull()); - } - - public void onCloseAdhocTaskHistoryDialog(ITask task) { - task.customFields().stringField(AdditionalProperty.FIRST_TIME_OPEN_ORIGINAL_ADHOC_TASK.toString()).delete(); - } - - public String getAdhocCreationMessage(Long taskId) { - AdhocHistoryService adhocHistoryService = new AdhocHistoryService(); - boolean hasAdhocHistory = adhocHistoryService.hasAdhocHistory(taskId); - return hasAdhocHistory ? Ivy.cms().co("/ch.ivy.addon.portal.generic/OpenTaskTemplate/reCreateAdhocWarning") : Ivy.cms().co("/ch.ivy.addon.portal.generic/OpenTaskTemplate/goToAdhocWarning"); - } - - public List getAllAdhocHistories(ITask task) { - if (adhocHistories == null && task != null) { - AdhocHistoryService adhocHistoryService = new AdhocHistoryService(); - adhocHistories = adhocHistoryService.getHistoriesByTaskID(task.getId()); - adhocHistories.sort((first, second) -> second.getTimestamp().compareTo(first.getTimestamp())); - } - return adhocHistories; - } - public static String getUserByUsernameAndExternalName(String username, String externalId) { if (StringUtils.isBlank(username)) { return ""; @@ -234,13 +185,6 @@ public void setTask(ITask task) { this.task = task; } - public boolean canStartAdhoc(String isShowStartAdhocButton, - Boolean isCurrentTaskPersistent) { - return StringUtils.isBlank(isShowStartAdhocButton) - ? (hasExpressAdhocWF() && isCurrentTaskPersistent) - : BooleanUtils.toBoolean(isShowStartAdhocButton); - } - public void doNothing() { } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/ChatRendererBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/ChatRendererBean.java index 34313ca3178..dcfff0cca55 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/ChatRendererBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/ChatRendererBean.java @@ -20,7 +20,6 @@ public class ChatRendererBean implements Serializable { private static final long serialVersionUID = 4691697531600235758L; - private static final String EXPRESS_CREATION_TASK = "isExpressCreationTask"; private Boolean isGroupChatRendered; private Boolean isPrivateChatRendered; @@ -56,8 +55,4 @@ public void getGroupChatName() { String groupChatName = Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/case") + "-{caseId}" + " {caseName}"; PrimeFaces.current().executeScript("var groupChatFormat = '" + groupChatName + "'"); } - - public boolean isExpressCreationTask() { - return Ivy.wfTask().customFields().stringField(EXPRESS_CREATION_TASK).get().isPresent(); - } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java index 2872c437bc5..eaba4acc941 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java @@ -24,13 +24,11 @@ import ch.ivy.addon.portal.generic.navigation.PortalNavigator; import ch.ivy.addon.portalkit.bean.IvyComponentLogicCaller; import ch.ivy.addon.portalkit.bean.PortalExceptionBean; -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.dto.UserMenu; import ch.ivy.addon.portalkit.enums.GlobalVariable; import ch.ivy.addon.portalkit.jsf.Attrs; import ch.ivy.addon.portalkit.jsf.ManagedBeans; import ch.ivy.addon.portalkit.service.AnnouncementService; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.service.GlobalSettingService; import ch.ivy.addon.portalkit.service.IvyCacheService; import ch.ivy.addon.portalkit.util.PermissionUtils; @@ -49,7 +47,6 @@ public class UserMenuBean implements Serializable { public static final long TIME_BEFORE_LOST_SESSION = 3 * DateUtils.MILLIS_PER_MINUTE; // 3 minutes public static final String TASK_LEAVE_WARNING_COMPONENT = "task-leave-warning-component"; - private static String expressStartLink; private String targetPage = StringUtils.EMPTY; private String loggedInUser; private boolean isShowGlobalSearch; @@ -311,25 +308,11 @@ private String getURLFromUserMenu(UserMenu menu) { if (menuUrl.contains("http")) { return menuUrl; } - if (StringUtils.isNotBlank(getExpressStartLink())) { - ExpressProcess workflow = ExpressProcessService.getInstance().findExpressProcessByName(menuUrl); - if (workflow != null && PermissionUtils.checkAbleToStartAndAbleToEditExpressWorkflow(workflow) - && StringUtils.isNotBlank(workflow.getId())) { - menu.setUrl(getExpressStartLink() + "?workflowID=" + workflow.getId()); - } - } return menu.getUrl(); } return ""; } - private static String getExpressStartLink() { - if (StringUtils.isEmpty(expressStartLink)) { - expressStartLink = ExpressProcessService.getInstance().findExpressWorkflowStartLink(); - } - return expressStartLink; - } - public void navigateToNotificationOrDisplayWorkingTaskWarning(boolean isWorkingOnATask, ITask task) { if (isWorkingOnATask && task.getState() != TaskState.DONE) { openTaskLosingConfirmationDialog(); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java index 9e617eed6b3..96c5d1375e4 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java @@ -15,9 +15,7 @@ import ch.ivy.addon.portal.generic.navigation.PortalNavigator; import ch.ivy.addon.portal.generic.util.ProcessStepUtils; -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.bo.ExternalLinkProcessItem; -import ch.ivy.addon.portalkit.bo.PortalExpressProcess; import ch.ivy.addon.portalkit.bo.Process; import ch.ivy.addon.portalkit.bo.ProcessStep; import ch.ivy.addon.portalkit.configuration.ExternalLink; @@ -26,10 +24,8 @@ import ch.ivy.addon.portalkit.enums.GlobalVariable; import ch.ivy.addon.portalkit.enums.ProcessType; import ch.ivy.addon.portalkit.mapper.UserProcessMapper; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.service.ExternalLinkService; import ch.ivy.addon.portalkit.service.GlobalSettingService; -import ch.ivy.addon.portalkit.util.PermissionUtils; import ch.ivyteam.ivy.workflow.start.IWebStartable; public abstract class AbstractProcessBean implements Serializable { @@ -44,7 +40,6 @@ public abstract class AbstractProcessBean implements Serializable { public synchronized void init() { List processes = new ArrayList<>(); processes.addAll(findProcesses()); - processes.addAll(findExpressProcesses()); processes.addAll(findExternalLink()); portalProcesses = new CopyOnWriteArrayList(sortProcesses(processes)); } @@ -61,22 +56,6 @@ public String getProcessInformationPageUrl(Process process) { protected abstract List findProcesses(); - protected List findExpressProcesses() { - List processes = new ArrayList<>(); - String expressStartLink = ExpressProcessService.getInstance().findExpressWorkflowStartLink(); - if (StringUtils.isNotBlank(expressStartLink)) { - List workflows = ExpressProcessService.getInstance().findReadyToExecuteProcessOrderByName(); - for (ExpressProcess wf : workflows) { - if (PermissionUtils.checkAbleToStartAndAbleToEditExpressWorkflow(wf)) { - processes.add(wf); - } - } - } - List defaultPortalProcesses = new ArrayList<>(); - processes.forEach(process -> defaultPortalProcesses.add(new PortalExpressProcess(process))); - return defaultPortalProcesses; - } - protected List findExternalLink() { List privateExternalLinks = ExternalLinkService.getInstance().getPrivateConfig(); List externalLinks = new ArrayList<>(privateExternalLinks); @@ -98,7 +77,7 @@ public String getProcessIcon(Process process) { public void startProcess(Process process) throws IOException { String link = process.getStartLink(); - if (process.getType() == ProcessType.EXPRESS_PROCESS || process.getType() == ProcessType.EXTERNAL_LINK) { + if (process.getType() == ProcessType.EXTERNAL_LINK) { FacesContext.getCurrentInstance().getExternalContext().redirect(link); return; } @@ -113,10 +92,6 @@ public boolean isIvyProcess(Process process) { return !Objects.isNull(process) && process.getType() == ProcessType.IVY_PROCESS; } - public boolean isExpressProcess(Process process) { - return !Objects.isNull(process) && process.getType() == ProcessType.EXPRESS_PROCESS; - } - public boolean isExternalLink(Process process) { return !Objects.isNull(process) && process.getType() == ProcessType.EXTERNAL_LINK; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AdminSettingBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AdminSettingBean.java index a9bcd338b16..b19717afd60 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AdminSettingBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AdminSettingBean.java @@ -19,7 +19,6 @@ import ch.ivy.addon.portalkit.enums.GlobalVariable.Option; import ch.ivy.addon.portalkit.enums.PortalPermission; import ch.ivy.addon.portalkit.jsf.Attrs; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.util.PermissionUtils; import ch.ivy.addon.portalkit.util.PrimeFacesUtils; import ch.ivyteam.ivy.environment.Ivy; @@ -33,10 +32,8 @@ public class AdminSettingBean implements Serializable { public static final String APPLICATION_TAB_ID = "application-tab"; public static final String ADMIN_SETTING_TAB_ID = "setting-tab"; public static final String ANNOUNCEMENT_SETTING_TAB_ID = "announcement-tab"; - public static final String EXPRESS_MANAGEMENT_TAB_ID = "express-management-tab"; public static final String ROLE_MANAGEMENT_TAB_ID = "role-management-tab"; public static final String PASSWORD_VALIDATION_TAB_ID = "password-validation-tab"; - private boolean isShowExpressManagementTab; private boolean isShowRoleManagementTab; private boolean isTabChangeEventTriggered; private boolean isShowPasswordValidationTab; @@ -46,7 +43,6 @@ public void initAdminTabViewConfig() { isTabChangeEventTriggered = false; return; } - isShowExpressManagementTab = ExpressProcessService.getInstance().findExpressCreationProcess() != null; isShowRoleManagementTab = canSeeRoleManagement(); isShowPasswordValidationTab = canSeePasswordValidation(); initApplicationTab(); @@ -65,11 +61,6 @@ public void onTabChange(TabChangeEvent tabChangeEvent) { case ANNOUNCEMENT_SETTING_TAB_ID: initAnnouncementTab(); break; - case EXPRESS_MANAGEMENT_TAB_ID: - if (isShowExpressManagementTab) { - initExpressManagementTab(); - } - break; case ROLE_MANAGEMENT_TAB_ID: break; case PASSWORD_VALIDATION_TAB_ID: @@ -85,10 +76,6 @@ private void initApplicationTab() { invokeAdminSettingsComponentLogic("#{logic.initApplicationSettings}", new Object[] {}); } - private void initExpressManagementTab() { - PrimeFacesUtils.executeScript("refreshExpressManagement()"); - } - private void initAnnouncementTab() { invokeAdminSettingsComponentLogic("#{logic.initAnnouncementSettings}", new Object[] {}); } @@ -142,15 +129,6 @@ public String getDropdownItemlabel(Object item) { return String.valueOf(item); } - public boolean isShowExpressManagementTab() { - return isShowExpressManagementTab; - } - - public void setShowExpressManagementTab(boolean isShowExpressManagementTab) { - this.isShowExpressManagementTab = isShowExpressManagementTab; - } - - public boolean isShowRoleManagementTab() { return isShowRoleManagementTab; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CaseActionBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CaseActionBean.java index 9a5fb700f83..b3a82791d21 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CaseActionBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CaseActionBean.java @@ -16,13 +16,10 @@ import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; -import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import ch.ivy.addon.portal.generic.navigation.PortalNavigator; -import ch.ivy.addon.portalkit.constant.CustomFields; import ch.ivy.addon.portalkit.enums.GlobalVariable; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.service.GlobalSettingService; import ch.ivy.addon.portalkit.service.exception.PortalException; import ch.ivy.addon.portalkit.util.PermissionUtils; @@ -51,14 +48,7 @@ public void initCaseActions() { } public String getAdditionalCaseDetailsPageUri(ICase iCase) { - String additionalCaseDetailsPageUri = EMPTY; - if (isExpressCase(iCase)) { - additionalCaseDetailsPageUri = - ExpressProcessService.getInstance().findExpressBusinessViewStartLink() + "?uuid=" + iCase.uuid(); - } else { - additionalCaseDetailsPageUri = getBusinessDetailUrlFromCustomField(iCase); - } - return additionalCaseDetailsPageUri; + return getBusinessDetailUrlFromCustomField(iCase); } @@ -197,13 +187,8 @@ public String getProcessViewerPageUri(ICase selectedCase) { return PortalProcessViewerUtils.getStartProcessViewerPageUri(selectedCase); } - private boolean isExpressCase(ICase iCase) { - return BooleanUtils.toBoolean(iCase.customFields().stringField(CustomFields.IS_EXPRESS_PROCESS).getOrNull()); - } - public boolean showProcessOverviewLink(ICase iCase) { - return GlobalSettingService.getInstance().findGlobalSettingValueAsBoolean(GlobalVariable.SHOW_PROCESS_INFORMATION) - && !isExpressCase(iCase) && iCase.isBusinessCase(); + return GlobalSettingService.getInstance().findGlobalSettingValueAsBoolean(GlobalVariable.SHOW_PROCESS_INFORMATION); } public String getProcessOverviewPageUri(ICase iCase) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CombinedDashboardProcessBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CombinedDashboardProcessBean.java index 9e8e721ae9e..d7750c87756 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CombinedDashboardProcessBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CombinedDashboardProcessBean.java @@ -77,9 +77,7 @@ public void updateProcessStartId() { if (CollectionUtils.isEmpty(startableProcessStarts)) { initStartableProcessStarts(); } - - if (getWidget() != null && getWidget().getProcess() != null - && getWidget().getProcess().getType() != ProcessType.EXPRESS_PROCESS) { + if (getWidget() != null && getWidget().getProcess() != null) { String startLink = getWidget().getProcess().getStartLink(); IProcessStart processStart = startableProcessStarts.stream() .filter(process -> process.getLink().getRelative().equals(startLink)).findFirst().get(); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactDashboardProcessBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactDashboardProcessBean.java index e906ebc84e7..752d065ccc8 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactDashboardProcessBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactDashboardProcessBean.java @@ -15,7 +15,6 @@ import javax.faces.bean.ViewScoped; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; import ch.ivy.addon.portalkit.dto.dashboard.ColumnModel; import ch.ivy.addon.portalkit.dto.dashboard.CompactProcessDashboardWidget; @@ -24,7 +23,6 @@ import ch.ivy.addon.portalkit.enums.DashboardStandardProcessColumn; import ch.ivy.addon.portalkit.enums.ProcessSorting; import ch.ivy.addon.portalkit.jsf.ManagedBeans; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.util.DashboardWidgetUtils; @ManagedBean @@ -35,7 +33,6 @@ public class CompactDashboardProcessBean private static final long serialVersionUID = 1L; private List portalCompactProcesses; private DashboardProcessBean dashboardProcessBean; - private static String expressStartLink; public CompactProcessDashboardWidget getWidget() { return (CompactProcessDashboardWidget) dashboardProcessBean.getWidget(); @@ -161,12 +158,6 @@ public void startProcessWithCompactMode(DashboardProcess process) throws IOExcep return; } - if (dashboardProcessBean.isExpressProcess(process) && StringUtils.isNotBlank(process.getId()) - && StringUtils.isNotBlank(getExpressStartLink())) { - dashboardProcessBean.redirectToLink(getExpressStartLink() + "?workflowID=" + process.getId(), false); - return; - } - dashboardProcessBean.redirectToLink(link, true); } @@ -204,13 +195,6 @@ public void onChangeApplications(List applications) { dashboardProcessBean.setApplications(applications); } - private static String getExpressStartLink() { - if (StringUtils.isEmpty(expressStartLink)) { - expressStartLink = ExpressProcessService.getInstance().findExpressWorkflowStartLink(); - } - return expressStartLink; - } - public ProcessSorting[] getProcessSorting() { return ProcessSorting.values(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactProcessWidgetBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactProcessWidgetBean.java index de3bd3d43cf..f69ff1aba7a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactProcessWidgetBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/CompactProcessWidgetBean.java @@ -9,13 +9,10 @@ import javax.faces.bean.ViewScoped; import javax.faces.context.FacesContext; -import org.apache.commons.lang3.StringUtils; - import com.axonivy.portal.service.GlobalSearchService; import ch.ivy.addon.portalkit.configuration.UserProcess; import ch.ivy.addon.portalkit.enums.ProcessType; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.util.PermissionUtils; @ManagedBean @@ -42,15 +39,6 @@ public void startProcess(UserProcess userProcess) throws IOException { return; } - if (isExpressProcess(userProcess) && StringUtils.isNotBlank(userProcess.getProcessId())) { - String expressStartLink = ExpressProcessService.getInstance().findExpressWorkflowStartLink(); - if (StringUtils.isNotBlank(expressStartLink)) { - FacesContext.getCurrentInstance().getExternalContext() - .redirect(expressStartLink + "?workflowID=" + userProcess.getProcessId()); - return; - } - } - link += link.contains("?") ? "&" : "?"; // Put the "embedInIFrame" param to the process link to open it in the DefaultFramePage process // Then this process will open task in IFrame or not based on its "embedInIFrame" String custom field @@ -77,10 +65,6 @@ private boolean isExternalLink(UserProcess process) { return process != null && process.getProcessType() == ProcessType.EXTERNAL_LINK; } - private boolean isExpressProcess(UserProcess process) { - return process != null && process.getProcessType() == ProcessType.EXPRESS_PROCESS; - } - private boolean isEnableGlobalSearchScopeProcesses() { return GlobalSearchService.getInstance().isShowGlobalSearchByProcesses(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardProcessBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardProcessBean.java index 594ce5f439b..053a54ba9f8 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardProcessBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardProcessBean.java @@ -110,10 +110,6 @@ public void setDisplayModes(List displayModes) { this.displayModes = displayModes; } - public boolean isExpressProcess(DashboardProcess process) { - return process != null && process.getType() == ProcessType.EXPRESS_PROCESS; - } - public boolean isExternalLink(DashboardProcess process) { return process != null && process.getType() == ProcessType.EXTERNAL_LINK; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ExpressManagementBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ExpressManagementBean.java deleted file mode 100644 index 7bfcb6bcdd0..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ExpressManagementBean.java +++ /dev/null @@ -1,178 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -import javax.faces.application.FacesMessage; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; -import javax.faces.context.FacesContext; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.primefaces.event.FileUploadEvent; -import org.primefaces.model.StreamedContent; -import org.primefaces.model.file.UploadedFile; - -import com.axonivy.portal.components.dto.SecurityMemberDTO; -import com.axonivy.portal.components.util.FacesMessageUtils; -import com.axonivy.portal.util.UploadDocumentUtils; - -import ch.ivy.addon.portalkit.bo.ExpressProcess; -import ch.ivy.addon.portalkit.constant.PortalConstants; -import ch.ivy.addon.portalkit.enums.ExpressMessageType; -import ch.ivy.addon.portalkit.util.ExpressManagementUtils; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.process.call.SubProcessCall; -import ch.ivyteam.ivy.security.IUser; - -@ManagedBean -@ViewScoped -public class ExpressManagementBean implements Serializable { - - private static final long serialVersionUID = -6072339110563610370L; - - private List activeMemberList; - private List expressProcesses; - private List selectedExpressProcesses; - private StreamedContent exportExpressFile; - private UploadedFile importExpressFile; - private String importOutput; - private String importStatus; - private FacesMessage validateMessage; - - public void initWorkflowSummaryTable() { - activeMemberList = findAllActiveUser(); - setExpressProcesses(ExpressManagementUtils.findExpressProcesses()); - } - - @SuppressWarnings("unchecked") - private List findAllActiveUser() { - if (activeMemberList == null) { - return SubProcessCall.withPath(PortalConstants.SECURITY_SERVICE_CALLABLE) - .withStartName("findSecurityMembers") - .withParam("query", "") - .withParam("startIndex", 0) - .withParam("count", PortalConstants.MAX_USERS_IN_AUTOCOMPLETE) - .call() - .get("members", List.class); - } - return activeMemberList; - } - - /** - * Get a display name by activator name - * - * @param activatorName - * @return display name - */ - public String getUserDisplayName(String activatorName) { - if (StringUtils.isBlank(activatorName)) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - - String displayName = activatorName; - if (CollectionUtils.isNotEmpty(activeMemberList)) { - Optional activeUser = activeMemberList.stream().filter(user -> user.getMemberName().equalsIgnoreCase(activatorName)) - .findFirst(); - if (activeUser.isPresent()) { - displayName = StringUtils.isBlank(activeUser.get().getDisplayName()) ? activeUser.get().getName() : activeUser.get().getDisplayName(); - } else { - displayName = Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - } else { - IUser user = UserUtils.findUserByUsername(activatorName); - displayName = StringUtils.isBlank(user.getDisplayName()) ? user.getName() : user.getDisplayName(); - } - return displayName; - } - - public void importExpress(FileUploadEvent event) { - importExpressFile = event.getFile(); - String validateStr = UploadDocumentUtils.validateUploadedFile(importExpressFile); - if (StringUtils.isNotEmpty(validateStr)) { - validateMessage = FacesMessageUtils.sanitizedMessage(FacesMessage.SEVERITY_ERROR, validateStr, null); - displayedMessage(); - } else { - importExpressProcesses(); - } - } - - public StreamedContent exportExpress() { - if (selectedExpressProcesses != null && !selectedExpressProcesses.isEmpty()) { - exportExpressFile = ExpressManagementUtils.exportExpressProcess(selectedExpressProcesses); - } - return exportExpressFile; - } - - private void displayedMessage() { - FacesContext.getCurrentInstance().addMessage("import-express-form:import-express-dialog-message", validateMessage); - importStatus = ExpressMessageType.FAILED.getLabel(); - } - - @SuppressWarnings("unchecked") - private void importExpressProcesses() { - Map results = ExpressManagementUtils.importExpressProcesses(importExpressFile); - try { - importStatus = results.get(ExpressMessageType.IMPORT_STATUS).toString(); - importOutput = results.get(ExpressMessageType.IMPORT_RESULT).toString(); - if (!importStatus.equalsIgnoreCase(ExpressMessageType.FAILED.getLabel())) { - expressProcesses.addAll((List) results.get(ExpressMessageType.IMPORT_EXPRESS_PROCESSES)); - } - } catch (Exception e) { - importStatus = ExpressMessageType.FAILED.getLabel(); - importOutput = e.getMessage(); - } - } - - public List getExpressProcesses() { - return expressProcesses; - } - - public void setExpressProcesses(List expressProcesses) { - this.expressProcesses = expressProcesses; - } - - public String getImportOutput() { - return importOutput; - } - - public void setImportOutput(String importOutput) { - this.importOutput = importOutput; - } - - public List getSelectedExpressProcesses() { - return selectedExpressProcesses; - } - - public void setSelectedExpressProcesses(List selectedExpressProcesses) { - this.selectedExpressProcesses = selectedExpressProcesses; - } - - public StreamedContent getExportExpressFile() { - return exportExpressFile; - } - - public void setExportExpressFile(StreamedContent exportExpressFile) { - this.exportExpressFile = exportExpressFile; - } - - public String getImportStatus() { - return importStatus; - } - - public void setImportStatus(String importStatus) { - this.importStatus = importStatus; - } - - public UploadedFile getImportExpressFile() { - return importExpressFile; - } - - public void setImportExpressFile(UploadedFile importExpressFile) { - this.importExpressFile = importExpressFile; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/PortalPermissionInitBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/PortalPermissionInitBean.java index 447df1229fc..de5110b0435 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/PortalPermissionInitBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/PortalPermissionInitBean.java @@ -68,14 +68,11 @@ private void recreateAndGrantPermissions() { createPermissionsGroup(portalPermissionGroup, PortalPermissionGroup.ABSENCE_AND_SUBSTITUTE_GROUP); IPermissionGroup statisticsPermissionGroup = createPermissionsGroup(portalPermissionGroup, PortalPermissionGroup.STATISTIC_GROUP); - IPermissionGroup expressPermissionGroup = - createPermissionsGroup(portalPermissionGroup, PortalPermissionGroup.EXPRESS_GROUP); initSystemPermission(taskPermissionGroup, getTaskPermissions()); initSystemPermission(casePermissionGroup, getCasePermissions()); initSystemPermission(generalPermissionGroup, getGeneralPermissions()); initSystemPermission(absenceAndSubPermissionGroup, getAbsenceAndSubstitutePermissions()); initSystemPermission(statisticsPermissionGroup, getPortalPermissionsByGroup(PortalPermissionGroup.STATISTIC_GROUP)); - initSystemPermission(expressPermissionGroup, getPortalPermissionsByGroup(PortalPermissionGroup.EXPRESS_GROUP)); } private void initSystemPermission(IPermissionGroup permissionGroup, List permissions) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ProcessWidgetBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ProcessWidgetBean.java index 3be6aee9b4a..8c744e2fdb3 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ProcessWidgetBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ProcessWidgetBean.java @@ -2,7 +2,6 @@ import static org.apache.commons.lang3.StringUtils.EMPTY; -import java.io.IOException; import java.io.Serializable; import java.text.Collator; import java.util.ArrayList; @@ -34,23 +33,19 @@ import com.axonivy.portal.service.GlobalSearchService; import com.axonivy.portal.util.ExternalLinkUtils; -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.bo.ExternalLinkProcessItem; import ch.ivy.addon.portalkit.bo.IvyProcess; -import ch.ivy.addon.portalkit.bo.PortalExpressProcess; import ch.ivy.addon.portalkit.bo.Process; import ch.ivy.addon.portalkit.configuration.ExternalLink; import ch.ivy.addon.portalkit.configuration.GlobalSetting; import ch.ivy.addon.portalkit.dto.DisplayName; import ch.ivy.addon.portalkit.enums.GlobalVariable; -import ch.ivy.addon.portalkit.enums.PortalPermission; import ch.ivy.addon.portalkit.enums.ProcessMode; import ch.ivy.addon.portalkit.enums.ProcessType; import ch.ivy.addon.portalkit.ivydata.mapper.SecurityMemberDTOMapper; import ch.ivy.addon.portalkit.ivydata.service.impl.UserSettingService; import ch.ivy.addon.portalkit.jsf.Attrs; import ch.ivy.addon.portalkit.jsf.ManagedBeans; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivy.addon.portalkit.service.ExternalLinkService; import ch.ivy.addon.portalkit.service.GlobalSettingService; import ch.ivy.addon.portalkit.util.DisplayNameConvertor; @@ -58,8 +53,6 @@ import ch.ivy.addon.portalkit.util.PermissionUtils; import ch.ivy.addon.portalkit.util.UserUtils; import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.security.exec.Sudo; -import ch.ivyteam.ivy.workflow.IProcessStart; import ch.ivyteam.ivy.workflow.start.IWebStartable; import ch.ivyteam.util.Pair; @@ -82,7 +75,6 @@ public class ProcessWidgetBean extends AbstractProcessBean implements Serializab private List selectedSecurityMemberDTOsWhenEditingExternalLink; private List selectedPermissionsWhenEditingExternalLink; private List selectedPermissionsForSavingEditedExternalLink; - private IProcessStart createExpressWorkflowProcessStart; private Map> processesByAlphabet; private String warningText; @@ -90,7 +82,6 @@ public class ProcessWidgetBean extends AbstractProcessBean implements Serializab public void initConfiguration() { initProcessViewMode(); - createExpressWorkflowProcessStart = ExpressProcessService.getInstance().findExpressCreationProcess(); } public void initProcesses() { @@ -238,40 +229,23 @@ public String getDisplayNameOfPermissionsWhenEditingExternalLink() { return String.join(", ", displayNames); } - public void editExpressWorkflow(ExpressProcess process) throws IOException { - String editLink = ExpressProcessService.getInstance().findExpressWorkflowEditLink(process.getId()); - FacesContext.getCurrentInstance().getExternalContext().redirect(editLink); - } - public void deleteProcessWorkflow() { if (this.deletedProcess == null) { return; } switch (deletedProcess.getType()) { - case EXPRESS_PROCESS -> deleteExpressWorkflow(); case EXTERNAL_LINK -> deleteExternalLink(); default -> {} } } - public void deleteExpressWorkflow() { - String workflowId = this.deletedProcess.getId(); - ExpressProcessService.getInstance().delete(workflowId); - getPortalProcesses().removeIf(process -> process.getId().equals(deletedProcess.getId())); - groupProcessesByAlphabetIndex(getPortalProcesses()); - } - public void updateProcessData() { if (this.editedProcess == null) { return; } String oldProcessName = this.editedProcess.getName(); switch (this.editedProcess.getType()) { - case EXPRESS_PROCESS -> { - ExpressProcess expressProcess = updateExpressProcess(editedProcess.getId()); - this.editedProcess = new PortalExpressProcess(expressProcess); - } case EXTERNAL_LINK -> { ExternalLink externalLink = updateExternalLink(editedProcess.getId()); this.editedProcess = new ExternalLinkProcessItem(externalLink); @@ -283,17 +257,6 @@ public void updateProcessData() { this.editedProcess = null; } - private ExpressProcess updateExpressProcess(String processId) { - ExpressProcessService service = ExpressProcessService.getInstance(); - ExpressProcess expressProcess = service.findById(processId); - if (expressProcess != null) { - expressProcess.setIcon(this.selectedIconProcess); - service.save(expressProcess); - } - PermissionUtils.checkAbleToStartAndAbleToEditExpressWorkflow(expressProcess); - return expressProcess; - } - private ExternalLink updateExternalLink(String processId) { ExternalLinkService externalLinkService = ExternalLinkService.getInstance(); ExternalLink externalLink = externalLinkService.findById(processId); @@ -404,23 +367,6 @@ public void deleteExternalLink() { groupProcessesByAlphabetIndex(getPortalProcesses()); } - public String getCreateExpessWorkflowLink() { - return Sudo.get(() -> { - return (createExpressWorkflowProcessStart != null) ? createExpressWorkflowProcessStart.getLink().getRelative() - : StringUtils.EMPTY; - }); - } - - public void startExpressWorkflowCreationLink() throws IOException { - FacesContext.getCurrentInstance().getExternalContext().redirect(getCreateExpessWorkflowLink()); - return; - } - - public boolean canCreateExpessWorkflow() { - return createExpressWorkflowProcessStart != null - && PermissionUtils.hasPortalPermission(PortalPermission.EXPRESS_CREATE_WORKFLOW); - } - public Process getDeletedProcess() { return deletedProcess; } @@ -494,10 +440,6 @@ public void setUserProcessByAlphabet(Map> processesByAlpha this.processesByAlphabet = processesByAlphabet; } - public IProcessStart getCreateExpressWorkflowProcessStart() { - return createExpressWorkflowProcessStart; - } - public Map getAllAlphabeticalCharacters() { Map processGroups = new LinkedHashMap<>(); if (processesByAlphabet == null) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/SideStepBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/SideStepBean.java index 9eb5f74191e..25c1eda46ad 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/SideStepBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/SideStepBean.java @@ -28,39 +28,38 @@ public class SideStepBean implements Serializable { private List currentSideSteps = new ArrayList<>(); - public void getSideSteps(Long taskId, Long caseId, boolean isAdhocExcluded) { + public void getSideSteps(Long taskId, Long caseId) { currentSideSteps.clear(); if(isNullOrZero(taskId)) { - currentSideSteps.addAll(getSideStepsOfCases(caseId, isAdhocExcluded)); + currentSideSteps.addAll(getSideStepsOfCases(caseId)); } else { - currentSideSteps.addAll(getSideStepsOfTasks(caseId, isAdhocExcluded)); + currentSideSteps.addAll(getSideStepsOfTasks(caseId)); } } - private List getSideStepsOfCases(Long caseId, boolean isAdhocExcluded) { + private List getSideStepsOfCases(Long caseId) { if (sideStepOfCases.containsKey(caseId)) { return sideStepOfCases.get(caseId); } - List sideSteps = getSideStepsByCriteria(caseId, isAdhocExcluded); + List sideSteps = getSideStepsByCriteria(caseId); sideStepOfCases.put(caseId, sideSteps); return sideSteps; } - private List getSideStepsOfTasks(Long caseId, boolean isAdhocExcluded) { + private List getSideStepsOfTasks(Long caseId) { if (sideStepOfTasks.containsKey(caseId)) { return sideStepOfTasks.get(caseId); } - List sideSteps = getSideStepsByCriteria(caseId, isAdhocExcluded); + List sideSteps = getSideStepsByCriteria(caseId); sideStepOfTasks.put(caseId, sideSteps); return sideSteps; } - private List getSideStepsByCriteria(Long caseId, boolean isAdhocExcluded) { + private List getSideStepsByCriteria(Long caseId) { SideStepSearchCriteria criteria = new SideStepSearchCriteria(); criteria.setCaseId(caseId); - criteria.setAdhocExcluded(isAdhocExcluded); Map params = new HashMap<>(); params.put("sideStepSearchCriteria", criteria); @@ -78,11 +77,6 @@ public void startSideStep(IvySideStep sideStep) throws IOException { String url = UrlUtils.formatLinkWithEmbedInFrameParam(sideStep.getStartLink()); FacesContext.getCurrentInstance().getExternalContext().redirect(url); } - - public void startAdhoc(IvySideStep sideStep, long taskId) throws IOException { - String url = sideStep.getStartLink() + "?originalTaskId=" + taskId; - FacesContext.getCurrentInstance().getExternalContext().redirect(url); - } public List getCurrentSideSteps() { return currentSideSteps; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskActionBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskActionBean.java index b48abab025e..728b2329944 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskActionBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskActionBean.java @@ -28,7 +28,6 @@ import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository; import ch.ivyteam.ivy.workflow.ITask; import ch.ivyteam.ivy.workflow.TaskState; -import ch.ivyteam.ivy.workflow.task.TaskBusinessState; @ManagedBean @ViewScoped @@ -38,7 +37,7 @@ public class TaskActionBean implements Serializable { private boolean isShowResetTask; private boolean isShowReserveTask; private boolean isShowDelegateTask; - //This variable control display of side step and create adhoc + //This variable control display of side step private boolean isShowAdditionalOptions; private boolean isShowDestroyTask; private boolean isShowReadWorkflowEvent; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/AdhocHistory.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/AdhocHistory.java deleted file mode 100644 index 19d588a71bd..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/AdhocHistory.java +++ /dev/null @@ -1,61 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.util.Date; - -public class AdhocHistory { - - private long originalTaskId; - private String content; - private Date timestamp; - private String taskName; - private String authorUsername; - private String externalSecurityId; - - public long getOriginalTaskId() { - return originalTaskId; - } - - public void setOriginalTaskId(long originalTaskId) { - this.originalTaskId = originalTaskId; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public Date getTimestamp() { - return timestamp; - } - - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - - public String getTaskName() { - return taskName; - } - - public void setTaskName(String taskName) { - this.taskName = taskName; - } - - public String getAuthorUsername() { - return authorUsername; - } - - public void setAuthorUsername(String authorUsername) { - this.authorUsername = authorUsername; - } - - public String getExternalSecurityId() { - return externalSecurityId; - } - - public void setExternalSecurityId(String externalSecurityId) { - this.externalSecurityId = externalSecurityId; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressFormElement.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressFormElement.java deleted file mode 100644 index 8503d2a281b..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressFormElement.java +++ /dev/null @@ -1,93 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.io.Serializable; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ExpressFormElement implements Serializable { - - private static final long serialVersionUID = -1048666544578490353L; - private String elementID; - private String name; - private String label; - private boolean required; - private int intSetting; - private String elementType; - private List optionStrs; - private String elementPosition; - private int indexInPanel; - - public String getElementID() { - return elementID; - } - - public void setElementID(String elementID) { - this.elementID = elementID; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public boolean isRequired() { - return required; - } - - public void setRequired(boolean required) { - this.required = required; - } - - public int getIntSetting() { - return intSetting; - } - - public void setIntSetting(int intSetting) { - this.intSetting = intSetting; - } - - public String getElementType() { - return elementType; - } - - public void setElementType(String elementType) { - this.elementType = elementType; - } - - public String getElementPosition() { - return elementPosition; - } - - public void setElementPosition(String elementPosition) { - this.elementPosition = elementPosition; - } - - public List getOptionStrs() { - return optionStrs; - } - - public void setOptionStrs(List optionStrs) { - this.optionStrs = optionStrs; - } - - public int getIndexInPanel() { - return indexInPanel; - } - - public void setIndexInPanel(int indexInPanel) { - this.indexInPanel = indexInPanel; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressProcess.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressProcess.java deleted file mode 100644 index a996256ee9e..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressProcess.java +++ /dev/null @@ -1,142 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.io.Serializable; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.configuration.AbstractConfiguration; -import ch.ivy.addon.portalkit.util.SecurityMemberDisplayNameUtils; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.security.IUser; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ExpressProcess extends AbstractConfiguration implements Serializable { - - private static final long serialVersionUID = -7412792174579848169L; - private String processName; - private String processDescription; - private String processType; - private List processPermissions; - private String processOwner; - private boolean isUseDefaultUI; - private String processFolder; - private boolean readyToExecute; - private List processCoOwners; - private String icon; - @JsonIgnore - private boolean isAbleToEdit; - private List taskDefinitions; - @JsonIgnore - private IUser processOwnerUser; - - - public ExpressProcess() { - setIsPublic(true); - } - - public String getProcessName() { - return processName; - } - - public void setProcessName(String processName) { - this.processName = processName; - } - - public String getProcessDescription() { - return processDescription; - } - - public void setProcessDescription(String processDescription) { - this.processDescription = processDescription; - } - - public String getProcessType() { - return processType; - } - - public void setProcessType(String processType) { - this.processType = processType; - } - - public List getProcessPermissions() { - return processPermissions; - } - - public void setProcessPermissions(List processPermissions) { - this.processPermissions = processPermissions; - } - - public String getProcessOwner() { - return processOwner; - } - - public void setProcessOwner(String processOwner) { - this.processOwner = processOwner; - } - - public boolean isUseDefaultUI() { - return isUseDefaultUI; - } - - public void setUseDefaultUI(boolean isUseDefaultUI) { - this.isUseDefaultUI = isUseDefaultUI; - } - - public String getProcessFolder() { - return processFolder; - } - - public void setProcessFolder(String processFolder) { - this.processFolder = processFolder; - } - - public boolean isReadyToExecute() { - return readyToExecute; - } - - public void setReadyToExecute(boolean readyToExecute) { - this.readyToExecute = readyToExecute; - } - - public boolean isAbleToEdit() { - return isAbleToEdit; - } - - public void setAbleToEdit(boolean isAbleToEdit) { - this.isAbleToEdit = isAbleToEdit; - } - - public List getProcessCoOwners() { - return processCoOwners; - } - - public void setProcessCoOwners(List processCoOwners) { - this.processCoOwners = processCoOwners; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - public List getTaskDefinitions() { - return taskDefinitions; - } - - public void setTaskDefinitions(List taskDefinitions) { - this.taskDefinitions = taskDefinitions; - } - - public IUser getProcessOwnerUser() { - if (processOwnerUser == null) { - processOwnerUser = UserUtils.findUserByUsername(SecurityMemberDisplayNameUtils.stripSharpCharacterFromSecurityMemberName(processOwner)); - } - return processOwnerUser; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressTaskDefinition.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressTaskDefinition.java deleted file mode 100644 index 86bc641d27a..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressTaskDefinition.java +++ /dev/null @@ -1,94 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.io.Serializable; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ExpressTaskDefinition implements Serializable { - - private static final long serialVersionUID = 6708062804413815719L; - private String type; - private List responsibles; - private String subject; - private String description; - private int taskPosition; - private int untilDays; - private String responsibleDisplayName; - private ExpressUserEmail email; - private List formElements; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public List getResponsibles() { - return responsibles; - } - - public void setResponsibles(List responsibles) { - this.responsibles = responsibles; - } - - public String getSubject() { - return subject; - } - - public void setSubject(String subject) { - this.subject = subject; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public int getTaskPosition() { - return taskPosition; - } - - public void setTaskPosition(int taskPosition) { - this.taskPosition = taskPosition; - } - - public int getUntilDays() { - return untilDays; - } - - public void setUntilDays(int untilDays) { - this.untilDays = untilDays; - } - - public String getResponsibleDisplayName() { - return responsibleDisplayName; - } - - public void setResponsibleDisplayName(String responsibleDisplayName) { - this.responsibleDisplayName = responsibleDisplayName; - } - - public ExpressUserEmail getEmail() { - return email; - } - - public void setEmail(ExpressUserEmail email) { - this.email = email; - } - - public List getFormElements() { - return formElements; - } - - public void setFormElements(List formElements) { - this.formElements = formElements; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressUserEmail.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressUserEmail.java deleted file mode 100644 index fe6e3387352..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/ExpressUserEmail.java +++ /dev/null @@ -1,66 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.io.Serializable; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; - -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.dto.ExpressAttachment; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ExpressUserEmail implements Serializable { - - private static final long serialVersionUID = 55870461406887925L; - private String recipients; - private String responseTo; - private String subject; - private String content; - private List attachments; - - public String getRecipients() { - return recipients; - } - - public void setRecipients(String recipients) { - this.recipients = recipients; - } - - public String getResponseTo() { - return responseTo; - } - - public void setResponseTo(String responseTo) { - this.responseTo = responseTo; - } - - public String getSubject() { - return subject; - } - - public void setSubject(String subject) { - this.subject = subject; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public List getAttachments() { - return attachments; - } - - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public boolean isEmpty() { - return StringUtils.isEmpty(this.subject) || StringUtils.isEmpty(this.content); - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/PortalExpressProcess.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/PortalExpressProcess.java deleted file mode 100644 index 526f66bb930..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bo/PortalExpressProcess.java +++ /dev/null @@ -1,148 +0,0 @@ -package ch.ivy.addon.portalkit.bo; - -import java.util.Optional; - -import org.apache.commons.lang3.StringUtils; - -import ch.ivy.addon.portalkit.enums.DefaultImage; -import ch.ivy.addon.portalkit.enums.ProcessType; -import ch.ivy.addon.portalkit.service.ExpressProcessService; -import ch.ivy.addon.portalkit.util.CategoryUtils; -import ch.ivy.addon.portalkit.util.ExpressManagementUtils; -import ch.ivyteam.ivy.application.IApplication; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.security.ISecurityContext; -import ch.ivyteam.ivy.security.ISecurityMember; -import ch.ivyteam.ivy.security.IUser; -import ch.ivyteam.ivy.workflow.category.Category; - -/* - * Used for merging express process and ivy process into a process list - */ -public class PortalExpressProcess implements Process { - - public static final String DEFAULT_ICON = "si si-startup-launch"; - private static final String NOT_AVAILABLE_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"; - private static final String EXPRESS_WORKFLOW_ID_PARAM = "?workflowID="; - private ExpressProcess process; - private String processOwnerDisplayName; - private String ableToStart; - private String application; - private Category category; - - public PortalExpressProcess(ExpressProcess process) { - this.process = process; - String processOwner = ExpressManagementUtils.getValidMemberName(process.getProcessOwner()); - String processOwnerName = StringUtils.isNotBlank(processOwner) ? processOwner.substring(1) : null; - - IUser user = processOwnerName != null ? ISecurityContext.current().users().find(processOwnerName) : null; - - this.processOwnerDisplayName = Optional.ofNullable(user).map(IUser::getDisplayName).orElse(Ivy.cms().co(NOT_AVAILABLE_CMS)); - - for (String username : this.process.getProcessPermissions()) { - ISecurityMember assignee = ISecurityContext.current().members().find(username); - String ableStartName = Optional.ofNullable(assignee).map(ISecurityMember::getDisplayName).orElse(Ivy.cms().co(NOT_AVAILABLE_CMS)); - this.ableToStart = StringUtils.isBlank(ableToStart) ? ableStartName : String.join(";", ableToStart, ableStartName); - } - - application = IApplication.current().getName(); - category = CategoryUtils.buildExpressCategory(process.getProcessName()); - } - - @Override - public String getStartLink() { - return generateWorkflowStartLink(); - } - - @Override - public String getDescription() { - StringBuilder builder = new StringBuilder(); - if (StringUtils.isNotBlank(process.getProcessDescription())) { - builder.append(process.getProcessDescription()).append(". "); - } - return builder.append(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/caseList/defaultColumns/CREATOR")) - .append(": ") - .append(this.processOwnerDisplayName) - .toString(); - } - - private String generateWorkflowStartLink() { - return ExpressProcessService.getInstance().findExpressWorkflowStartLink() + EXPRESS_WORKFLOW_ID_PARAM + this.process.getId(); - } - - @Override - public String getName() { - return process.getProcessName(); - } - - @Override - public ExpressProcess getProcess() { - return process; - } - - @Override - public String getId() { - return process.getId(); - } - - @Override - public ProcessType getType() { - return ProcessType.EXPRESS_PROCESS; - } - - @Override - public String getTypeName() { - return ProcessType.EXPRESS_PROCESS.name(); - } - - public String getProcessOwnerDisplayName() { - return processOwnerDisplayName; - } - - public void setProcessOwnerDisplayName(String processOwenerDisplayName) { - this.processOwnerDisplayName = processOwenerDisplayName; - } - - @Override - public String getIcon() { - String icon = this.process.getIcon(); - return StringUtils.isBlank(icon) ? DEFAULT_ICON : icon; - } - - public String getAbleToStart() { - return ableToStart; - } - - public void setAbleToStart(String ableToStart) { - this.ableToStart = ableToStart; - } - - @Override - public Category getCategory() { - return category; - } - - @Override - public String getImageUrl() { - return getContentImageUrl(DefaultImage.NASASTART.getPath()); - } - - @Override - public String getApplication() { - return application; - } - - public void setApplication(String application) { - this.application = application; - } - - @Override - public String getSortIndex() { - return null; - } - - @Override - public String getPortalProcessInformation() { - return null; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/CustomFields.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/CustomFields.java index 6d64821d27d..20ea8f8fadb 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/CustomFields.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/CustomFields.java @@ -6,8 +6,6 @@ public class CustomFields { public static final String CUSTOM_TIMESTAMP_FIELD5 = "CustomTimestampField5"; public static final String EMBED_IN_FRAME = "embedInFrame"; - public static final String IS_EXPRESS_PROCESS = "isExpress"; - public static final String EXPRESS_END_PAGE_URL = "expressEndPageUrl"; public static final String PROCESS_IMAGE = "processImage"; public static final String PROCESS_INFORMATION = "portalProcessInfo"; public static final String SORT_INDEX = "portalSortIndex"; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/PortalConstants.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/PortalConstants.java index 4af982f2065..62573a1fb07 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/PortalConstants.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/constant/PortalConstants.java @@ -8,8 +8,6 @@ public final class PortalConstants { public static final String RESET_TASK_CONFIRMATION_DIALOG = "reset-task-confirmation-dialog"; public static final String PORTAL_LIBRARY_ID = "com.axonivy.portal:portal"; public static final int CUSTOM_STRING_FIELD_MAX_LENGTH = 2000; - public static final Integer[] EXPRESS_INVALID_VERSION = {0}; - public static final int EXPRESS_VERSION = 1; public static final int MAX_USERS_IN_AUTOCOMPLETE = 101; private PortalConstants() {} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessCaseLazyDataModel.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessCaseLazyDataModel.java index 6a04f8a3f4c..2ad124ceef3 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessCaseLazyDataModel.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessCaseLazyDataModel.java @@ -27,8 +27,8 @@ public class DashboardProcessCaseLazyDataModel extends LazyDataModel7 { private List cases; private CompletableFuture future; - public DashboardProcessCaseLazyDataModel(Long processStartId, String processName) { - criteria = new DashboardProcessCaseSearchCriteria(processStartId, processName); + public DashboardProcessCaseLazyDataModel(Long processStartId) { + criteria = new DashboardProcessCaseSearchCriteria(processStartId); cases = new ArrayList<>(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessTaskLazyDataModel.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessTaskLazyDataModel.java index 3d40cc12ca5..38b6cf1bbd4 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessTaskLazyDataModel.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/DashboardProcessTaskLazyDataModel.java @@ -27,8 +27,8 @@ public class DashboardProcessTaskLazyDataModel extends LazyDataModel7 { private List tasks; private CompletableFuture future; - public DashboardProcessTaskLazyDataModel(Long processStartId, String expressProcessName) { - criteria = new DashboardProcessTaskSearchCriteria(processStartId, expressProcessName); + public DashboardProcessTaskLazyDataModel(Long processStartId) { + criteria = new DashboardProcessTaskSearchCriteria(processStartId); tasks = new ArrayList<>(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/ExpressAttachment.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/ExpressAttachment.java deleted file mode 100644 index e7113167c51..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/ExpressAttachment.java +++ /dev/null @@ -1,70 +0,0 @@ -package ch.ivy.addon.portalkit.dto; - - -import ch.ivy.addon.portalkit.enums.ExpressEmailAttachmentStatus; - -import java.io.Serializable; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ExpressAttachment implements Serializable { - - private static final long serialVersionUID = 7156983624283465272L; - private String name; - @JsonIgnore - private byte[] content; - private String size; - private String path; - private ExpressEmailAttachmentStatus status; - private String contentType; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; - } - - public String getSize() { - return size; - } - - public void setSize(String size) { - this.size = size; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public ExpressEmailAttachmentStatus getStatus() { - return status; - } - - public void setStatus(ExpressEmailAttachmentStatus status) { - this.status = status; - } - - public String getContentType() { - return contentType; - } - - public void setContentType(String contentType) { - this.contentType = contentType; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CombinedProcessDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CombinedProcessDashboardWidget.java index 840d5f83e62..a2a7167ac58 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CombinedProcessDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CombinedProcessDashboardWidget.java @@ -56,9 +56,9 @@ public void setProcess(DashboardProcess process) { super.setProcess(process); if (getProcess() != null) { this.taskDataModel = - new DashboardProcessTaskLazyDataModel(getProcess().getProcessStartId(), getProcess().getName()); + new DashboardProcessTaskLazyDataModel(getProcess().getProcessStartId()); this.caseDataModel = - new DashboardProcessCaseLazyDataModel(getProcess().getProcessStartId(), getProcess().getName()); + new DashboardProcessCaseLazyDataModel(getProcess().getProcessStartId()); } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java index 5c554e68c61..1f3fd787c90 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java @@ -8,23 +8,17 @@ import com.fasterxml.jackson.annotation.JsonInclude; -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.bo.ExternalLinkProcessItem; -import ch.ivy.addon.portalkit.bo.PortalExpressProcess; import ch.ivy.addon.portalkit.bo.Process; import ch.ivy.addon.portalkit.dto.DisplayName; import ch.ivy.addon.portalkit.enums.DefaultImage; import ch.ivy.addon.portalkit.enums.ProcessType; -import ch.ivy.addon.portalkit.service.ExpressProcessService; -import ch.ivy.addon.portalkit.util.CategoryUtils; -import ch.ivyteam.ivy.application.IApplication; import ch.ivyteam.ivy.environment.Ivy; import ch.ivyteam.ivy.workflow.category.Category; import ch.ivyteam.ivy.workflow.start.IWebStartable; @JsonInclude(JsonInclude.Include.NON_NULL) public class DashboardProcess implements Process { - private static final String EXPRESS_WORKFLOW_ID_PARAM = "?workflowID="; private String id; @Deprecated(forRemoval = true, since = "11.2.0") private Long processStartId; @@ -71,16 +65,6 @@ public DashboardProcess(IWebStartable process) { this.portalProcessInformation = getPortalProcessInformation(process); } - public DashboardProcess(ExpressProcess process) { - this.id = process.getId(); - this.type = ProcessType.EXPRESS_PROCESS; - this.name = process.getProcessName(); - this.description = process.getProcessDescription(); - this.icon = process.getIcon(); - this.category = CategoryUtils.buildExpressCategory(process.getProcessName()); - this.application = IApplication.current().getName(); - } - @Override public String getId() { return id; @@ -130,9 +114,6 @@ public void setNames(List names) { @Override public String getStartLink() { - if (this.type == ProcessType.EXPRESS_PROCESS) { - return generateWorkflowStartLink(); - } return startLink; } @@ -145,8 +126,6 @@ public String getIcon() { if (StringUtils.isBlank(icon)) { if (this.type == ProcessType.IVY_PROCESS) { return Process.DEFAULT_PROCESS_ICON; - } else if (this.type == ProcessType.EXPRESS_PROCESS) { - return PortalExpressProcess.DEFAULT_ICON; } else if (this.type == ProcessType.EXTERNAL_LINK) { return ExternalLinkProcessItem.DEFAULT_ICON; } @@ -164,10 +143,6 @@ private String getActiveDisplayName() { .map(DisplayName::getValue).findFirst().orElse(this.name); } - private String generateWorkflowStartLink() { - return ExpressProcessService.getInstance().findExpressWorkflowStartLink() + EXPRESS_WORKFLOW_ID_PARAM + this.id; - } - /** * @deprecated use {@link #setProcessElementId(String)} * @return process start id diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/AdditionalProperty.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/AdditionalProperty.java index d432fefa9b3..62a72f3a1ad 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/AdditionalProperty.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/AdditionalProperty.java @@ -5,8 +5,5 @@ public enum AdditionalProperty { CUSTOMIZATION_ADDITIONAL_CASE_DETAILS_PAGE, CASE_BUSINESS_ENTITY_PROPERTY, HIDE, - ORIGINAL_ADHOC_EXPRESS_TASK, - ADHOC_EXPRESS_TASK, - FIRST_TIME_OPEN_ORIGINAL_ADHOC_TASK, PORTAL_GROUP_CHAT_INFO; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java index 7f9192e04c9..0aed15f228a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java @@ -1,6 +1,6 @@ package ch.ivy.addon.portalkit.enums; public enum BreadCrumbKind { - HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, EXPRESS, USER_PROFILE, EXPRESS_BUSINESS, + HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, USER_PROFILE, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressEmailAttachmentStatus.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressEmailAttachmentStatus.java deleted file mode 100644 index ed6760789b9..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressEmailAttachmentStatus.java +++ /dev/null @@ -1,6 +0,0 @@ -package ch.ivy.addon.portalkit.enums; - -public enum ExpressEmailAttachmentStatus { - ADDED, - DELETED; -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressMessageType.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressMessageType.java deleted file mode 100644 index 9b9ee3fc200..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ExpressMessageType.java +++ /dev/null @@ -1,29 +0,0 @@ -package ch.ivy.addon.portalkit.enums; - -import ch.ivyteam.ivy.environment.Ivy; - -public enum ExpressMessageType { - INFO("INFO", "/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/info"), - WARNING("WARNING", "/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/warning"), - ERROR("WARNING", "/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/error"), - FAILED("FAILED","/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/failed"), - IMPORT_STATUS("import_status", "Import Status"), - IMPORT_EXPRESS_PROCESSES("import_express_processes","Import express processes"), - IMPORT_RESULT("import_result","Import result"); - - private final String value; - private final String label; - - ExpressMessageType(String value, String label) { - this.value = value; - this.label = label; - } - - public String getValue() { - return value; - } - - public String getLabel() { - return Ivy.cms().co(label); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java index c5ccfa83a5c..946dd5b9550 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java @@ -49,7 +49,6 @@ public enum GlobalVariable { SHOW_CASE_DURATION_TIME("Portal.CaseDetails.ShowDurationTime", GlobalVariableType.SELECTION, Option.TRUE.toString(), "showCaseDurationTime"), HIDE_UPLOAD_DOCUMENT_FOR_DONE_CASE("Portal.CaseDetails.HideUploadDocumentForDoneCase", GlobalVariableType.SELECTION, Option.FALSE.toString(), "hideUploadDocumentForDoneCaseNote"), DISPLAY_MESSAGE_AFTER_FINISH_TASK("Portal.DisplayMessageAfterFinishTask", GlobalVariableType.SELECTION, Option.TRUE.toString(), "displayMessageAfterFinishOrLeaveTask"), - EXPRESS_END_PAGE("Portal.ExpressEndPage", GlobalVariableType.SELECTION, Option.TRUE.toString(), "expressEndPageNote"), EMBED_IN_FRAME("Portal.EmbedInFrame", GlobalVariableType.SELECTION, Option.TRUE.toString(), "embedInFrame"), SHOW_GLOBAL_SEARCH("Portal.ShowGlobalSearch", GlobalVariableType.SELECTION, Option.TRUE.toString(), "showGlobalSearch"), SHOW_QUICK_GLOBAL_SEARCH("Portal.ShowQuickGlobalSearch", GlobalVariableType.SELECTION, Option.FALSE.toString(), "showQuickGlobalSearch"), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java index 03f6bebbb4a..e5bbdb183d5 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java @@ -15,7 +15,6 @@ public enum PortalPermission { DASHBOARD_SHARE_LINK("ShareDashboardLink", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), TASK_WRITE_ACTIVATOR_OWN_TASKS("TaskWriteActivatorOwnTasks", PortalPermissionGroup.TASK_PERMISSIONS_GROUP), TASK_DISPLAY_ADDITIONAL_OPTIONS("TaskDisplayAdditionalOptions", PortalPermissionGroup.TASK_PERMISSIONS_GROUP), - EXPRESS_CREATE_WORKFLOW("ExpressCreateWorkflow", PortalPermissionGroup.EXPRESS_GROUP), ACCESS_FULL_PROCESS_LIST("AccessFullProcessList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), ACCESS_FULL_TASK_LIST("AccessFullTaskList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), ACCESS_FULL_CASE_LIST("AccessFullCaseList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermissionGroup.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermissionGroup.java index 2e243d205a9..27cdb2d98c9 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermissionGroup.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermissionGroup.java @@ -6,8 +6,7 @@ public enum PortalPermissionGroup { CASE_PERMISSIONS_GROUP("PortalCasePermissions"), GENERAL_PERMISSIONS_GROUP("PortalGeneralPermissions"), ABSENCE_AND_SUBSTITUTE_GROUP("PortalAbsenceAndSubstitutePermissions"), - STATISTIC_GROUP("PortalStatisticsPermissions"), - EXPRESS_GROUP("PortalExpressPermissions"); + STATISTIC_GROUP("PortalStatisticsPermissions"); private String value; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java index 3fcfc81a686..0b3e466272f 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java @@ -6,7 +6,6 @@ public enum PortalVariable { THIRD_PARTY_APP("Portal.ThirdPartyApplications"), WIDGET_FILTER("Portal.Dashboard.WidgetFilters"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), - EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), TASK_DETAIL("Portal.TaskDetails"), CASE_DETAIL("Portal.CaseDetails"), DASHBOARD("Portal.Dashboard"), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ProcessType.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ProcessType.java index 133bb3ad388..aa218d1c77d 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ProcessType.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/ProcessType.java @@ -7,7 +7,6 @@ import ch.ivyteam.ivy.environment.Ivy; public enum ProcessType { - EXPRESS_PROCESS("ExpressProcess"), EXTERNAL_LINK("ExternalLink"), IVY_PROCESS("IvyProcess"); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/bo/IvySideStep.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/bo/IvySideStep.java index 405f7118b8a..56c17a0b8eb 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/bo/IvySideStep.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/bo/IvySideStep.java @@ -4,7 +4,6 @@ public class IvySideStep { private String name; private String startLink; - private boolean isAdhoc; public String getName() { return name; @@ -22,12 +21,4 @@ public void setStartLink(String startLink) { this.startLink = startLink; } - public boolean isAdhoc() { - return isAdhoc; - } - - public void setAdhoc(boolean isAdhoc) { - this.isAdhoc = isAdhoc; - } - } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessCaseSearchCriteria.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessCaseSearchCriteria.java index a5ddca3cd40..6377773a96f 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessCaseSearchCriteria.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessCaseSearchCriteria.java @@ -1,9 +1,7 @@ package ch.ivy.addon.portalkit.ivydata.searchcriteria; -import ch.ivy.addon.portalkit.constant.CustomFields; import ch.ivy.addon.portalkit.enums.DashboardStandardCaseColumn; import ch.ivy.addon.portalkit.util.CaseUtils; -import ch.ivyteam.ivy.workflow.category.CategoryPath; import ch.ivyteam.ivy.workflow.caze.CaseBusinessState; import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.query.CaseQuery.IFilterQuery; @@ -12,13 +10,11 @@ public class DashboardProcessCaseSearchCriteria { private Long processStartId; - private String processName; private String sortField; private boolean sortDescending; - public DashboardProcessCaseSearchCriteria(Long processStartId, String processName) { + public DashboardProcessCaseSearchCriteria(Long processStartId) { this.processStartId = processStartId; - this.processName = processName; } public CaseQuery buildQuery() { @@ -32,8 +28,6 @@ public CaseQuery buildQueryWithoutOrderByClause() { CaseQuery query = CaseQuery.businessCases(); if (this.processStartId != null) { queryProcessStartId(query); - } else { - queryExpressProcessCasesByCategoryPath(query); } queryStates(query); queryIsInvolved(query); @@ -54,12 +48,6 @@ private void queryProcessStartId(CaseQuery query) { query.where().taskStartId().isEqual(processStartId); } - private void queryExpressProcessCasesByCategoryPath(CaseQuery query) { - String categoryPath = new CategoryPath("ExpressWorkflow/" + this.processName).getValidRawPath(); - query.where().customField().stringField(CustomFields.IS_EXPRESS_PROCESS).isEqual("true"); - query.where().category().isEqual(categoryPath); - } - private void queryIsInvolved(CaseQuery query) { query.where().currentUserIsInvolved(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessTaskSearchCriteria.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessTaskSearchCriteria.java index c506deb5d26..314809d095c 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessTaskSearchCriteria.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/DashboardProcessTaskSearchCriteria.java @@ -1,8 +1,6 @@ package ch.ivy.addon.portalkit.ivydata.searchcriteria; -import ch.ivy.addon.portalkit.constant.CustomFields; import ch.ivy.addon.portalkit.enums.DashboardStandardTaskColumn; -import ch.ivyteam.ivy.workflow.category.CategoryPath; import ch.ivyteam.ivy.workflow.query.CaseQuery; import ch.ivyteam.ivy.workflow.query.TaskQuery; import ch.ivyteam.ivy.workflow.query.TaskQuery.OrderByColumnQuery; @@ -10,13 +8,11 @@ public class DashboardProcessTaskSearchCriteria { private Long processStartId; - private String processName; private String sortField; private boolean sortDescending; - public DashboardProcessTaskSearchCriteria(Long processStartId, String processName) { + public DashboardProcessTaskSearchCriteria(Long processStartId) { this.processStartId = processStartId; - this.processName = processName; } public TaskQuery buildQuery() { @@ -28,7 +24,10 @@ public TaskQuery buildQuery() { public TaskQuery buildQueryWithoutOrderByClause() { TaskQuery query = TaskQuery.create(); - CaseQuery caseQuery = this.processStartId != null ? queryProcessStartId() : queryExpressProcessCasesByCategoryPath(); + CaseQuery caseQuery = CaseQuery.businessCases(); + if (this.processStartId != null) { + queryProcessStartId(); + } query.where().cases(caseQuery); queryCanWorkOn(query); return query; @@ -38,14 +37,6 @@ private CaseQuery queryProcessStartId() { return CaseQuery.businessCases().where().taskStartId().isEqual(processStartId); } - private CaseQuery queryExpressProcessCasesByCategoryPath() { - String categoryPath = new CategoryPath("ExpressWorkflow/" + this.processName).getValidRawPath(); - CaseQuery caseQuery = CaseQuery.businessCases(); - caseQuery.where().customField().stringField(CustomFields.IS_EXPRESS_PROCESS).isEqual("true"); - caseQuery.where().category().isEqual(categoryPath); - return caseQuery; - } - private void queryCanWorkOn(TaskQuery query) { query.where().currentUserCanWorkOn(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/SideStepSearchCriteria.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/SideStepSearchCriteria.java index f1e2aaf0613..568dec76890 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/SideStepSearchCriteria.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/searchcriteria/SideStepSearchCriteria.java @@ -3,7 +3,6 @@ public class SideStepSearchCriteria { private Long caseId; - private boolean isAdhocExcluded; public Long getCaseId() { return caseId; @@ -16,12 +15,4 @@ public void setCaseId(Long caseId) { public boolean hasCaseId() { return caseId != null && caseId != 0; } - - public boolean isAdhocExcluded() { - return isAdhocExcluded; - } - - public void setAdhocExcluded(boolean isAdhocExcluded) { - this.isAdhocExcluded = isAdhocExcluded; - } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/SideStepService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/SideStepService.java index 5803e414906..5104de40b6c 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/SideStepService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/SideStepService.java @@ -7,7 +7,6 @@ import ch.ivy.addon.portalkit.ivydata.bo.IvySideStep; import ch.ivy.addon.portalkit.ivydata.searchcriteria.SideStepSearchCriteria; -import ch.ivy.addon.portalkit.service.ExpressProcessService; import ch.ivyteam.ivy.casemap.runtime.ICaseMapService; import ch.ivyteam.ivy.casemap.runtime.model.IStartableSideStep; import ch.ivyteam.ivy.environment.Ivy; @@ -34,31 +33,11 @@ public List findSideStepsByCriteria(SideStepSearchCriteria criteria List startableSideSteps = getSideSteps(iCase); List ivySideSteps = startableSideSteps.stream().map(this::toIvySideStep).collect(Collectors.toList()); - if (!criteria.isAdhocExcluded()) { - IvySideStep adhocSideStep = createAdhocSideStep(); - if (adhocSideStep != null) { - ivySideSteps.add(adhocSideStep); - } - } - ivySideSteps.sort((s1, s2) -> StringUtils.compareIgnoreCase(s1.getName(), s2.getName())); return ivySideSteps; }); } - private IvySideStep createAdhocSideStep() { - String expressAdhocWFLink = ExpressProcessService.getInstance().findExpressAdhocWFLink(); - if (StringUtils.isBlank(expressAdhocWFLink)) { - return null; - } - - IvySideStep adhoc = new IvySideStep(); - adhoc.setName(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/sidestep/addAdhocTask")); - adhoc.setStartLink(expressAdhocWFLink); - adhoc.setAdhoc(true); - return adhoc; - } - private IvySideStep toIvySideStep(IStartableSideStep startableSideStep) { IvySideStep ivySideStep = new IvySideStep(); ivySideStep.setName(startableSideStep.getName()); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/mapper/UserProcessMapper.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/mapper/UserProcessMapper.java index 8d6e55fb6f4..914f9487d14 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/mapper/UserProcessMapper.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/mapper/UserProcessMapper.java @@ -5,7 +5,6 @@ import org.apache.commons.lang3.StringUtils; -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.bo.Process; import ch.ivy.addon.portalkit.configuration.ExternalLink; import ch.ivy.addon.portalkit.configuration.UserProcess; @@ -50,18 +49,6 @@ public static UserProcess toUserProcess(DashboardProcess process) { return userProcess; } - public static UserProcess toUserProcess(ExpressProcess expressProcess, String expressStartLink) { - String startLink = expressStartLink + "?workflowID=" + expressProcess.getId(); - UserProcess userProcess = new UserProcess(); - userProcess.setProcessId(expressProcess.getId()); - userProcess.setProcessType(ProcessType.EXPRESS_PROCESS); - userProcess.setProcessName(stripHtmlTags(expressProcess.getProcessName())); - userProcess.setLink(startLink); - userProcess.setDescription(expressProcess.getProcessDescription()); - userProcess.setIcon(expressProcess.getIcon()); - return userProcess; - } - public static UserProcess toUserProcess(ExternalLink externalLink) { UserProcess userProcess = new UserProcess(); userProcess.setProcessId(externalLink.getId().toString()); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java index 31ac12b1c7a..d6d01e578bd 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java @@ -69,7 +69,6 @@ private static class Permissions { IPermission.USER_READ_OWN_SUBSTITUTIONS); private static final List EVERYBODY_PERMISSIONS = Arrays.asList( - PortalPermission.EXPRESS_CREATE_WORKFLOW, PortalPermission.ACCESS_FULL_CASE_LIST, PortalPermission.ACCESS_FULL_TASK_LIST, PortalPermission.ACCESS_FULL_PROCESS_LIST, PortalPermission.TASK_CASE_ADD_NOTE, PortalPermission.TASK_CASE_SHOW_MORE_NOTE, diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/AdhocHistoryService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/AdhocHistoryService.java deleted file mode 100644 index bf51f1ec443..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/AdhocHistoryService.java +++ /dev/null @@ -1,33 +0,0 @@ -package ch.ivy.addon.portalkit.service; - -import java.util.List; - -import ch.ivy.addon.portalkit.bo.AdhocHistory; -import ch.ivyteam.ivy.business.data.store.search.Filter; -import ch.ivyteam.ivy.business.data.store.search.Result; - -public class AdhocHistoryService extends BusinessDataService { - - private static final String ORIGINAL_TASK_ID = "originalTaskId"; - - @Override - public Class getType() { - return AdhocHistory.class; - } - - public List getHistoriesByTaskID(long taskID) { - Filter query = repo().search(getType()).numberField(ORIGINAL_TASK_ID).isEqualTo(taskID); - Result queryResult = query.execute(); - long totalCount = queryResult.totalCount(); - if(totalCount > LIMIT_10) { - queryResult = query.limit(Math.toIntExact(totalCount)).execute(); - } - return queryResult.getAll(); - } - - public boolean hasAdhocHistory(long taskID) { - Filter query = repo().search(getType()).numberField(ORIGINAL_TASK_ID).isEqualTo(taskID); - return query.limit(1).execute().count() > 0; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/CaseDocumentService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/CaseDocumentService.java index 1aefe9d00ed..ee5deb2758a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/CaseDocumentService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/CaseDocumentService.java @@ -25,7 +25,6 @@ public class CaseDocumentService { - public static final String EXPRESS_UPLOAD_FOLDER = "AxonIvyExpress"; private ICase iCase; private CaseDocumentService(ICase iCase) { @@ -46,15 +45,7 @@ public IDocument upload(String filename, InputStream content) { } public List getAll() { - List documents = new ArrayList<>(getAllDocumentsOf(iCase)); - List expressDocs = new ArrayList<>(); - for (IDocument doc : documents) { - if (doc.getPath().asString().contains(EXPRESS_UPLOAD_FOLDER)) { - expressDocs.add(doc); - } - } - documents.removeAll(expressDocs); - return new ArrayList<>(documents); + return getAllDocumentsOf(iCase); } /** @@ -73,7 +64,7 @@ public StreamedContent download(IvyDocument document) { public boolean doesDocumentExist(String filename) { IDocument document = documentsOf(iCase).get(new Path(filename)); - return document != null && !document.getPath().asString().contains(EXPRESS_UPLOAD_FOLDER); + return document != null; } public static boolean isDocumentTypeValid(String filename) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/DashboardWidgetInformationService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/DashboardWidgetInformationService.java index ccb64749b3b..5e854758fdb 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/DashboardWidgetInformationService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/DashboardWidgetInformationService.java @@ -205,19 +205,15 @@ public Map buildStatisticOfProcessByType(List processByTypeStatistic = new HashMap<>(); Long numberOfIvyProcesses = 0l; - Long numberOfExpressProcesses = 0l; Long numberOfExternalLink = 0l; for (var process : processes) { if (process.getType().equals(ProcessType.IVY_PROCESS)) { numberOfIvyProcesses++; - } else if (process.getType().equals(ProcessType.EXPRESS_PROCESS)) { - numberOfExpressProcesses++; } else { numberOfExternalLink++; } } processByTypeStatistic.put(ProcessType.IVY_PROCESS, numberOfIvyProcesses); - processByTypeStatistic.put(ProcessType.EXPRESS_PROCESS, numberOfExpressProcesses); processByTypeStatistic.put(ProcessType.EXTERNAL_LINK, numberOfExternalLink); return processByTypeStatistic; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/ExpressProcessService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/ExpressProcessService.java deleted file mode 100644 index b89a9b7d204..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/ExpressProcessService.java +++ /dev/null @@ -1,122 +0,0 @@ -package ch.ivy.addon.portalkit.service; - -import java.util.Comparator; -import java.util.List; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -import org.apache.commons.lang3.StringUtils; - -import com.axonivy.portal.components.publicapi.ProcessStartAPI; -import com.axonivy.portal.components.util.ProcessStartUtils; - -import ch.ivy.addon.portalkit.bo.ExpressProcess; -import ch.ivy.addon.portalkit.configuration.UserProcess; -import ch.ivy.addon.portalkit.enums.PortalVariable; -import ch.ivy.addon.portalkit.enums.ProcessType; -import ch.ivy.addon.portalkit.util.ExpressManagementUtils; -import ch.ivyteam.ivy.workflow.IProcessStart; - -public class ExpressProcessService extends JsonConfigurationService { - - private static final String EXPRESS_PROCESSES = PortalVariable.EXPRESS_PROCESS.key; - private static final String EXPRESS_CREATE_FRIENDLY_REQUEST_PATH = - "Start Processes/CreateWorkflow/AxonIvyExpressWF.ivp"; - private static final String EXPRESS_ADHOC_WF_FRIENDLY_REQUEST_PATH = - "Start Processes/CreateWorkflow/AxonIvyExpressAdhocWF.ivp"; - private static final String EXPRESS_WORKFLOW_FRIENDLY_REQUEST_PATH = - "Start Processes/GenericPredefinedWorkflowStart/GenericPredefinedProcessStart.ivp"; - private static final String EXPRESS_WORKFLOW_EDIT_REQUEST_PATH = - "Start Processes/GenericPredefinedWorkflowStart/GenericEditProcessStart.ivp"; - private static final String EXPRESS_BUSINESS_VIEW_REQUEST_PATH = - "Start Processes/ExpressStart/startExpressBusinessView.ivp"; - private static ExpressProcessService instance; - - public static ExpressProcessService getInstance() { - if (instance == null) { - instance = new ExpressProcessService(); - } - return instance; - } - - public List findReadyToExecuteProcessOrderByName() { - List expressProcesses = findAll(); - return expressProcesses.stream() - .filter(ExpressProcess::isReadyToExecute) - .sorted(Comparator.comparing(ExpressProcess::getProcessName)) - .collect(Collectors.toList()); - } - - public ExpressProcess findReadyToExecuteProcessByName(String processName) { - List readyToExecuteProcesses = findReadyToExecuteProcessOrderByName(); - return readyToExecuteProcesses.stream() - .filter(filterByName(processName)) - .findFirst().orElse(null); - } - - private Predicate filterByName(String processName) { - return process -> process.getProcessName().equals(processName); - } - - public ExpressProcess findExpressProcessByName(String processName) { - return findAll().stream().filter(filterByName(processName)).findFirst().orElse(null); - } - - public List findReadyToExecuteProcessByProcessType(String processType) { - List readyToExecuteProcesses = findReadyToExecuteProcessOrderByName(); - return readyToExecuteProcesses.stream() - .filter(process -> process.getProcessType().equals(processType)) - .collect(Collectors.toList()); - } - - public ExpressProcess findExpressProcessById(String id) { - ExpressProcess result = findById(id); - if (result != null) { - result.setProcessOwner(ExpressManagementUtils.getValidMemberName(result.getProcessOwner())); - result.setProcessCoOwners(ExpressManagementUtils.getValidMemberNames(result.getProcessCoOwners())); - result.setProcessPermissions(ExpressManagementUtils.getValidMemberNames(result.getProcessPermissions())); - } - return result; - } - - @Override - public Class getType() { - return ExpressProcess.class; - } - - @Override - public String getConfigKey() { - return EXPRESS_PROCESSES; - } - - public static boolean isExpressProcessAdded(ExpressProcess expressProcess, List userProcesses) { - return userProcesses.stream() - .filter(process -> (process.getProcessType() == ProcessType.EXPRESS_PROCESS) && StringUtils.isNoneBlank(process.getProcessId()) && process.getProcessId().equals(expressProcess.getId())) - .findFirst() - .isPresent(); - } - - public String findExpressAdhocWFLink() { - return ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(EXPRESS_ADHOC_WF_FRIENDLY_REQUEST_PATH); - } - - public String findExpressWorkflowStartLink() { - return ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(EXPRESS_WORKFLOW_FRIENDLY_REQUEST_PATH); - } - - public String findExpressBusinessViewStartLink() { - return ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(EXPRESS_BUSINESS_VIEW_REQUEST_PATH); - } - - public IProcessStart findExpressCreationProcess() { - return ProcessStartUtils.findProcessStartByUserFriendlyRequestPath(EXPRESS_CREATE_FRIENDLY_REQUEST_PATH); - } - - public String findExpressWorkflowEditLink(String workflowId) { - String url = ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(EXPRESS_WORKFLOW_EDIT_REQUEST_PATH); - if (StringUtils.isNotBlank(url)) { - return String.format("%s?workflowID=%s", url, workflowId); - } - return StringUtils.EMPTY; - } -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/HistoryService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/HistoryService.java index c5e7c99b5aa..e3890f0b413 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/HistoryService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/HistoryService.java @@ -14,7 +14,6 @@ import ch.ivy.addon.portalkit.bo.History; import ch.ivy.addon.portalkit.bo.History.HistoryType; -import ch.ivy.addon.portalkit.enums.AdditionalProperty; import ch.ivy.addon.portalkit.util.PermissionUtils; import ch.ivy.addon.portalkit.util.SecurityMemberDisplayNameUtils; import ch.ivyteam.ivy.environment.Ivy; @@ -69,13 +68,11 @@ private void buildDisplayCaseNameForNote(Long selectedCaseId, ICase caseHistory, } private List createHistoriesFromITasks(List tasks, boolean excludeSystemTasks, long selectedCaseId) { - List refineTasks = new ArrayList<>(); - refineTasks = tasks.stream().filter(isNotExpressTask()).collect(Collectors.toList()); if (excludeSystemTasks) { - refineTasks = refineTasks.stream().filter(isNotSystemTaskNote()).collect(Collectors.toList()); + tasks = tasks.stream().filter(isNotSystemTaskNote()).collect(Collectors.toList()); } var histories = new ArrayList(); - CollectionUtils.emptyIfNull(refineTasks).forEach(task -> { + CollectionUtils.emptyIfNull(tasks).forEach(task -> { var history = createHistoryFrom(task); buildDisplayCaseNameForNote(selectedCaseId, task.getCase(), history); histories.add(history); @@ -94,11 +91,9 @@ private List sortHistoriesByTimeStampDescending(List> lis private List createHistoriesFromITasks(List tasks, boolean excludeSystemTasks) { if (excludeSystemTasks) { - return tasks.stream().filter(isNotSystemTaskNote()).filter(isNotExpressTask()) - .map(this::createHistoryFrom).collect(Collectors.toList()); + return tasks.stream().filter(isNotSystemTaskNote()).map(this::createHistoryFrom).collect(Collectors.toList()); } - return tasks.stream().filter(isNotExpressTask()) - .map(this::createHistoryFrom).collect(Collectors.toList()); + return tasks.stream().map(this::createHistoryFrom).collect(Collectors.toList()); } public List createHistoriesFromINotes(List notes, boolean excludeSystemNotes) { @@ -113,10 +108,6 @@ private Predicate isNotSystemTaskNote() { return task -> !StringUtils.equals(task.getWorkerUserName(), ISecurityConstants.SYSTEM_USER_NAME); } - private Predicate isNotExpressTask() { - return task -> task.customFields().stringField(AdditionalProperty.ADHOC_EXPRESS_TASK.toString()).getOrNull() == null; - } - private boolean isNotSystemNote(INote note) { return !StringUtils.equals(note.getWritterName(), ISecurityConstants.SYSTEM_USER_NAME); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/IFrameService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/IFrameService.java index ed8d94fba21..c2ae5c739f2 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/IFrameService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/IFrameService.java @@ -16,11 +16,6 @@ public static boolean embedInFrame(Long taskId) { if (task == null) { return true; } - boolean isExpress = Boolean - .parseBoolean(task.getCase().customFields().stringField(CustomFields.IS_EXPRESS_PROCESS).getOrDefault("false")); - if (isExpress) { - return false; - } Boolean isIFrameCustomField = getEmbedInIFrameCustomField(task); if (isIFrameCustomField != null) { @@ -35,11 +30,6 @@ public static boolean embedInFrame(String taskUUID) { if (task == null) { return true; } - boolean isExpress = Boolean - .parseBoolean(task.getCase().customFields().stringField(CustomFields.IS_EXPRESS_PROCESS).getOrDefault("false")); - if (isExpress) { - return false; - } Boolean isIFrameCustomField = getEmbedInIFrameCustomField(task); if (isIFrameCustomField != null) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java index a52d2833639..f503fb1796b 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java @@ -11,10 +11,7 @@ import com.axonivy.portal.bo.ItemByCategoryStatistic; import ch.ivy.addon.portalkit.bo.CategoryNode; -import ch.ivyteam.ivy.cm.exec.LocalizedTextResolverFactory; import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.workflow.category.Category; -import ch.ivyteam.ivy.workflow.category.CategoryPath; import ch.ivyteam.ivy.workflow.category.CategoryTree; public class CategoryUtils { @@ -147,19 +144,6 @@ private static void filterSelectedNode(CheckboxTreeNode node, List node.getChildren().forEach(child -> filterSelectedNode((CheckboxTreeNode) child, selectedNodeValues)); } - public static Category buildExpressCategory(String processName) { - String categoryName = processName; - if (processName.contains(CATEGORY_PATH_DELIMITER)) { - String[] processNameArray = processName.split(CATEGORY_PATH_DELIMITER); - categoryName = processNameArray[processNameArray.length - 1]; - } - - CategoryPath rootExpress = new CategoryPath("ExpressWorkflow"); - CategoryPath process = rootExpress.append(categoryName.trim()); - return Category.createFor(process, - new LocalizedTextResolverFactory().createFor("Categories", Ivy.request().getProcessModelVersion())); - } - private static ItemByCategoryStatistic getNoCategoryCase(CategoryTree category) { var nonEmptyChildrenCount = category.getChildren().stream().map(CategoryTree::count).mapToInt(Long::intValue).sum(); var emptyChildrenCount = category.count() - nonEmptyChildrenCount; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/ExpressManagementUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/ExpressManagementUtils.java deleted file mode 100644 index 0d8fcc6858c..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/ExpressManagementUtils.java +++ /dev/null @@ -1,474 +0,0 @@ -package ch.ivy.addon.portalkit.util; - -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.ERROR; -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.IMPORT_EXPRESS_PROCESSES; -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.IMPORT_RESULT; -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.IMPORT_STATUS; -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.INFO; -import static ch.ivy.addon.portalkit.enums.ExpressMessageType.WARNING; -import static org.apache.commons.lang3.StringUtils.LF; -import static org.apache.commons.lang3.StringUtils.SPACE; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -import javax.ws.rs.core.MediaType; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.StopWatch; -import org.primefaces.model.DefaultStreamedContent; -import org.primefaces.model.StreamedContent; -import org.primefaces.model.file.UploadedFile; - -import com.fasterxml.jackson.databind.JsonNode; - -import ch.ivy.addon.portalkit.bo.ExpressFormElement; -import ch.ivy.addon.portalkit.bo.ExpressProcess; -import ch.ivy.addon.portalkit.bo.ExpressTaskDefinition; -import ch.ivy.addon.portalkit.constant.PortalConstants; -import com.axonivy.portal.components.dto.SecurityMemberDTO; -import ch.ivy.addon.portalkit.enums.ExpressMessageType; -import ch.ivy.addon.portalkit.persistence.converter.BusinessEntityConverter; -import ch.ivy.addon.portalkit.service.DateTimeGlobalSettingService; -import ch.ivy.addon.portalkit.service.ExpressProcessService; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.security.ISecurityContext; -import ch.ivyteam.ivy.security.ISecurityMember; -import ch.ivyteam.ivy.security.IUser; -import ch.ivyteam.ivy.security.query.UserQuery; - -public class ExpressManagementUtils { - - private static final String VERSION = "version"; - private static final String EXPRESS_WORKFLOW = "expressWorkflow"; - private static final String PATTERN = Ivy.cms().coLocale("/patterns/dateTimePattern", Locale.ENGLISH); - private static final String REPEAT_EXPRESS = "AHWF"; - private static final String JSON_EXTENSION = "json"; - private static final String EXTERNAL_ID_PREFIX = " externalId:"; - - /** - * Find express repeat workflow list which are ready to execute and start - * - * @return List of Express workflow - */ - public static List findExpressProcesses() { - List expressProcesses = new ArrayList<>(); - List workflows = ExpressProcessService.getInstance().findReadyToExecuteProcessByProcessType(REPEAT_EXPRESS); - for (ExpressProcess wf : workflows) { - if (PermissionUtils.checkAbleToStartAndAbleToEditExpressWorkflow(wf)) { - expressProcesses.add(wf); - } - } - return expressProcesses; - } - - /** - * Check if process name is existed or not - * @param processName - * @return true if process name was used, false if process name is available - */ - public static boolean isProcessNameDuplicated(String processName) { - return ExpressProcessService.getInstance().findExpressProcessByName(processName) != null; - } - - /** - * Import Express workflow list from JSON file. - * - * @param expressData file contains express workflow list - * @return output messages after run import process - */ - public static Map importExpressProcesses(UploadedFile expressData) { - Map outputMessages = initOutputMessage(); - StringBuilder importResult = (StringBuilder) outputMessages.get(IMPORT_RESULT); - StopWatch sw = new StopWatch(); - sw.start(); - - if (expressData == null || !FilenameUtils.isExtension(expressData.getFileName(), JSON_EXTENSION)) { - StringBuilder message = (StringBuilder) outputMessages.get(IMPORT_RESULT); - message.append(addResultLog(cms(expressData != null ? "/Dialogs/components/CaseDocument/invalidFileMessage" : "/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/fileEmptyMessage"), ERROR)); - return outputMessages; - } - - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/startDeployLog", Arrays.asList(expressData.getFileName())), INFO)); - - try { - installExpressWorkflows(expressData.getInputStream(), outputMessages); - - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/endDeployLog"), INFO)); - sw.stop(); - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/deploymentFinishedLog", Arrays.asList(expressData.getFileName(),sw.getTime())), INFO)); - } catch (Exception e) { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/deployErrorLog",Arrays.asList(expressData.getFileName())), ERROR)); - importResult.append(addResultLog(e.getMessage(), ERROR)); - Ivy.log().error(e); - } - - importResult.append(LF); - outputMessages.put(IMPORT_RESULT, importResult); - return outputMessages; - } - - public static Map initOutputMessage() { - Map outputMessages = new HashMap<>(); - outputMessages.put(IMPORT_STATUS, cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/failed")); - outputMessages.put(IMPORT_RESULT, new StringBuilder()); - outputMessages.put(IMPORT_EXPRESS_PROCESSES, new ArrayList()); - return outputMessages; - } - - public static Map installExpressWorkflows(InputStream expressInputstream, Map outputMessages) { - JsonNode jsonNode = extractJsonObject(expressInputstream); - if (jsonNode != null) { - var version = jsonNode.get(VERSION).asInt(); - if (!validateExpressVersion(outputMessages, version)) { - List expressProcesses = new ArrayList<>(); - var expressWorkflowNode = jsonNode.get(EXPRESS_WORKFLOW); - if (version == 1) { - expressProcesses = proceedForOldWorkflow(expressWorkflowNode); - } else if (version == 2) { - expressProcesses = BusinessEntityConverter.jsonValueToEntities(expressWorkflowNode.toString(), ExpressProcess.class); - } - processExpressJsonObject(outputMessages, expressProcesses); - } - } - return outputMessages; - } - - private static JsonNode extractJsonObject(InputStream expressInputstream) { - try { - return BusinessEntityConverter.getObjectMapper().readTree(expressInputstream); - } catch (IOException e) { - e.printStackTrace(); - Ivy.log().error("Cannot paste JSON", e.getMessage()); - } - return null; - } - - private static List proceedForOldWorkflow(JsonNode expressWorkflowNode) { - List expressProcesses = new ArrayList<>(); - if (expressWorkflowNode.isArray()) { - var expressIterator = expressWorkflowNode.iterator(); - while (expressIterator.hasNext()) { - JsonNode jsonNode = expressIterator.next(); - ExpressProcess process = BusinessEntityConverter.jsonValueToEntity(jsonNode.get("expressProcess").toString(), ExpressProcess.class); - Map expressTaskDefinitionMap = proceedOldTaskDefinition(jsonNode); - process.setTaskDefinitions(new ArrayList<>(expressTaskDefinitionMap.values())); - expressProcesses.add(process); - } - } - return expressProcesses; - } - - private static Map proceedOldTaskDefinition(JsonNode jsonNode) { - Map expressTaskDefinitionMap = new HashMap<>(); - var expressTaskDefinitionNode = jsonNode.get("expressTaskDefinitions"); - if (expressTaskDefinitionNode.isArray()) { - var taskDefinitionIterator = expressTaskDefinitionNode.iterator(); - while (taskDefinitionIterator.hasNext()) { - var taskDefinitionNode = taskDefinitionIterator.next(); - int taskPosition = taskDefinitionNode.get("taskPosition").asInt(); - expressTaskDefinitionMap.put(taskPosition, BusinessEntityConverter.jsonValueToEntity(taskDefinitionNode.toString(), ExpressTaskDefinition.class)); - } - } - - var expressFormElementNode = jsonNode.get("expressFormElements"); - if (expressFormElementNode.isArray()) { - var formElementIterator = expressFormElementNode.iterator(); - while (formElementIterator.hasNext()) { - var formElementNode = formElementIterator.next(); - int taskPosition = formElementNode.get("taskPosition").asInt(); - ExpressTaskDefinition expressTaskDefinition = expressTaskDefinitionMap.get(taskPosition); - if (expressTaskDefinition.getFormElements() == null) { - expressTaskDefinition.setFormElements(new ArrayList<>()); - } - expressTaskDefinition.getFormElements().add(BusinessEntityConverter.jsonValueToEntity(formElementNode.toString(), ExpressFormElement.class)); - } - } - return expressTaskDefinitionMap; - } - - private static void processExpressJsonObject(Map outputMessages, List expressProcesses) { - if (expressProcesses != null) { - int errorCounts = deployExpressWorkflows(outputMessages, expressProcesses); - if (errorCounts == 0) { - outputMessages.put(IMPORT_STATUS, cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/successful")); - } else if (errorCounts < expressProcesses.size()) { - outputMessages.put(IMPORT_STATUS, cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/status/warning")); - } - } - } - - private static boolean validateExpressVersion(Map outputMessages, Integer version) { - StringBuilder importResult = (StringBuilder) outputMessages.get(IMPORT_RESULT); - if (validateExpressVersion(version)) { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/versionLog", Arrays.asList(version)), INFO)); - importResult.append(LF); - } else { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/invalidVersionLog", Arrays.asList(version)), ERROR)); - importResult.append(LF); - return true; - } - return false; - } - - private static boolean validateExpressVersion(Integer expressVersion) { - for (Integer version : PortalConstants.EXPRESS_INVALID_VERSION) { - if (version == expressVersion) { - return false; - } - } - return true; - } - - private static List getExpressMember() { - List securityResultDTOList = SecurityMemberUtils.findSecurityMembers("", 0, -1); - return securityResultDTOList.stream().map(SecurityMemberDTO::getMemberName).collect(Collectors.toList()); - } - - @SuppressWarnings("unchecked") - private static int deployExpressWorkflows(Map outputMessages, List expressProcesses) { - StringBuilder importResult = (StringBuilder) outputMessages.get(IMPORT_RESULT); - List outputExpressProcessList = (List) outputMessages.get(IMPORT_EXPRESS_PROCESSES); - List memberList = getExpressMember(); - - int errorCounts = 0; - // Save to BusinessData - for (ExpressProcess expressProcess : expressProcesses) { - importResult.append(LF); - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/process/startDeployProcessLog", Arrays.asList(expressProcess.getProcessName())), INFO)); - - if (isProcessNameDuplicated(expressProcess.getProcessName())) { - errorCounts++; - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/process/duplicateProcessNameLog", Arrays.asList(expressProcess.getProcessName())), ERROR)); - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/process/installProcessFailedLog", Arrays.asList(expressProcess.getProcessName())), ERROR)); - continue; - } - - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/process/installedProcessLog", Arrays.asList( expressProcess.getProcessName())), INFO)); - importResult.append(LF); - - // Validate user - validateUsersForProcess(importResult, memberList, expressProcess); - expressProcess.getTaskDefinitions().forEach(taskDefinition -> { - validateUserForTaskDef(importResult, memberList, expressProcess, taskDefinition); - - taskDefinition.setResponsibles(updateExternalIdsToSecurityMemberNames(taskDefinition.getResponsibles())); - }); - - // Save process - ExpressProcess workflowSaved = new ExpressProcess(); - String newId = workflowSaved.getId(); - workflowSaved = expressProcess; - workflowSaved.setId(newId); - workflowSaved.setProcessPermissions(updateExternalIdsToSecurityMemberNames(expressProcess.getProcessPermissions())); - workflowSaved.setProcessOwner(updateExternalIdToSecurityMemberName(expressProcess.getProcessOwner())); - workflowSaved.setProcessCoOwners(updateExternalIdsToSecurityMemberNames(expressProcess.getProcessCoOwners())); - ExpressProcessService.getInstance().save(workflowSaved); - - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/process/installedProcessLog", Arrays.asList(expressProcess.getProcessName())), INFO)); - importResult.append(LF); - - // Update output process - outputExpressProcessList.add(expressProcess); - } - - return errorCounts; - } - - private static void validateUserForTaskDef(StringBuilder importResult, List memberList, - ExpressProcess expressProcess, ExpressTaskDefinition taskDefinition) { - taskDefinition.getResponsibles().forEach(userName -> { - if (!memberList.contains(userName)) { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/validate/validateTaskDefUserLog", Arrays.asList(expressProcess.getProcessName(), userName)), WARNING)); - } - }); - } - - private static void validateUsersForProcess(StringBuilder importResult, List memberList, - ExpressProcess expressProcess) { - expressProcess.getProcessPermissions().forEach(userName -> { - if (!memberList.contains(userName)) { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/validate/validateProcessPermissionLog", Arrays.asList(expressProcess.getProcessName(), userName)), WARNING)); - } - }); - - expressProcess.getProcessCoOwners().forEach(userName -> { - if (!memberList.contains(userName)) { - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/validate/validateProcessCoOwnerLog", Arrays.asList( expressProcess.getProcessName(), userName)), WARNING)); - } - }); - - if (!memberList.contains(expressProcess.getProcessOwner())) { - IUser importUser = Ivy.request().getSession().getSessionUser(); - expressProcess.setProcessOwner(importUser.getMemberName()); - String importUserName = importUser.getDisplayName() != null ? importUser.getDisplayName() : importUser.getName(); - importResult.append(addResultLog(cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressMessages/validate/validateProcessOwnerLog", Arrays.asList(expressProcess.getProcessName(), expressProcess.getProcessOwner(), importUserName)), WARNING)); - } - } - - private static String addResultLog(String message, ExpressMessageType messageType) { - StringBuilder importExpressResult = new StringBuilder(); - String pattern = DateTimeGlobalSettingService.getInstance().getGlobalDateTimePattern(); - String curentDate = new SimpleDateFormat(pattern).format(new Date()); - importExpressResult.append(curentDate).append(SPACE); - - switch (messageType) { - case INFO: - importExpressResult.append(INFO.getLabel()).append(":").append(SPACE); - break; - case ERROR: - importExpressResult.append(ERROR.getLabel()).append(":").append(SPACE); - break; - case WARNING: - importExpressResult.append(WARNING.getLabel()).append(":").append(SPACE); - break; - default: - break; - } - importExpressResult.append(message); - importExpressResult.append(LF); - return importExpressResult.toString(); - } - - /** - * Export Express process to JSON file. - * - * @param selectedExpressProcesses - * @return a StreamedContent with content type as a JSON file - */ - public static StreamedContent exportExpressProcess(List selectedExpressProcesses) { - var rootNode = BusinessEntityConverter.getObjectMapper().createObjectNode(); - rootNode.put(VERSION, 2); - var arrayExpress = rootNode.putArray(EXPRESS_WORKFLOW); - CollectionUtils.emptyIfNull(selectedExpressProcesses).forEach(express -> { - var expressAsJson = BusinessEntityConverter.entityToJsonValue(express); - JsonNode expressNode = null; - try { - expressNode = BusinessEntityConverter.getObjectMapper().readTree(expressAsJson); - } catch (Exception e) { - Ivy.log().warn("Cannot paste express object", e.getMessage()); - } - if (expressNode != null) { - arrayExpress.add(expressNode); - } - }); - - InputStream inputStream = new ByteArrayInputStream(rootNode.toString().getBytes(StandardCharsets.UTF_8)); - return DefaultStreamedContent - .builder() - .stream(() -> inputStream) - .contentType(MediaType.APPLICATION_JSON) - .name(getExportFileName()).build(); - } - - private static String getExportFileName() { - String curentDate = new SimpleDateFormat(PATTERN).format(new Date()); - return cms("/ch.ivy.addon.portalkit.ui.jsf/components/expressManagement/expressExportName", Arrays.asList(curentDate)); - } - - /** - * Some users have external security ID, - * need to add correspond external security ID of those user into security members list instead of username. - * - * @param securityNames - * @return names of security members with external ID. - */ - public static List updateExternalIdsToSecurityMemberNames(List securityNames) { - List result = new ArrayList<>(); - securityNames.forEach(securityName -> { - result.add(updateExternalIdToSecurityMemberName(securityName)); - }); - return result; - } - - /** - * Try to get external ID of security member, - * If there is no external ID, use old securityName instead. - * - * @param securityName - * @return name of security member with external ID. - */ - public static String updateExternalIdToSecurityMemberName(String securityName) { - if (securityName.startsWith("#")) { - IUser securityMember = UserUtils.findUserByUsername(securityName.substring(1)); - if (securityMember != null) { - return StringUtils.isBlank(securityMember.getExternalId()) ? securityName : securityName.concat(EXTERNAL_ID_PREFIX).concat(securityMember.getExternalId()); - } else { - return securityName; - } - } else { - ISecurityMember securityMember = ISecurityContext.current().members().find(securityName); - return securityMember == null ? securityName : securityMember.getMemberName(); - } - } - - /** - * Find valid member name with external lookup - * - * @param memberName - * @return valid member name - */ - public static String getValidMemberName(String memberName) { - String result = ""; - if (StringUtils.isBlank(memberName)) { - return result; - } - - ISecurityMember responsible; - if (memberName.contains(EXTERNAL_ID_PREFIX)) { - UserQuery query = ISecurityContext.current().users().query(); - responsible = query.where().externalId().isEqual(memberName.split(EXTERNAL_ID_PREFIX)[1]).executor().firstResult(); - result = Optional.ofNullable(responsible).map(ISecurityMember::getMemberName).orElse(""); - } else { - responsible = ISecurityContext.current().members().find(memberName); - if (responsible != null) { - result = Optional.ofNullable(responsible).map(ISecurityMember::getMemberName).orElse(""); - } - } - return result; - } - - /** - * Find valid member names with external lookup - * - * @param memberNames - * @return valid member names - */ - public static List getValidMemberNames(List memberNames) { - List result = new ArrayList<>(); - if (CollectionUtils.isEmpty(memberNames)) { - return result; - } - - memberNames.forEach(name -> { - String updatedMemberName = getValidMemberName(name); - if(StringUtils.isNotBlank(updatedMemberName)) { - result.add(updatedMemberName); - } - }); - - return result; - } - - private static String cms(String cmsUri) { - return Ivy.cms().co(cmsUri); - } - - private static String cms(String cmsUri, List params) { - return Ivy.cms().co(cmsUri, params); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java index b6d86e3eba0..6e50ed8ce4a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java @@ -1,20 +1,12 @@ package ch.ivy.addon.portalkit.util; -import java.util.Collection; import java.util.Objects; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; - -import ch.ivy.addon.portalkit.bo.ExpressProcess; import ch.ivy.addon.portalkit.enums.PortalPermission; import ch.ivyteam.ivy.environment.Ivy; import ch.ivyteam.ivy.security.IPermission; -import ch.ivyteam.ivy.security.IRole; import ch.ivyteam.ivy.security.ISecurityContext; import ch.ivyteam.ivy.security.ISecurityDescriptor; -import ch.ivyteam.ivy.security.ISecurityMember; -import ch.ivyteam.ivy.security.IUser; import ch.ivyteam.ivy.security.exec.Sudo; import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository; import ch.ivyteam.ivy.workflow.ICase; @@ -22,7 +14,6 @@ public class PermissionUtils { private static final String ADMIN_ROLE = "AXONIVY_PORTAL_ADMIN"; - private static final String EXTERNAL_ID_PREFIX = " externalId:"; private PermissionUtils() {} @@ -83,62 +74,6 @@ public static boolean checkDestroyTaskPermission() { return hasPermission(IPermission.TASK_DESTROY); } - /** - * Check if user can start an Express workflow - * and set permission if user able to edit/delete express WF - * - * @param workflow - * @return True: has permission to start Express workflow, False: Do not have permission to start Express workflow - */ - public static boolean checkAbleToStartAndAbleToEditExpressWorkflow(ExpressProcess workflow) { - String validProcessOwnerName = ExpressManagementUtils.getValidMemberName(workflow.getProcessOwner()); - boolean isWorkflowOwner = StringUtils.isNotBlank(validProcessOwnerName) ? Ivy.session().canActAsUser( - ISecurityContext.current().users().find(validProcessOwnerName.substring(1))) : false; - boolean hasAdminRole = isSessionUserHasAdminRole(); - - if (isWorkflowOwner || hasAdminRole) { - workflow.setAbleToEdit(true); - return true; - } - Collection ableToStartResponsibles = CollectionUtils.emptyIfNull(workflow.getProcessPermissions()); - Collection processOwners = CollectionUtils.emptyIfNull(workflow.getProcessCoOwners()); - - for (String memberName : processOwners) { - if(isSessionUserBelongsToPermissionGroup(memberName)) { - workflow.setAbleToEdit(true); - return true; - } - } - - for (String memberName : ableToStartResponsibles) { - if(isSessionUserBelongsToPermissionGroup(memberName)) { - return true; - } - } - - return false; - } - - private static boolean isSessionUserBelongsToPermissionGroup(String memberName) { - if(memberName == null) { - return false; - } - - String memberNameWithoutExternalId = getMemberNameWithoutExternalId(memberName); - ISecurityMember member = ISecurityContext.current().members().find(memberNameWithoutExternalId); - if(member != null) { - boolean isAssignedUser = member.isUser() && Ivy.session().canActAsUser((IUser) member); - boolean hasAssignedRole = !member.isUser() && Ivy.session().hasRole((IRole) member, false); - return isAssignedUser || hasAssignedRole; - } - return false; - } - - private static String getMemberNameWithoutExternalId(String memberName) { - int indexOfExternalId = memberName.indexOf(EXTERNAL_ID_PREFIX); - return indexOfExternalId > -1 ? memberName.substring(0, indexOfExternalId) : memberName; - } - public static boolean isSessionUserHasAdminRole() { return doesSessionUserHaveRole(ADMIN_ROLE); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PortalProcessViewerUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PortalProcessViewerUtils.java index ff83e080225..8cd28c4510a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PortalProcessViewerUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PortalProcessViewerUtils.java @@ -21,14 +21,14 @@ public class PortalProcessViewerUtils { public static final String DEFAULT_LINK = "#"; public static String getStartProcessViewerPageUri(ICase selectedCase) { - if (Objects.isNull(selectedCase) || Objects.isNull(selectedCase.getProcessStart()) || ProcessViewerUtils.isExpressCase(selectedCase)) { + if (Objects.isNull(selectedCase) || Objects.isNull(selectedCase.getProcessStart())) { return DEFAULT_LINK; } return buildPortalProcessViewerUrl(null, selectedCase.getId(), selectedCase.getProcessStart().getLink().getRelative()); } public static String getStartProcessViewerPageUri(ITask selectedTask) { - if (Objects.isNull(selectedTask) || Objects.isNull(selectedTask.getCase()) || Objects.isNull(selectedTask.getCase().getProcessStart()) || ProcessViewerUtils.isExpressCase(selectedTask.getCase())) { + if (Objects.isNull(selectedTask) || Objects.isNull(selectedTask.getCase()) || Objects.isNull(selectedTask.getCase().getProcessStart())) { return DEFAULT_LINK; } return buildPortalProcessViewerUrl(selectedTask.getId(), null, null); diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/CaseWidget/ActionsCell.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/CaseWidget/ActionsCell.xhtml index f332a864b9d..50a4b5de11b 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/CaseWidget/ActionsCell.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/CaseWidget/ActionsCell.xhtml @@ -6,7 +6,7 @@ diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/CombinedModeProcess.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/CombinedModeProcess.xhtml index 403b10fda54..2d4645d8aad 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/CombinedModeProcess.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/CombinedModeProcess.xhtml @@ -36,10 +36,9 @@ - -