IBM Support

"Invalid cardinality" errors in rules after migrating to V7

Troubleshooting


Problem

Some rules show "Invalid cardinality" errors after being migrated to JRules V7.X.

Symptom

The following error is shown in the rules after migrating from JRules V6 to V7:

Invalid cardinality 'SINGLE', it is incompatible with 'MULTIPLE'
or
Invalid variable 'object [MULTIPLE]' for expected type 'java.util.Collection [SINGLE]'.

Resolving The Problem

Follow the instructions described in the documentation indicated above.

You can perform one of the following actions:

  • Change the type of your java.util.Collection variable/parameter to java.lang.Object.

or
  • Revert to the previous behavior by setting the ilog.rules.brl.collectionVarAsMultiple property to false.

    The property is specified in the preferences.properties file packaged under the folder ilog/rules/brl of the product library <InstallDir>\teamserver\lib\jrules-language-<version>.jar.

    For Rule Studio/Rule Designer, you must perform this change in the brldf.jar found under ilog.rules.brl.brldf_<lastestVersion> in the plugins folder of your Eclipse instance. By default:
    • <JRulesInstallDir>\studio\eclipse\plugins

    or
    • <ODMInstallDir>\WAS\AppServer-Shared\plugins

Note: as explained in the below link. you will first need to migrate to V7.1.1. when coming from V6.X.

Related Information

[{"Product":{"code":"SS6MTS","label":"WebSphere ILOG JRules"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Features:BAL","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21615250