Article
· Feb 2, 2021 3m read

[InterSystems IRIS for the First Time] Let’s use Interoperability

Hello, everyone!

InterSystems IRIS has a menu called Interoperability.

It provides mechanisms to easily create system integrations (adapters, record maps, BPMs, data conversions, etc.) so different systems can be easily connected.

A variety of operations can be included in the data relay process, as examples we can cite: to connect systems that are not normally connected, data can be received (or sent) according to the specifications of the destination system. Also, information can be acquired and added from another system before sending the data. As well as, information can be acquired and updated from a database (IRIS or other).

In this series of articles, we will discuss the following topics while looking at sample code to help you understand how it works and what kind of development is required when integrating systems with Interoperability.

First, let me introduce you to the case study we will be using in this series.

A company operates a shopping site and is changing the order of displaying product information to match the seasons.
However, some items sell well regardless of the season, while others sell at unexpected times, which does not match the current display rule of changing the order.
Therefore, we looked into the possibility of changing the order of display to match the day's temperature instead of the season. It became necessary to survey the temperature of the purchased products at that time.
Since an external Web API is available for checking weather information, we plan to collect the weather information at the time of purchase and register it in the later review database.

It’s very simple, but you need to use an “external Web API” to collect the information, and you need to combine the information obtained and the purchase information to register in the database.

Specific instructions will be discussed in a related article (not including the creation of a web site). Please take a look!

As for the "external Web API" that we are using this time, we are using OpenWeather's Current weather data.

(If you want to try it out, you need to register an account and get an API ID).

The following is the result of a GET request from a REST client (we will run this in the mechanism we will implement in Interoperability).

The JSON of the HTTP response is as follows:

{
    "coord": {
        "lon": 135.5022,
        "lat": 34.6937
    },
    "weather": [
        {
            "id": 803,
            "main": "Clouds",
            "description": "broken clouds",
            "icon": "04d"
        }
    ],
    "base": "stations",
    "main": {
        "temp": 17.05,
        "feels_like": 13.33,
        "temp_min": 16,
        "temp_max": 18,
        "pressure": 1017,
        "humidity": 55
    },
    "visibility": 10000,
    "wind": {
        "speed": 4.63,
        "deg": 70
    },
    "clouds": {
        "all": 75
    },
    "dt": 1611635756,
    "sys": {
        "type": 1,
        "id": 8032,
        "country": "JP",
        "sunrise": 1611612020,
        "sunset": 1611649221
    },
    "timezone": 32400,
    "id": 1853909,
    "name": "Osaka",
    "cod": 200
}

In the next article, we will discuss how the Interoperability menu works for system integration.

Discussion (1)2
Log in or sign up to continue