Search code examples
ibm-cloudbusiness-rules

"Unable to run test .. null object" on Business Rules service on Bluemix


When testing my rules on the Business Rules service on Bluemix, I get the following error:

"Unable to run test Error when executing the ruleset /MyRuleApp/1.0/myrules/1.0

An error occurred while the rule session was called: com.ibm.rules.res.xu.internal.XUException: An error occurred during the ruleset execution. ilog.rules.engine.IlrUserRuntimeException:

null object when invoking public void myMethod()"


Solution

  • I had misconstructed the input parameter (it was missing the opening brace):

        "foo": {
            "name": "foo",
            "id": "bar"
        }
    }
    

    Once I added the opening brace I could run the test successfully.