From d83a8108ff4988a91282bd16d6ae1c87529cca4b Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:51:53 +0200 Subject: [PATCH 01/10] Update README.md --- decisioncenter/guicustomization/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decisioncenter/guicustomization/README.md b/decisioncenter/guicustomization/README.md index 5841a7e..5b8d72a 100644 --- a/decisioncenter/guicustomization/README.md +++ b/decisioncenter/guicustomization/README.md @@ -2,7 +2,7 @@ ## Introduction -This sample shows you how to customize the Business console using [GUI customization sample](https://www.ibm.com/docs/en/odm/9.0.0?topic=center-gui-customization) in a container environment. +This sample shows you how to customize the Business Console using [GUI customization sample](https://www.ibm.com/docs/en/odm/9.0.0?topic=center-gui-customization) in a container environment. ## Running this sample in Decision Center @@ -31,7 +31,7 @@ To use the sample in Decision Center, you need to build a JAR. wget http://localhost:9060/decisioncenter/assets/decision-center-client-api.zip ``` - Then, unzip decision-center-client-api.zip on the **lib** directory : + Then, unzip decision-center-client-api.zip to the **lib** directory : ``` unzip decision-center-client-api.zip -d "lib" ``` From e4a0a6e6b0a33c1c7b60a01268f6e370fa38b493 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:16:51 +0200 Subject: [PATCH 02/10] Update README-DOCKER.md --- .../guicustomization/README-DOCKER.md | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/decisioncenter/guicustomization/README-DOCKER.md b/decisioncenter/guicustomization/README-DOCKER.md index c8061a0..e540b5e 100644 --- a/decisioncenter/guicustomization/README-DOCKER.md +++ b/decisioncenter/guicustomization/README-DOCKER.md @@ -3,7 +3,7 @@ This readme explains how to run the GUI Customization sample in Docker. -Doing so, you do not need to have ODM installed. Instead we are relying on the 'ODM for developer' container image. +Doing so, you do not need to have ODM installed. Instead we are relying on the 'ODM for Developer' container image. Before following the steps below, make sure you have built the images as explained in [README.md](README.md). @@ -14,20 +14,20 @@ Before following the steps below, make sure you have built the images as explain cd decisioncenter/guicustomization/guicustomization-source ``` - Run ODM and Notifiers docker images + Run ODM docker images containing GUI customization: ```bash docker-compose -f compose-odm-dev.yml up odm-with-gui-customization & ``` -### Using the Sample +### Using the sample **Log in** to the Business Console at [http://localhost:9060/decisioncenter](http://localhost:9060/decisioncenter) using the credentials: - **Username**: `Paul` - **Password**: `Paul` -Load the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service. +Open the **Library** tab. Import the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service. -To activate the Custom Value Editor, after login in Decision Center : +To activate the GUI customization: - Go in the menu **Administration>Settings>Custom Settings** - Register a new setting named **decisioncenter.web.core.extensions.entrypoints** keeping blank the **default value of the setting** field. @@ -43,51 +43,51 @@ Log in to the Business console by using **Paul** as the username and password. Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and select the **main** branch. -Click the new button **My Admin Button**. A dialog displays metrics on the decision service. +Click the new button **My Admin Button** in the main toolbar. A dialog displays metrics on the decision service. Close the dialog. Click the new tab **My Admin Tab**. The tab displays the same metrics on the decision service. -Click the **Decision Artifacts** tab. Expand the **Loan Validation Scoring computation** package, and edit the rule **neverBankruptcy** (accept any default settings if prompted). +Click the **Decision Artifacts** tab. Expand the **computation** package of the **Loan Validation Scoring** project. Edit the rule **neverBankruptcy** (accept any default settings if prompted). Click the button **My Info**. A dialog displays information on the rule. -Close the dialog and cancel the editing session. Click **main** in the breadcrumbs. +Close the dialog and cancel the editing session to go back to the **Decision Artifacts** tab. -Click the **Decision Artifacts** tab and make sure that the operations are displayed. To display them, click **Types** and select **Operations**. +Make sure that the **Operations** type are displayed. To display them, click **Types** and select **Operations**. -Expand the **Operations** folder under **Loan Validation Scoring** to edit the scoring operation. +Click the **Operations** element under **Loan Validation Scoring** project and edit the **scoring** operation. Click the button **My Operation Info**. A dialog displays information on the operation. -Close the dialog, and cancel the editing session. Click **main** in the breadcrumbs. +Close the dialog, and cancel the editing session to go back to the **Decision Artifacts** tab. -Click the tab **Deployments** and edit the **test deployment configuration**. +Click the **Deployments** tab and edit the **test deployment** configuration. -Click the **Targets** tab and select the **Decision Service Execution server**. Save the test deployment configuration. +Click the **Targets** tab and make sure the **Decision Service Execution** server is well selected. Save the **test deployment** configuration and create a new version. -Click the name of the test deployment configuration. +Click the name of the **test deployment** configuration. -Click the **Custom Deploy** button in the toolbar. A dialog shows the status of the deployment. +Click the **Custom Deploy** button in the toolbar. This will start the deployment and a dialog shows its status: _Deploying..._ to _Report status: COMPLETED_ -Close the dialog and log out of the Business console. +Close the dialog and log out of the Business Console. ![Business Console Custom GUI Admin](images/custom_gui_admin.png) #### To see the customization for a non-administrative user: -Log in to the Business console by using **Bea** as the username and password. +Log in to the Business Console by using **Bea** as the username and password. -Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the main branch. +Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the **main** branch. -Click the new button **My Button**. A dialog displays some metrics on the decision service. The dialog content is different from the content that is provided for the administrator. +Click the new button **My Button**. A dialog displays some metrics on the decision service. The dialog content is different from the content that is provided for the an administrator user. -Close the dialog and then click the new tab **My Tab**. The tab displays the same metrics on the decision service. The tab content is different from the content that is provided for the administrator. +Close the dialog and then click the new tab **My Tab**. The tab displays the same metrics on the decision service. The tab content is different from the content that is provided for an administrator user. -Log out of the Business console. +Log out of the Business Console. ![Business Console Custom GUI](images/custom_gui.png) -### Stopping the Sample +### Stopping the sample ```bash docker-compose -f compose-odm-dev.yml down From 81021f4687677ee6c262ba0ec3fe3f3219716d76 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:49:52 +0200 Subject: [PATCH 03/10] Update README.md for 9.5 --- decisioncenter/guicustomization/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/decisioncenter/guicustomization/README.md b/decisioncenter/guicustomization/README.md index 5b8d72a..7b596d3 100644 --- a/decisioncenter/guicustomization/README.md +++ b/decisioncenter/guicustomization/README.md @@ -8,7 +8,7 @@ This sample shows you how to customize the Business Console using [GUI customiza ### 1) Prerequisites -Before you begin, ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.25+). +Before you begin, ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.28+). ### 2) Building the Decision Center extension JAR @@ -43,7 +43,7 @@ To use the sample in Decision Center, you need to build a JAR. 2. Build the JAR - The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 17. + The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 21, compatible for ODM 9.5. Run the command below in the **decisioncenter/guicustomization/guicustomization-source** directory: @@ -51,7 +51,7 @@ To use the sample in Decision Center, you need to build a JAR. docker run --rm \ -v "$(pwd)":/usr/src/sample \ -w /usr/src/sample \ - maven:3.8.5-openjdk-17 \ + maven:3.9.9-ibm-semeru-21-jammy \ mvn clean install ``` From 8de3d7898ebf846d6c2588d0fac53c166d1d4454 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:51:25 +0200 Subject: [PATCH 04/10] Update import from javax to jakarta package --- .../java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decisioncenter/guicustomization/guicustomization-source/src/main/java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java b/decisioncenter/guicustomization/guicustomization-source/src/main/java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java index df59182..f164e63 100644 --- a/decisioncenter/guicustomization/guicustomization-source/src/main/java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java +++ b/decisioncenter/guicustomization/guicustomization-source/src/main/java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java @@ -9,7 +9,7 @@ */ package com.ibm.rules.decisioncenter.web.ext; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; From 10e318490a19de30a82f8d453ae224af49fcc491 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:54:01 +0200 Subject: [PATCH 05/10] Update tasks by target --- .../guicustomization/guicustomization-source/pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/decisioncenter/guicustomization/guicustomization-source/pom.xml b/decisioncenter/guicustomization/guicustomization-source/pom.xml index 1b72fe5..66ff2d1 100644 --- a/decisioncenter/guicustomization/guicustomization-source/pom.xml +++ b/decisioncenter/guicustomization/guicustomization-source/pom.xml @@ -21,8 +21,8 @@ run - - + @@ -30,7 +30,7 @@ - + @@ -39,6 +39,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.14.0 default-compile From 9dc95260637203ba1715c8591869597457bc588f Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:54:38 +0200 Subject: [PATCH 06/10] Update to ODM 9.5 --- .../guicustomization-source/compose-odm-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decisioncenter/guicustomization/guicustomization-source/compose-odm-dev.yml b/decisioncenter/guicustomization/guicustomization-source/compose-odm-dev.yml index 0ec8907..cc23e93 100644 --- a/decisioncenter/guicustomization/guicustomization-source/compose-odm-dev.yml +++ b/decisioncenter/guicustomization/guicustomization-source/compose-odm-dev.yml @@ -1,6 +1,6 @@ services: odm: - image: icr.io/cpopen/odm-k8s/odm:9.0.0 + image: icr.io/cpopen/odm-k8s/odm:9.5 mem_limit: 4G memswap_limit: 4G user: "1001:0" @@ -12,7 +12,7 @@ services: - 9453:9453 odm-with-gui-customization: - image: icr.io/cpopen/odm-k8s/odm:9.0.0 + image: icr.io/cpopen/odm-k8s/odm:9.5 mem_limit: 4G memswap_limit: 4G user: "1001:0" From f1bb0c90db7ece299b6b6066b2eed55b29e2eba7 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:47:29 +0200 Subject: [PATCH 07/10] Update README-KUBERNETES.md --- .../guicustomization/README-KUBERNETES.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/decisioncenter/guicustomization/README-KUBERNETES.md b/decisioncenter/guicustomization/README-KUBERNETES.md index 3bdcdaf..2909ca9 100644 --- a/decisioncenter/guicustomization/README-KUBERNETES.md +++ b/decisioncenter/guicustomization/README-KUBERNETES.md @@ -1,6 +1,6 @@ # Introduction -This README explains how to run the GUI Customization sample in Kubernetes. +This readme explains how to run the GUI Customization sample in Kubernetes. Before following the steps below, make sure you have built the images as explained in [README.md](README.md). # Configuring the sample in Kubernetes @@ -9,9 +9,9 @@ Before following the steps below, make sure you have built the images as explain Any file server reachable by Decision Center is suitable. -You can either use an existing one or follow the instructions [here](https://github.com/DecisionsDev/odm-docker-kubernetes/blob/vnext-release/contrib/file-server/README.md#setup-an-httpd-file-server) to deploy a httpd file server in a new pod. +You can either use an existing one or follow the instructions [here](https://github.com/DecisionsDev/odm-docker-kubernetes/blob/vnext-release/contrib/file-server/README.md#setup-an-httpd-file-server) to deploy an httpd file server in a new pod. -Upload the **guicustomization-1.0.jar** file on the file server : +Upload the **guicustomization-1.0.jar** file on the file server: ``` curl -T guicustomization/guicustomization-source/target/guicustomization-1.0.jar $FILESERVER_URL ``` @@ -55,14 +55,16 @@ helm repo update #### d. Check your access to the ODM chart ```bash -$ helm search repo ibm-odm-prod +helm search repo ibm-odm-prod +``` +```bash NAME CHART VERSION APP VERSION DESCRIPTION ibm-helm/ibm-odm-prod 24.0.0 9.0.0.0 IBM Operational Decision Manager ``` #### e. Create a secret to manage custom authentication/authorization -Create a secret to manage custom authentication/authorization using the [webSecurity.xml](./guicustomization-source/webSecurity.xml) and [group-security-configurations.xml](./guicustomization-source/group-security-configurations.xml) files : +Create a secret to manage custom authentication/authorization using the [webSecurity.xml](./guicustomization-source/webSecurity.xml) and [group-security-configurations.xml](./guicustomization-source/group-security-configurations.xml) files: ``` kubectl create secret generic my-custom-auth-secret --from-file=webSecurity.xml --from-file=group-security-configurations.xml @@ -85,7 +87,7 @@ Add all the other parameters suitable to your platform in `values.yaml`. Check t If you are on OCP, you can use this [values.yaml](./guicustomization-source/values.yaml) file by replacing `` by the actual URL of the file server hosting the JARs. ```bash -helm install guicustomization-sample ibmcharts/ibm-odm-prod -f values.yaml +helm install guicustomization-sample ibm-helm/ibm-odm-prod -f values.yaml ``` # Using the Sample @@ -94,9 +96,9 @@ helm install guicustomization-sample ibmcharts/ibm-odm-prod -f values.yaml - **Username**: `Paul` - **Password**: `Paul` -Load the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service. +Open the **Library** tab. Import the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service. -To activate the Custom Value Editor, after login in Decision Center : +To activate the Custom Value Editor, after login in Decision Center: - Go in the menu **Administration>Settings>Custom Settings** - Register a new setting named **decisioncenter.web.core.extensions.entrypoints** keeping blank the **default value of the setting** field. @@ -106,52 +108,50 @@ To activate the Custom Value Editor, after login in Decision Center : ![Custom Settings](images/custom_settings_2.png) -#### To see the customization for an administrator: - -Log in to the Business console by using **Paul** as the username and password. - Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and select the **main** branch. -Click the new button **My Admin Button**. A dialog displays metrics on the decision service. +Click the new button **My Admin Button** in the main toolbar. A dialog displays metrics on the decision service. Close the dialog. Click the new tab **My Admin Tab**. The tab displays the same metrics on the decision service. -Click the **Decision Artifacts** tab. Expand the **Loan Validation Scoring>computation** package, and edit the rule **neverBankruptcy** (accept any default settings if prompted). +![Business Console Custom GUI Admin](images/custom_gui_admin.png) + +Click the **Decision Artifacts** tab. Expand the **computation** package of the **Loan Validation Scoring** project. Edit the rule **neverBankruptcy** (accept any default settings if prompted). Click the button **My Info**. A dialog displays information on the rule. -Close the dialog and cancel the editing session. Click **main** in the breadcrumbs. +Close the dialog and cancel the editing session to go back to the **Decision Artifacts** tab. -Click the **Decision Artifacts** tab and make sure that the operations are displayed. To display them, click **Types** and select **Operations**. +Make sure that the **Operations** type are displayed. To display them, click **Types** and select **Operations**. -Expand the **Operations** folder under **Loan Validation Scoring** to edit the scoring operation. +Click the **Operations** element under **Loan Validation Scoring** project and edit the **scoring** operation. Click the button **My Operation Info**. A dialog displays information on the operation. -Close the dialog, and cancel the editing session. Click **main** in the breadcrumbs. +Close the dialog, and cancel the editing session to go back to the **Decision Artifacts** tab. -Click the tab **Deployments** and edit the **test deployment configuration**. +Click the **Deployments** tab and edit the **test deployment** configuration. -Click the **Targets** tab and select the **Decision Service Execution server**. Save the test deployment configuration. +Click the **Targets** tab and make sure the **Decision Service Execution** server is well selected. Save the **test deployment** configuration and create a new version. -Click the name of the test deployment configuration. +Click the name of the **test deployment** configuration. -Click the **Custom Deploy** button in the toolbar. A dialog shows the status of the deployment. +Click the **Custom Deploy** button in the toolbar. This will start the deployment and a dialog shows its status: _Deploying..._ to _Report status: COMPLETED_ -Close the dialog and log out of the Business console. - -![Business Console Custom GUI Admin](images/custom_gui_admin.png) +Close the dialog and log out of the Business Console. #### To see the customization for a non-administrative user: -Log in to the Business console by using **Bea** as the username and password. - -Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the main branch. +Log in to the Business Console by using **Bea** as the username and password. -Click the new button **My Button**. A dialog displays some metrics on the decision service. The dialog content is different from the content that is provided for the administrator. +Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the **main** branch. -Close the dialog and then click the new tab **My Tab**. The tab displays the same metrics on the decision service. The tab content is different from the content that is provided for the administrator. +Click the new button **My Button**. A dialog displays some metrics on the decision service. The dialog content is different from the content that is provided for the an administrator user. -Log out of the Business console. +Close the dialog and then click the new tab **My Tab**. The tab displays the same metrics on the decision service. The tab content is different from the content that is provided for an administrator user. ![Business Console Custom GUI](images/custom_gui.png) + +Log out of the Business Console. + + From bd9d729dc306a44c5c2f8f892bf18346c3487c33 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:49:47 +0200 Subject: [PATCH 08/10] Update README-KUBERNETES.md --- decisioncenter/guicustomization/README-KUBERNETES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/decisioncenter/guicustomization/README-KUBERNETES.md b/decisioncenter/guicustomization/README-KUBERNETES.md index 2909ca9..a48ffa5 100644 --- a/decisioncenter/guicustomization/README-KUBERNETES.md +++ b/decisioncenter/guicustomization/README-KUBERNETES.md @@ -154,4 +154,8 @@ Close the dialog and then click the new tab **My Tab**. The tab displays the sam Log out of the Business Console. +### Stopping the sample +```bash +helm uninstall guicustomization-sample +``` From 896f156c383d240ece20935c4c30bf304fb13ff3 Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:55:34 +0200 Subject: [PATCH 09/10] Update README-KUBERNETES.md for 9.5 --- decisioncenter/guicustomization/README-KUBERNETES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decisioncenter/guicustomization/README-KUBERNETES.md b/decisioncenter/guicustomization/README-KUBERNETES.md index a48ffa5..2bf43e9 100644 --- a/decisioncenter/guicustomization/README-KUBERNETES.md +++ b/decisioncenter/guicustomization/README-KUBERNETES.md @@ -59,7 +59,7 @@ helm search repo ibm-odm-prod ``` ```bash NAME CHART VERSION APP VERSION DESCRIPTION -ibm-helm/ibm-odm-prod 24.0.0 9.0.0.0 IBM Operational Decision Manager +ibm-helm/ibm-odm-prod 25.0.0 9.5.0.0 IBM Operational Decision Manager ``` #### e. Create a secret to manage custom authentication/authorization From e6ef59a599ec3772339e1f24d60db5a1be5a2f1e Mon Sep 17 00:00:00 2001 From: Barbara Ressel <72749604+barbara-ressel@users.noreply.github.com> Date: Mon, 28 Apr 2025 17:12:55 +0200 Subject: [PATCH 10/10] Fix --- decisioncenter/guicustomization/README-KUBERNETES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decisioncenter/guicustomization/README-KUBERNETES.md b/decisioncenter/guicustomization/README-KUBERNETES.md index 2bf43e9..553ded2 100644 --- a/decisioncenter/guicustomization/README-KUBERNETES.md +++ b/decisioncenter/guicustomization/README-KUBERNETES.md @@ -98,7 +98,7 @@ helm install guicustomization-sample ibm-helm/ibm-odm-prod -f values.yaml Open the **Library** tab. Import the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service. -To activate the Custom Value Editor, after login in Decision Center: +To activate the GUI customization: - Go in the menu **Administration>Settings>Custom Settings** - Register a new setting named **decisioncenter.web.core.extensions.entrypoints** keeping blank the **default value of the setting** field.