Hi Daniel,

I had put together a simple diagram that describes the process.

There is a lot of custom code and also several globals on the back end of which I have yet to learn. We are pulling a lot of data and from what I understand, a lot of the work was performance-related. I don;t have a lot of documentation. Hopefully, your use case is a bit simpler than ours.

   

Hi Daniel,

We had done this at one of our clients. We have Stored Procedures that are sitting on a SQL Server and are activated by a custom Business Operation (with a SQL.OutboundAdapter) which receives a trigger message with the needed parameters from a Trigger Business Service. The Stored Procedure can return SQL Results as XML which is what we had done... it is then easy to read that XML and extract data from it.

This was a large project (which I inherited) so it is possible that you may not need something this complex. And there could be other ways to do this. I can provide more details if you are interested.

Hello Yuri,

I think you have two strategies:

1) Use Dynamic Objects to traverse your JSON Arrays in loops and extract your fields by saving them directly to your SDA Properties. This is what I had done a couple of years ago when I had to get data from a product that could only output JSON. Once you have your final SDA you can then write it to a file.

2) Since you are on IRIS, you can use %JSON.Adaptor. I had not used it but I think it works just like %XML.Adaptor. If your class inherits from %JSON.Adaptor, it is basically aware of your JSON structure. You can then create Cache Objects as your data model for your incoming JSON and simply copy their Properties to SDA Properties.

I hope this helps. 

Vitaly

Hi Virat,

From what I understand, this is very similar to Static Methods and Instance Methods in Java. Instance methods are the behaviors on a particular object... you can run them only after you create the object with .New(). Class methods, on the other hand, are available without having to create an object first. 

There is probably a more formal answer out there, but I typically use Class Methods when I write a Utility class with lots of methods that do specific tasks and that may need to be available from several entry points to the application. On the other hand, when I design Objects with Properties and Methods, the methods are typically Instance methods.