### Record Response File on Windows Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=workstations-creating-editing-response-files Use this command to start Installation Manager in record mode on Windows to create a response file. The -skipInstall parameter prevents immediate installation. ```shell IBMIM.exe -record \path\to\ -skipInstall \path\to\ ``` -------------------------------- ### Record Response File on Linux/macOS Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=workstations-creating-editing-response-files Use this command to start Installation Manager in record mode on Linux or macOS to create a response file. The -skipInstall parameter prevents immediate installation. ```shell ./IBMIM -record /path/to/ -skipInstall /path/to/ ``` -------------------------------- ### Example Helm Chart Values for ODM Production Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=kubernetes-persisting-decision-center-ruleset-cache An example 'my-values.yaml' file demonstrating how to configure the 'customlibPvc' and 'jvmOptionsRef' parameters for an ODM production installation using Helm. ```yaml license: true image: repository: cp.icr.io/cp/cp4a/odm pullSecrets: - ibm-entitlement-key usersPassword: my-password internalDatabase: persistence: enabled: false # Setting PVC and JVM options configmap parameters decisionCenter: customlibPvc: my-custom-dc-libs-pvc jvmOptionsRef: my-dc-jvm-options-configmap ``` -------------------------------- ### Example Ant Setup for TCP/IP Management Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=cdbmc-configuring-rule-execution-server-console-ear-tcpip-management This example demonstrates configuring a Rule Execution Server console EAR for TCP/IP connection mode using the Ant setup task. It specifies the input and output EAR files and sets the management protocol to 'tcpip' with the management server running on port 1885. ```xml ``` -------------------------------- ### Start ApacheDS Server Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=registries-task-1-preparing-ldap-environment Run this command from the ApacheDS installation directory to start the LDAP server. Wait for 'ApacheDS' to be displayed in the console. ```shell /bin/apacheds.bat ``` -------------------------------- ### Example URI with Specific Ruleset and Options Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=service-endpoint-uris An example demonstrating how to construct a URI with a specific ruleset path and the 'zip' option enabled. ```text http://localhost:9080/DecisionService/rest/v1/miniloanruleapp/1.0/miniloanrules/1.0/wadl?zip=true ``` -------------------------------- ### CASE file structure example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=installation-setting-environment-variables-downloading-case-files This example shows the directory structure created after downloading CASE files for a specific version. ```bash $ tree ~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION /root/.ibm-pak/data/cases/ibm-odm-prod/2.1.0 ├── caseDependencyMapping.csv ├── charts │   └── ibm-odm-prod-25.1.0.tgz ├── component-set-config.yaml ├── ibm-odm-prod-2.1.0-airgap-metadata.yaml ├── ibm-odm-prod-2.1.0-charts.csv ├── ibm-odm-prod-2.1.0-images.csv ├── ibm-odm-prod-2.1.0.tgz └── resourceIndexes └── ibm-odm-prod-resourcesIndex.yaml ``` -------------------------------- ### Install Installation Manager on Linux Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=installing-software-requirements Use this command to install Installation Manager on Linux by extracting its .tar file and installing the 64-bit version from disk 1 or 2. ```bash $cd/disk1/IM $unzip agent.installer.linux.gtk.x86_64_1.8.9003.20190204_1751.zip >> /dev/null 2>&1 $ ./installc "-acceptLicense" ``` -------------------------------- ### Start the log notification server Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=notification-setting-up-webhook-sample Execute this command to start the Node.js server for the log notifier. ```bash node log-notifier.js ``` -------------------------------- ### Install ODM Instance with Helm Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=access-configuring-user-openid Install an ODM instance using Helm, applying the configurations specified in the values.yaml file. ```bash helm install release_name -f values.yaml ibm-helm/ibm-odm-prod ``` -------------------------------- ### Install Node.js dependencies for Slack notifier Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=notification-setting-up-webhook-sample Run this command in the Slack notifier sample directory to install necessary Node.js packages. ```bash npm install ``` -------------------------------- ### Sample Server Startup Output Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=server-starting-sample This output indicates that the sample server has successfully started. It includes a confirmation message and build details. ```text [samples.echo] GBRPS0029I: start.server is completed. BUILD SUCCESSFUL Total time: 1 minutes 24 seconds Press any key to continue . . . ``` -------------------------------- ### Sample Installation Output Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=execution-setting-up-ruleset-sample This output indicates the successful completion of the sample installation tasks, including RuleApp generation, deployment, and web application build. ```text Completed: install Executing: all Completed: all BUILD SUCCESSFUL ``` -------------------------------- ### Example Configuration for HelloWorld Project Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=line-writing-configuration-file This example configuration file is used to build the HelloWorld project, specifying the project path, output directory, deployment configuration, and XOM classpath. ```properties project = ../HelloWorld/Hello Main Service/ output = ../HelloWorld/output dep = simple dep xom-classpath = XOM jars/hello-xom-1.0.0.jar ``` -------------------------------- ### Sample Server Startup Message (Windows) Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=rules-starting-miniloan-web-application This message indicates that the sample server has successfully started on a Windows system. It confirms the completion of the server startup process. ```text [samples.echo] GBRPS0029I: start.server is completed. BUILD SUCCESSFUL Total time: 1 minute 0 seconds Press any key to continue . . . ``` -------------------------------- ### Custom values YAML for ODM installation Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=950-reference Example of a custom YAML file specifying internal database configuration for an ODM Helm chart installation. This includes database name and secret credentials. ```yaml internalDatabase: databaseName: my-db secretCredentials: my-secret ``` -------------------------------- ### Example Pod Disruption Budget Status Output Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=production-configuring-pod-disruption-budget-odm-deployments This is an example of the output you might see after running `kubectl get pdb`. It displays the minimum available pods, maximum unavailable pods, allowed disruptions, and age for each PDB. ```text NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE odm95-pdb-dc 2 N/A 1 3m25s odm95-pdb-dr 50% N/A 1 3m25s odm95-pdb-dsr N/A 1 1 3m25s ``` -------------------------------- ### Sample Server Console Output Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=execution-setting-up-simple-sample This message indicates that the rulesession application is ready and the installation process has been successfully completed. ```text Rulesession application ready. Completed: install BUILD SUCCESSFUL ``` -------------------------------- ### Ruleflow with goto for Loop and Exit Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=keywords-goto This example demonstrates implementing a game loop using 'goto start' and conditional exits using 'goto end'. Labels 'start' and 'end' define the loop's beginning and exit points. ```java flowtask main { body = { start: if (turn == Constants.Player1) ChooseMovePlayer1; else ChooseMovePlayer2; CheckMove; if (ending) goto end; UpdateDistance; ExpandObjects; DetectConnect4; if (ending) goto end; DetectGridFull; if (ending) goto end; ChangeTurn; goto start; end: EndOfGame; } }; ``` -------------------------------- ### JGroups Cluster Initialization - Coordinator Node Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=database-optional-enabling-distributed-caching-decision-center This log message signifies that a Decision Center node has started and, after failing to discover any existing cluster members, has initialized itself as the coordinator for a new JGroups cluster. This typically occurs when it's the first node to start in a distributed cache setup. ```log Mar 23, 2024 11:19:34 PM org.jgroups.logging.Slf4jLogImpl info INFO: -30867: no members discovered after 2002 ms: creating cluster as coordinator. ``` -------------------------------- ### Configure Decision Server Home Directory Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=designer-adding-rule-existing-eclipse Add the IBM_DS_HOME property to the Eclipse config.ini file to define the Decision Server installation directory. This is required before starting Eclipse. ```ini IBM_DS_HOME=/ODM950 ``` -------------------------------- ### List Root Directory and View Configuration Files Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=950-troubleshooting Use these shell commands to list the root directory and view important configuration files like server.xml and datasource.xml. Also, check system process information. ```bash bash-4.4$ ls bash-4.4$ cat /config/server.xml bash-4.4$ cat /config/datasource.xml bash-4.4$ cat /proc/mounts bash-4.4$ cat /proc/1/maps ``` -------------------------------- ### Filtering RuleApps by Name using Regular Expression Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=api-http-header-fields-uri-parameters Use the 'fieldName' parameter with 'exp()' to filter collection members by a regular expression. This example retrieves RuleApps whose names start with 'Hello.'. ```http http://localhost:9080/res/apiauth/ruleapps?name=exp(Hello.*) ``` -------------------------------- ### Complete Java SE XU Configuration Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=se-xu-configuration-properties-java This is a complete code sample demonstrating the configuration of a Java SE XU with a file-based ruleset repository. ```Java IlrSessionFactoryConfig config = IlrJ2SESessionFactory.createDefaultConfig(); config.getXUConfig().getPersistenceConfig().setPersistenceType(IlrPersistenceType.FILE); config.getXUConfig().getPersistenceConfig().getFilePersistenceConfig().setDirectory(new File("C:/my_ruleset_repo")); IlrJ2SESessionFactory factory = new IlrJ2SESessionFactory(config); ``` -------------------------------- ### Example Query Parameter for GetRuleAppArchive Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=reference-rest-api-getruleapparchive-query-parameter-options This example demonstrates how to use the 'q' parameter with multiple options to select specific rulesets for archiving. It includes filtering by name, version, creation date, and status. ```text q=name:rulesetA,version:hightest,creationDate:after 2017-06-10,ruleset.status:enabled;name:rulesetB,version:2.0 ``` -------------------------------- ### Get Decision Engine Version Information Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=reference-decision-engine-versions Use this command to retrieve detailed version information for the components in your Operational Decision Manager installation. Ensure that 'jrules-engine.jar' is in your current directory or provide the correct path. ```bash java -cp .\jrules-engine.jar ilog.rules.tools.IlrVersionFullInfo -v ``` -------------------------------- ### Flowtask Definition Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=keywords-flowtask This snippet defines a flow task named 'main' for a Connect4 game. It includes initial actions for game setup, a body with a game loop, and final actions for game reset. ```keywords flowtask main { initialaction = { turn = Constants.Player2; saved = new SavedGame(grid); for (var i = 0; i < 7; i++) for (var j = 0; j < 6; j++) insert(grid.array[i][j]); }; finalaction = { grid = null; move = null; winner = Constants.None; connect4 = null; ending = false; message = null; }; body = { while(!ending) { if (turn == Constants.Player1) ChooseMovePlayer1; else ChooseMovePlayer2; CheckMove; if (ending) break; UpdateDistance; ExpandObjects; DetectConnect4; if (ending) break; DetectGridFull; if (ending) break; ChangeTurn; } EndOfGame; } }; ``` -------------------------------- ### Example Import Declarations Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=keywords-import Demonstrates how to declare imports for specific utility classes and a custom user class. ```java import java.util.*; import userPackage.UserClass; ``` -------------------------------- ### SCIM Connection Configuration XML Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=center-configuring-decision-configuration-file This XML file defines the SCIM connection details, including the server URL, authentication credentials, and attributes for group and user identification. Ensure the properties accurately reflect your SCIM server setup. ```xml http://localhost:8088/scim admin secret displayName%20co%20%22music%22 displayName userName userName emails.value IsScim true ``` -------------------------------- ### Recreate Sample Server Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=server-restoring-sample Use this command to restore the sample server to its initial state. This action will delete the existing profile and databases. ```shell ant recreateserver ``` -------------------------------- ### Configuring ODM Helm Chart for Node Placement Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=cop-scheduling-operational-decision-manager-pods-onto-tainted-nodes Define tolerations and nodeAffinity in your custom Helm values file (e.g., my-values.yaml) to guide pod scheduling. This example places the Decision Server Runtime on 'worker2' and other ODM pods on 'worker1'. ```yaml license: true image: repository: cp.icr.io/cp/cp4a/odm pullSecrets: - ibm-entitlement-key usersPassword: my-password internalDatabase: secretCredentials: my-odm-db-secret # Setting tolerations and nodeAffinity parameters decisionServerRuntime: enabled: true tolerations: - key: "ds-runtime" operator: "Equal" value: "node2" effect: "NoExecute" nodeAffinity: - key: "ds-runtime" operator: In values: - node2 customization: tolerations: - key: "odm" operator: "Exists" effect: "NoSchedule" nodeAffinity: - key: "odm" operator: "Exists" ``` -------------------------------- ### Example deployment configuration argument Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=services-automated-deployment-decision Specify a list of deployment configurations using the ? pattern. This refers to a specific workspace item for deployment. ```shell AutoQuote?Deployment to QA env ``` -------------------------------- ### Deploying Web Authoring Application Sample Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=application-setting-up-web-authoring-sample This output indicates the successful compilation, packaging, and deployment of the web authoring application to the sample server. It also provides the URL to access the deployed application. ```text The application has been deployed. Open your browser and navigate to dcclient Completed: run BUILD SUCCESSFUL ``` -------------------------------- ### Build Project with Configuration File Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=line-building-projects Use this command to build a project by specifying the configuration file. Replace 'Build_Command_Line_executable_archive' with the actual path to your executable and 'configuration_file' with the path to your properties file. ```bash java -jar Build_Command_Line_executable_archive -config configuration_file ``` -------------------------------- ### Verify OpenShift CLI (oc) and kubectl Installation Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=installation-setting-up-host-mirror-images-private-registry Check the installed versions of the `oc` and `kubectl` command-line tools to confirm a successful installation. ```bash oc version kubectl version ``` -------------------------------- ### Install ODM with Decision Center Web Config Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=production-customizing-decision-center Install the IBM ODM production Helm chart, specifying the custom web configmap using the `decisionCenter.webConfigRef` parameter during `helm install`. ```bash helm install release_name --set license=true --set decisionServerRuntime.xuConfigRef=my-odm-xu-configmap ibm-helm/ibm-odm-prod ``` -------------------------------- ### XML Document Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=types-local-complex-mapped-inner-classes An example of an XML document conforming to the borrowed-book schema. ```xml 12345 John Smith ``` -------------------------------- ### Example -serverFile argument for headless deployment Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=services-automated-deployment-decision Use the -serverFile argument to specify a file containing server definitions for import into the workspace. The file format is compatible with exported server definitions. ```shell -serverFile D:\temp\server-list.xml ``` -------------------------------- ### Example: Defining and Using Properties Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=keywords-propertydefinition This example demonstrates defining a hierarchy, predeclaring properties in `propertydefinition`, assigning values in a rule, and accessing them in a function. ```java hierarchy Geography { "North America" { "USA" "Canada" } } propertydefinition { Geography location; java.util.Date effectiveDate; } rule usa { property location = "USA" property effectiveDate = java.util.Date(120000); when { ... } then { ... } } function void displayRuleProperties() { IlrRule[] rules = getRulesetI().getAllRules(); for(int i=0; i ... ``` -------------------------------- ### Sample logging.properties Configuration Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=center-enabling-jdk-logging-in-decision This sample configuration sets up file and console handlers, specifies log levels, and configures log rotation for Decision Center. ```properties handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=INFO java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter java.util.logging.FileHandler.level=FINE java.util.logging.FileHandler.pattern=//.log # Write 10MB before rotating this file java.util.logging.FileHandler.limit =10000000 # Number of rotating files to be used java.util.logging.FileHandler.count=4 java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter # Command framework .level=INFO ilog.rules.teamserver.model.commands.level=FINE # LDAP connection .level=INFO com.ibm.rules.decisioncenter.userregistry.level=FINE # Build and deployment .level=INFO com.ibm.rules.decisioncenter.deployment.level=FINE # Traces on repository .level=INFO ilog.rules.teamserver.transaction.logger.IlrSQLInvocationJDKLogger=all ``` -------------------------------- ### Example Decision Service URI Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=services-calling-decision-service-by-using-rest-api An example of a URI used to access the MiniloanServiceRuleset decision service. ```text http://localhost:9080/DecisionService/rest/v1/ MiniloanService/MiniloanServiceRuleset ``` -------------------------------- ### Sample Server Start Error Message Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=tss-no-wlp-ant-task-can-be-found-error-when-starting-sample-server This error message indicates that the Ant build process cannot locate the necessary WLP Ant tasks, suggesting an incorrect `wlp.home` configuration. ```text [samples.echo] SEVERE: GBRPS0039E: No WLP ant task can be found in [BadLibertyPath]/dev/tools/ant/wlp-anttasks.jar. Check the wlp.home set in [ODMInstall]/shared/samplesServer/wlp/build.properties is correct. BUILD FAILED ``` -------------------------------- ### PL/I Complex Data Type Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=options-pli-data-type-support Example of a PL/I complex data type, which is not supported. ```PL/I 38+27I ``` -------------------------------- ### Full Decision Center Configuration File Declaration Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=center-configuring-decision-configuration-file This example shows the complete declaration for enabling the configuration file feature and specifying its path. ```properties com.ibm.rules.decisioncenter.setup.enable = true com.ibm.rules.decisioncenter.setup.configuration-file = ./conf/decisioncenter-configuration.properties ``` -------------------------------- ### COBOL data items example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=models-domains-zos-data Example COBOL data items that can be used to define domains. ```COBOL 05 country PIC X(2). 05 color PIC 9(12). ``` -------------------------------- ### Rule Example: Not Platinum Customer Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=conditions-queries-semantic-content This is an example of a rule condition excluding a specific customer category. ```rule If the category of the customer is not Platinum then... ``` -------------------------------- ### Access Sample Application URL Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=execution-ruleset-sample-details Open the sample application in your web browser using the provided URL. ```text http://localhost:9090/loan-server ``` -------------------------------- ### Example: Export H2 1.x Database Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=environment-migrating-between-h2-databases An example command demonstrating how to export an H2 1.x database to a specified SQL script file. ```java java -cp h2.jar org.h2.tools.Script -url "jdbc:h2:file:/path/to/your/h2V1/database/resdb" -user dbuser -password dbpassword -script /temporary/location/backup.sq ``` -------------------------------- ### Start the Slack notification server Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=notification-setting-up-webhook-sample Execute this command to start the Node.js server for the Slack notifier. ```bash node slack-notifier.js ``` -------------------------------- ### COBOL Copybook Entry Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=items-custom-types This is an example of a COBOL copybook entry that defines a data item 'approved'. ```cobol 01 Loan. 05 approved PIC 9(2). ``` -------------------------------- ### Heterogeneous Bindings Example Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=mode-deciding-execution Illustrates heterogeneous bindings where rules operate on different classes, requiring RetePlus or Fastpath execution mode. ```plaintext Rule1| ... when{A();B()} ... Rule2| ... when{A()} ... Rule3| ... when{B()} ... ``` -------------------------------- ### Example: Import SQL Script into H2 2.x Source: https://www.ibm.com/docs/en/odm/9.5.0?topic=environment-migrating-between-h2-databases An example command demonstrating how to import an SQL script into an H2 2.x database, including the necessary `NON_KEYWORDS=VALUE` flag. ```java java -cp h2.jar org.h2.tools.RunScript -url "jdbc:h2:file:/path/to/your/h2V2/database/resdb;NON_KEYWORDS=VALUE" -user dbuser -password dbpassword -script /temporary/location/backup.sql ```