Decision Management (ODM,ADS)

 View Only
  • 1.  Decision warehouse output format for input parameters of Array type

    Posted Fri July 15, 2022 10:21 AM
    Hi Community,

    In my ruleproject, one of the input parameters is of type Array. The rule project is using Java XOM. I have enabled the tracing properties and in order to print the outout trace in JSON format, all the XOM classes are overriding toString() and I have set the 

    However, for the Array type input  parameter, in the decision warehouse, the output for request parameter is displayed as a reference to the array object.

    Can someone please help.

    ------------------------------
    Arti Verma
    ------------------------------


  • 2.  RE: Decision warehouse output format for input parameters of Array type

    User Group Leader
    Posted Tue July 19, 2022 09:39 AM
    Hi Arti 

    I do not have the answer for you at the moment but I did ask folks in our community to help out. Hopefully we can get you an answer soon.

    ------------------------------
    Gabriel Marte Blanco
    ------------------------------



  • 3.  RE: Decision warehouse output format for input parameters of Array type

    Posted Thu July 21, 2022 03:01 AM
    Hi Gabriel,

    Thank you for your reply. Just to explain the issue in more details:

    Java Class - Item.java( This class overrides toString() method to display the input parameters content in JSON format in Decision warehouse)
    Input Ruleset Parameter - Item[] (array of class Item)

    When the rules are executed, the Decision warehouse displays the Input parameter as reference to the class Item and not the actual contents of class Item.


    ------------------------------
    Arti Verma
    ------------------------------



  • 4.  RE: Decision warehouse output format for input parameters of Array type

    Posted Wed August 03, 2022 05:32 AM
    Hi,
    Are you using the bom serialization with decisionwarehouse. The property ruleset.bom.enabled is usually set by default to true and does take care of the serialization. It usually uses introspection and not the toString method to serialize data.

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



  • 5.  RE: Decision warehouse output format for input parameters of Array type

    Posted Wed August 03, 2022 05:39 AM
    rereading your question I understand you are trying to bypass the default output of the decision warehouse and that's the reason you have disabled the bom.enabled mode.
    In the case of the array input I think you need to encapsulate the array in an object so that the engine can determine its type

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