Decision Management (ODM,ADS)

Decision Management (ODM, ADS)

Connect with experts and peers to elevate technical expertise, solve problems and share insights

 View Only
Expand all | Collapse all

Print entire Java XOM request and response objects in Decision Service Ruleflow

  • 1.  Print entire Java XOM request and response objects in Decision Service Ruleflow

    Posted Tue August 03, 2021 09:36 AM

    Hello - I have a Java XOM defined and I would like to print the entry and exit payload using my main ruleflow. There are different ways to print a java object like one is to override the toString() method and other is to have some external libraries and use them... but my problem is my XOM has quite a few classes and implementing toString() is tedious and I am not sure of having external libraries in the decision service.

    Is there a simple way to print the request and response payload using System.out in the decision service or is there any other approach to print the payload in the system logs?

    Kindly guide, if there is an option.

    Thanks,



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 2.  RE: Print entire Java XOM request and response objects in Decision Service Ruleflow

    Posted Tue August 03, 2021 12:28 PM

    Have you considered serializing the object in XML or JSon using jackson for example https://github.com/FasterXML/jackson



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 3.  RE: Print entire Java XOM request and response objects in Decision Service Ruleflow

    Posted Tue August 03, 2021 12:51 PM

    Could you please slightly elaborate on this? Are you saying that I need to serialize the object in my XOM project? How to refer from my decision service?


    Thanks,



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration