Decision Management (ODM,ADS)

 View Only
  • 1.  ODM 8.12.0.1 Rule Designer: Error message for implicit casting of domain value to Java type

    Posted Fri May 31, 2024 08:07 AM
      |   view attached

    When trying to upgrade from ODM 8.11.1 to 8.12.0.1 we encountered the following error message:

    Here's the method declaration:

    The domain looks like this:

    Interestingly the error message doesn't appear in the problems view. Exporting, deploying and executing the ruleapp work fine. In Rule Designer 8.11.1 there wasn't any error message. 
    Is this a known issue for ODM 8.12.0.1?

    We've attached a mini ruleapp for reproducing the problem.



    ------------------------------
    Stephanie Heßler
    ------------------------------

    Attachment(s)

    zip
    test-domain.zip   5 KB 1 version


  • 2.  RE: ODM 8.12.0.1 Rule Designer: Error message for implicit casting of domain value to Java type

    Posted Fri May 31, 2024 04:35 PM

    You should be able to resolve this by adding a cast to String in the b2x

    return (java.lang.String) inputMyValues;



    ------------------------------
    Alain Robert
    ------------------------------



  • 3.  RE: ODM 8.12.0.1 Rule Designer: Error message for implicit casting of domain value to Java type

    Posted 28 days ago

    Is this a Workaround or a undocumented intended change? In our ruleapps we use domains a lot and have many occurences to update.

    With ODM 8.11.1 using domain-values worked without explicit casting. The readability of the source is not getting better with castings :-)

     

    In the simple example the workaround works. With more complex b2x mappings we run into the following problem:

    java.lang.String temp = (java.lang.String) inputMyValues;
    return temp;
    
    // [GBREA0072E: Unable to find a variable named 'temp', GBREA0031E: Unable to find an attribute named 'temp' in type 'com.ibm.rules.engine.ruleflow.runtime.TaskInstance']



    ------------------------------
    Michael Jackes
    ------------------------------



  • 4.  RE: ODM 8.12.0.1 Rule Designer: Error message for implicit casting of domain value to Java type

    Posted 19 days ago

    Michael's example showcases the issue we currently have. Not being able to use local variables is a pain.
    Plus there really would be a lot of occurences we would have to update.

    Can you recreate the problem?



    ------------------------------
    Stephanie Heßler
    ------------------------------