Resolving a string issue in tests and simulations
You might encounter this issue when you do tests and simulations. Follow these instructions to resolve it.
Symptoms
In doing tests and simulations, you get the following behavior:- Attributes that have the wrong type in the test report.
- The test report does not display the observed values.
- Warnings are shown in the Decision Runner log file, for
example:
WARNING: There are warnings for scenario <scenario name>: A warning was raised during BOM conversion: CannotFindStaticReferenceCorrespondingTo: Cannot find the static reference corresponding to value '<a string>' when writing <domains.BomClass> element.
Environment
This issue often happens when BOM classes that define domains are mapped to the same execution Java™ class, usually java.lang.String. The problem is that when Java class instances are converted into BOM class instances after execution, all instances of that Java class, including the strings, might then be considered belonging to one of those domains. All the BOM attributes of type String could get wrongly interpreted as being of a domain type in the test report.
Resolving the problem
The solution is to set the custom property dataio.ignore to true
(dataio.ignore = true) on all those domains in the BOM.
Troubleshooting
In general, for troubleshooting tests and simulations, you can enable logging:
- Turn on full trace for the CDI logger by setting
com.ibm.rules.res.cdito all (com.ibm.rules.res.cdi = ALL) on servers where Decision Runner and Decision Center are deployed. For details on how to turn on the CDI logger for each application server: - You can also launch Decision Runner in debug mode by using
mode=DEBUGin the URL, for example:http://<host>:<port>/DecisionRunner/api/mode/change?mode=DEBUGIt creates several files:- RuleApp that is being executed.
- The test suite that is being used.
- The log files that contain the expected and observed values in the XML format for each simulation.
Note: When you finish debugging, deactivate the debug mode by restarting Decision Runner by usingmode=OFF, for example:http://<host>:<port>/DecisionRunner/api/mode/change?mode=OFF