Skip to content

Commit 44984c1

Browse files
authored
Merge pull request #12 from DecisionsDev/gui-custo-review
DBACLD-160992 [ODM K8S] Validate Instructions for GUI Customization Sample
2 parents ab16873 + e6ef59a commit 44984c1

File tree

6 files changed

+70
-65
lines changed

6 files changed

+70
-65
lines changed

decisioncenter/guicustomization/README-DOCKER.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
This readme explains how to run the GUI Customization sample in Docker.
55

6-
Doing so, you do not need to have ODM installed. Instead we are relying on the 'ODM for developer' container image.
6+
Doing so, you do not need to have ODM installed. Instead we are relying on the 'ODM for Developer' container image.
77

88
Before following the steps below, make sure you have built the images as explained in [README.md](README.md).
99

@@ -14,20 +14,20 @@ Before following the steps below, make sure you have built the images as explain
1414
cd decisioncenter/guicustomization/guicustomization-source
1515
```
1616
17-
Run ODM and Notifiers docker images
17+
Run ODM docker images containing GUI customization:
1818
```bash
1919
docker-compose -f compose-odm-dev.yml up odm-with-gui-customization &
2020
```
2121

22-
### Using the Sample
22+
### Using the sample
2323

2424
**Log in** to the Business Console at [http://localhost:9060/decisioncenter](http://localhost:9060/decisioncenter) using the credentials:
2525
- **Username**: `Paul`
2626
- **Password**: `Paul`
2727

28-
Load the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service.
28+
Open the **Library** tab. Import the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service.
2929

30-
To activate the Custom Value Editor, after login in Decision Center :
30+
To activate the GUI customization:
3131
- Go in the menu **Administration>Settings>Custom Settings**
3232
- Register a new setting named **decisioncenter.web.core.extensions.entrypoints** keeping blank the **default value of the setting** field.
3333

@@ -43,51 +43,51 @@ Log in to the Business console by using **Paul** as the username and password.
4343

4444
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and select the **main** branch.
4545

46-
Click the new button **My Admin Button**. A dialog displays metrics on the decision service.
46+
Click the new button **My Admin Button** in the main toolbar. A dialog displays metrics on the decision service. Close the dialog.
4747

4848
Click the new tab **My Admin Tab**. The tab displays the same metrics on the decision service.
4949

50-
Click the **Decision Artifacts** tab. Expand the **Loan Validation Scoring computation** package, and edit the rule **neverBankruptcy** (accept any default settings if prompted).
50+
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).
5151

5252
Click the button **My Info**. A dialog displays information on the rule.
5353

54-
Close the dialog and cancel the editing session. Click **main** in the breadcrumbs.
54+
Close the dialog and cancel the editing session to go back to the **Decision Artifacts** tab.
5555

56-
Click the **Decision Artifacts** tab and make sure that the operations are displayed. To display them, click **Types** and select **Operations**.
56+
Make sure that the **Operations** type are displayed. To display them, click **Types** and select **Operations**.
5757

58-
Expand the **Operations** folder under **Loan Validation Scoring** to edit the scoring operation.
58+
Click the **Operations** element under **Loan Validation Scoring** project and edit the **scoring** operation.
5959

6060
Click the button **My Operation Info**. A dialog displays information on the operation.
6161

62-
Close the dialog, and cancel the editing session. Click **main** in the breadcrumbs.
62+
Close the dialog, and cancel the editing session to go back to the **Decision Artifacts** tab.
6363

64-
Click the tab **Deployments** and edit the **test deployment configuration**.
64+
Click the **Deployments** tab and edit the **test deployment** configuration.
6565

66-
Click the **Targets** tab and select the **Decision Service Execution server**. Save the test deployment configuration.
66+
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.
6767

68-
Click the name of the test deployment configuration.
68+
Click the name of the **test deployment** configuration.
6969

70-
Click the **Custom Deploy** button in the toolbar. A dialog shows the status of the deployment.
70+
Click the **Custom Deploy** button in the toolbar. This will start the deployment and a dialog shows its status: _Deploying..._ to _Report status: COMPLETED_
7171

72-
Close the dialog and log out of the Business console.
72+
Close the dialog and log out of the Business Console.
7373

7474
![Business Console Custom GUI Admin](images/custom_gui_admin.png)
7575

7676
#### To see the customization for a non-administrative user:
7777

78-
Log in to the Business console by using **Bea** as the username and password.
78+
Log in to the Business Console by using **Bea** as the username and password.
7979

80-
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the main branch.
80+
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the **main** branch.
8181

82-
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.
82+
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.
8383

84-
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.
84+
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.
8585

86-
Log out of the Business console.
86+
Log out of the Business Console.
8787

8888
![Business Console Custom GUI](images/custom_gui.png)
8989

90-
### Stopping the Sample
90+
### Stopping the sample
9191

9292
```bash
9393
docker-compose -f compose-odm-dev.yml down

decisioncenter/guicustomization/README-KUBERNETES.md

+36-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
This README explains how to run the GUI Customization sample in Kubernetes.
3+
This readme explains how to run the GUI Customization sample in Kubernetes.
44
Before following the steps below, make sure you have built the images as explained in [README.md](README.md).
55

66
# Configuring the sample in Kubernetes
@@ -9,9 +9,9 @@ Before following the steps below, make sure you have built the images as explain
99

1010
Any file server reachable by Decision Center is suitable.
1111

12-
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.
12+
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.
1313

14-
Upload the **guicustomization-1.0.jar** file on the file server :
14+
Upload the **guicustomization-1.0.jar** file on the file server:
1515
```
1616
curl -T guicustomization/guicustomization-source/target/guicustomization-1.0.jar $FILESERVER_URL
1717
```
@@ -55,14 +55,16 @@ helm repo update
5555
#### d. Check your access to the ODM chart
5656

5757
```bash
58-
$ helm search repo ibm-odm-prod
58+
helm search repo ibm-odm-prod
59+
```
60+
```bash
5961
NAME CHART VERSION APP VERSION DESCRIPTION
60-
ibm-helm/ibm-odm-prod 24.0.0 9.0.0.0 IBM Operational Decision Manager
62+
ibm-helm/ibm-odm-prod 25.0.0 9.5.0.0 IBM Operational Decision Manager
6163
```
6264

6365
#### e. Create a secret to manage custom authentication/authorization
6466

65-
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 :
67+
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:
6668

6769
```
6870
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
8587
If you are on OCP, you can use this [values.yaml](./guicustomization-source/values.yaml) file by replacing `<FILESERVER_URL>` by the actual URL of the file server hosting the JARs.
8688

8789
```bash
88-
helm install guicustomization-sample ibmcharts/ibm-odm-prod -f values.yaml
90+
helm install guicustomization-sample ibm-helm/ibm-odm-prod -f values.yaml
8991
```
9092

9193
# Using the Sample
@@ -94,9 +96,9 @@ helm install guicustomization-sample ibmcharts/ibm-odm-prod -f values.yaml
9496
- **Username**: `Paul`
9597
- **Password**: `Paul`
9698

97-
Load the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service.
99+
Open the **Library** tab. Import the [LoanValidationService.zip](./projects/LoanValidationService.zip) Decision Service.
98100

99-
To activate the Custom Value Editor, after login in Decision Center :
101+
To activate the GUI customization:
100102
- Go in the menu **Administration>Settings>Custom Settings**
101103
- Register a new setting named **decisioncenter.web.core.extensions.entrypoints** keeping blank the **default value of the setting** field.
102104

@@ -106,52 +108,54 @@ To activate the Custom Value Editor, after login in Decision Center :
106108

107109
![Custom Settings](images/custom_settings_2.png)
108110

109-
#### To see the customization for an administrator:
110-
111-
Log in to the Business console by using **Paul** as the username and password.
112-
113111
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and select the **main** branch.
114112

115-
Click the new button **My Admin Button**. A dialog displays metrics on the decision service.
113+
Click the new button **My Admin Button** in the main toolbar. A dialog displays metrics on the decision service. Close the dialog.
116114

117115
Click the new tab **My Admin Tab**. The tab displays the same metrics on the decision service.
118116

119-
Click the **Decision Artifacts** tab. Expand the **Loan Validation Scoring>computation** package, and edit the rule **neverBankruptcy** (accept any default settings if prompted).
117+
![Business Console Custom GUI Admin](images/custom_gui_admin.png)
118+
119+
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).
120120

121121
Click the button **My Info**. A dialog displays information on the rule.
122122

123-
Close the dialog and cancel the editing session. Click **main** in the breadcrumbs.
123+
Close the dialog and cancel the editing session to go back to the **Decision Artifacts** tab.
124124

125-
Click the **Decision Artifacts** tab and make sure that the operations are displayed. To display them, click **Types** and select **Operations**.
125+
Make sure that the **Operations** type are displayed. To display them, click **Types** and select **Operations**.
126126

127-
Expand the **Operations** folder under **Loan Validation Scoring** to edit the scoring operation.
127+
Click the **Operations** element under **Loan Validation Scoring** project and edit the **scoring** operation.
128128

129129
Click the button **My Operation Info**. A dialog displays information on the operation.
130130

131-
Close the dialog, and cancel the editing session. Click **main** in the breadcrumbs.
132-
133-
Click the tab **Deployments** and edit the **test deployment configuration**.
131+
Close the dialog, and cancel the editing session to go back to the **Decision Artifacts** tab.
134132

135-
Click the **Targets** tab and select the **Decision Service Execution server**. Save the test deployment configuration.
133+
Click the **Deployments** tab and edit the **test deployment** configuration.
136134

137-
Click the name of the test deployment configuration.
135+
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.
138136

139-
Click the **Custom Deploy** button in the toolbar. A dialog shows the status of the deployment.
137+
Click the name of the **test deployment** configuration.
140138

141-
Close the dialog and log out of the Business console.
139+
Click the **Custom Deploy** button in the toolbar. This will start the deployment and a dialog shows its status: _Deploying..._ to _Report status: COMPLETED_
142140

143-
![Business Console Custom GUI Admin](images/custom_gui_admin.png)
141+
Close the dialog and log out of the Business Console.
144142

145143
#### To see the customization for a non-administrative user:
146144

147-
Log in to the Business console by using **Bea** as the username and password.
148-
149-
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the main branch.
145+
Log in to the Business Console by using **Bea** as the username and password.
150146

151-
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.
147+
Open the **Library** tab. Click the **Loan Validation Service** box anywhere but the name, and then select the **main** branch.
152148

153-
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.
149+
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.
154150

155-
Log out of the Business console.
151+
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.
156152

157153
![Business Console Custom GUI](images/custom_gui.png)
154+
155+
Log out of the Business Console.
156+
157+
### Stopping the sample
158+
159+
```bash
160+
helm uninstall guicustomization-sample
161+
```

decisioncenter/guicustomization/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Introduction
44

5-
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.
5+
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.
66

77
## Running this sample in Decision Center
88

99
### 1) Prerequisites
1010

11-
Before you begin, ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.25+).
11+
Before you begin, ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.28+).
1212

1313
### 2) Building the Decision Center extension JAR
1414

@@ -31,7 +31,7 @@ To use the sample in Decision Center, you need to build a JAR.
3131
wget http://localhost:9060/decisioncenter/assets/decision-center-client-api.zip
3232
```
3333
34-
Then, unzip decision-center-client-api.zip on the **lib** directory :
34+
Then, unzip decision-center-client-api.zip to the **lib** directory :
3535
```
3636
unzip decision-center-client-api.zip -d "lib"
3737
```
@@ -43,15 +43,15 @@ To use the sample in Decision Center, you need to build a JAR.
4343
4444
2. Build the JAR
4545
46-
The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 17.
46+
The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 21, compatible for ODM 9.5.
4747
4848
Run the command below in the **decisioncenter/guicustomization/guicustomization-source** directory:
4949
5050
```bash
5151
docker run --rm \
5252
-v "$(pwd)":/usr/src/sample \
5353
-w /usr/src/sample \
54-
maven:3.8.5-openjdk-17 \
54+
maven:3.9.9-ibm-semeru-21-jammy \
5555
mvn clean install
5656
```
5757

decisioncenter/guicustomization/guicustomization-source/compose-odm-dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
odm:
3-
image: icr.io/cpopen/odm-k8s/odm:9.0.0
3+
image: icr.io/cpopen/odm-k8s/odm:9.5
44
mem_limit: 4G
55
memswap_limit: 4G
66
user: "1001:0"
@@ -12,7 +12,7 @@ services:
1212
- 9453:9453
1313

1414
odm-with-gui-customization:
15-
image: icr.io/cpopen/odm-k8s/odm:9.0.0
15+
image: icr.io/cpopen/odm-k8s/odm:9.5
1616
mem_limit: 4G
1717
memswap_limit: 4G
1818
user: "1001:0"

decisioncenter/guicustomization/guicustomization-source/pom.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
<goal>run</goal>
2222
</goals>
2323
<configuration>
24-
<tasks>
25-
<javac srcdir="${project.build.sourceDirectory}"
24+
<target>
25+
<javac srcdir="${project.build.sourceDirectory}"
2626
destdir="${project.build.outputDirectory}"
2727
includeantruntime="false"
2828
compiler="modern">
2929
<classpath>
3030
<fileset dir="${project.basedir}/lib" includes="**/*.jar"/>
3131
</classpath>
3232
</javac>
33-
</tasks>
33+
</target>
3434
</configuration>
3535
</execution>
3636
</executions>
@@ -39,6 +39,7 @@
3939
<plugin>
4040
<groupId>org.apache.maven.plugins</groupId>
4141
<artifactId>maven-compiler-plugin</artifactId>
42+
<version>3.14.0</version>
4243
<executions>
4344
<execution>
4445
<id>default-compile</id>

decisioncenter/guicustomization/guicustomization-source/src/main/java/com/ibm/rules/decisioncenter/web/ext/ExtUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
package com.ibm.rules.decisioncenter.web.ext;
1111

12-
import javax.servlet.http.HttpServletRequest;
12+
import jakarta.servlet.http.HttpServletRequest;
1313

1414
import org.springframework.web.context.request.RequestContextHolder;
1515
import org.springframework.web.context.request.ServletRequestAttributes;

0 commit comments

Comments
 (0)