From 879aec07e5b095bed1c9dc7f98fa30cff862eb9e Mon Sep 17 00:00:00 2001 From: laurent grateau Date: Tue, 14 Apr 2026 15:28:16 +0200 Subject: [PATCH] Review Dynamic domain sample --- decisioncenter/dynamicdomain/README-DOCKER.md | 4 +-- .../dynamicdomain/README-KUBERNETES.md | 6 ++-- decisioncenter/dynamicdomain/README.md | 12 +++---- .../DynamicDomain.launch | 33 +++++++++++++++++++ .../META-INF/MANIFEST.MF | 2 +- .../compose.yaml | 4 +-- 6 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/DynamicDomain.launch diff --git a/decisioncenter/dynamicdomain/README-DOCKER.md b/decisioncenter/dynamicdomain/README-DOCKER.md index 0f614d5..6c4a040 100644 --- a/decisioncenter/dynamicdomain/README-DOCKER.md +++ b/decisioncenter/dynamicdomain/README-DOCKER.md @@ -35,7 +35,7 @@ To set up the ODM container with dynamic domain support: 1. Start the ODM container: ```bash - docker-compose up odm-dynamic-domain & + docker-compose up -d odm-dynamic-domain ``` > **Explanation**: This command initializes the ODM environment required for the sample. @@ -75,7 +75,7 @@ To set up and populate the dynamic domains database: - leave `default value` empty. Save the setting. 1. Set the value of this new custom setting to `ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider`. 1. Navigate to the **Library** tab. -1. Import the rule project archive `dynamicdomain/projects/bomdomainpopulate-rules.zip`. +1. Import the rule project archive [dynamicdomain/projects/bomdomainpopulate-rules.zip](projects/bomdomainpopulate-rules.zip). > Note: this rule project `bomdomainpopulate-rules` is only aimed at editing rules to demonstrate loading domains from a database. It is missing a deployment configuration and cannot be executed. 1. Once the archive is imported, the **bomdomainpopulate-rules** decision service will be displayed. Click the **main** branch to access to the decision artifacts. 1. Display the rule `CheckOrder > OrderType`. An error **Value (string) 'CompanyX' is incorrect** is displayed. Edit the rule and either remove **"CompanyX"** and press SPACE or double-click **"CompanyX"**. A list of suitable companies gets displayed in a drop-down. `CompanyX` is not one of these companies. Close down the rule **without** saving. diff --git a/decisioncenter/dynamicdomain/README-KUBERNETES.md b/decisioncenter/dynamicdomain/README-KUBERNETES.md index 72585ee..1f2299d 100644 --- a/decisioncenter/dynamicdomain/README-KUBERNETES.md +++ b/decisioncenter/dynamicdomain/README-KUBERNETES.md @@ -92,7 +92,7 @@ helm search repo ibm-odm-prod ``` ```bash NAME CHART VERSION APP VERSION DESCRIPTION -ibm-helm/ibm-odm-prod 25.1.0 9.5.0.1 IBM Operational Decision Manager License By in... +ibm-helm/ibm-odm-prod 26.0.0 9.6.0.0 IBM Operational Decision Manager License By in... ``` Create a file named `values.yaml`. This file will be used by the `helm install` command to specify the configuration parameters. @@ -112,7 +112,7 @@ internalDatabase: enabled: false useDynamicProvisioning: false populateSampleData: true - runAsUser: '' + runAsUser: '' # Specific to OCP ``` Add all the other parameters suitable to your platform in `values.yaml`. Check this [link](https://github.com/DecisionsDev/odm-docker-kubernetes/tree/master/platform) for help. @@ -145,7 +145,7 @@ The class that implements the customization must be declared: ### 4.2 Using a JVM parameter -Follow instructions as described [here](https://www.ibm.com/docs/en/odm/9.5.0?topic=kubernetes-persisting-decision-center-ruleset-cache) to create a Config Map with the additional JVM parameter below: +Follow instructions as described [here](https://www.ibm.com/docs/en/odm/9.6.0?topic=kubernetes-persisting-decision-center-ruleset-cache) to create a Config Map with the additional JVM parameter below: ``` -Dilog.rules.teamserver.derbyDataBaseDomainProvider=ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider ``` diff --git a/decisioncenter/dynamicdomain/README.md b/decisioncenter/dynamicdomain/README.md index c3e3424..11aa98d 100644 --- a/decisioncenter/dynamicdomain/README.md +++ b/decisioncenter/dynamicdomain/README.md @@ -10,7 +10,7 @@ Off-the-shelf, ODM only enables to store the values of a dynamic domain in an Ex This sample demonstrates how to store the values of a dynamic domain in a database. -This sample was adapted from the [Data sources for BOM domains](https://www.ibm.com/docs/en/odm/9.5.0?topic=extensions-data-sources-bom-domains) sample for (on-premise) Rule Designer. +This sample was adapted from the [Data sources for BOM domains](https://www.ibm.com/docs/en/odm/9.6.0?topic=extensions-data-sources-bom-domains) sample for (on-premise) Rule Designer. This sample runs both in Rule Designer and in Decision Center. In this sample, you will : @@ -31,8 +31,8 @@ To use the sample in Rule Designer, you need to build an Eclipse plugin. - Select the folder `decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate` - Tick the project `ilog.rules.studio.samples.bomdomainpopulate` and click **Finish** - Right-click the `build-bomdomainepopulate.xml` file and click **Run as > Ant Build**. A file named `bomdomainpopulate.jar` gets generated at the root of the project. -- Right-click on the project and click **Export > Plug-in Development > Deployable Plug-ins and fragments** to build the plugin. Click **Next**, enter `/dropins` as the destination directory (where `` should be replaced by the HOME directory of the running Eclipse), and click **Finish**. -- Restart Eclipse. +- Right-click the `DynamicDomain.launch` file and click **Run as > DynamicDomain**. +- A new Rule Designer will be displayed. >Note: if you modify the plugin and deploy it again, start Eclipse with the `-clean` parameter to force a cache update. @@ -43,7 +43,7 @@ To use the sample in Rule Designer, you need to build an Eclipse plugin. - bomdomainpopulate-rules - bomdomainpopulate-xom -- Follow the [instructions from the documentation](https://www.ibm.com/docs/en/odm/9.5.0?topic=domains-data-sources-bom-sample-details) to try out how the sample works in Rule Designer. +- Follow the [instructions from the documentation](https://www.ibm.com/docs/en/odm/9.6.0?topic=domains-data-sources-bom-sample-details) to try out how the sample works in Rule Designer. ## 2. Running the sample in Decision Center @@ -55,7 +55,7 @@ Ensure you have at least Docker 27.x (and optionally Kubernetes 1.28+). If you deploy ODM on Docker, there is nothing to configure. -If you deploy ODM on kubernetes, and for the sole purpose of testing the sample, it is best to use the [PostgreSQL internal database](https://www.ibm.com/docs/en/SSQP76_9.5.0/com.ibm.odm.kube/topics/con_internal_db.html) to store the dynamic domain data (along with Decision Center data). +If you deploy ODM on kubernetes, and for the sole purpose of testing the sample, it is best to use the [PostgreSQL internal database](https://www.ibm.com/docs/en/SSQP76_9.6.0/com.ibm.odm.kube/topics/con_internal_db.html) to store the dynamic domain data (along with Decision Center data). In that case, and provided ODM is deployed in a Helm Release named `myodmsample`, you do not need to modify [database.properties](src/ilog.rules.studio.samples.bomdomainpopulate/src/main/resources/data/database.properties). Edit that file otherwise. @@ -79,7 +79,7 @@ To use the sample in Decision Center, you need to build a JAR file that depends Start the ODM for Developer Docker image to quickly access the necessary libraries: ```bash - docker-compose up odm & + docker-compose up -d odm ``` 3. **Download the Decision Center Client API** diff --git a/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/DynamicDomain.launch b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/DynamicDomain.launch new file mode 100644 index 0000000..81f1f2b --- /dev/null +++ b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/DynamicDomain.launch @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/META-INF/MANIFEST.MF b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/META-INF/MANIFEST.MF index 2c914c7..906cdee 100644 --- a/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/META-INF/MANIFEST.MF +++ b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/META-INF/MANIFEST.MF @@ -16,7 +16,7 @@ Export-Package: ilog.rules.studio.samples.bomdomainpopulate,ilog.rules.s tudio.samples.bomdomainpopulate.actions,ilog.rules.studio.samples.bomdo mainpopulate.stock,org.apache.derby.iapi.services.info,org.apache.derby .info,org.apache.derby.jdbc -Bundle-Version: 9.5.0.0 +Bundle-Version: 9.6.0.0 Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-21 Automatic-Module-Name: ilog.rules.studio.samples.bomdomainpopulate diff --git a/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/compose.yaml b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/compose.yaml index b6d4c5d..56854a6 100644 --- a/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/compose.yaml +++ b/decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate/compose.yaml @@ -1,6 +1,6 @@ services: odm: - image: icr.io/cpopen/odm-k8s/odm:9.5 + image: icr.io/cpopen/odm-k8s/odm:9.6 mem_limit: 4G memswap_limit: 4G user: "1001:0" @@ -12,7 +12,7 @@ services: - 9453:9453 odm-dynamic-domain: - image: icr.io/cpopen/odm-k8s/odm:9.5 + image: icr.io/cpopen/odm-k8s/odm:9.6 mem_limit: 4G memswap_limit: 4G user: "1001:0"