[InterSystems IRIS for the First Time] Interoperability: Let's learn how it works
Tags: beginners, programming, tutorial, interoperability
Published: 2022-10-23 13:42:27

**This article is a continuation of <a href="https://community.intersystems.com/post/intersystems-iris-first-time-let%E2%80%99s-use-interoperability" target="_blank">this post</a>.**

The purpose of this article is to explain how the Interoperability menu works for system integration.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuxbu8pjbmbv6f73zefz.png)


The left side of the figure is the window for accepting information sent from external systems.

There are various ways to receive information, such as monitoring the specified directory at regular intervals to read files, periodically querying the database, waiting for input, or directly calling and having it passed from applications in other systems.

In the system integration mechanism created in the IRIS Interoperability menu, the received information is stored in an object called a <span style="color:#16a085;">**message**</span>. The <span style="color:#16a085;">**message**</span> is sent to the component responsible for the subsequent processing.

A <span style="color:#16a085;">**message**</span> can be created using all the received information or only a part of it.

Suppose you want to send the information contained in the <span style="color:#16a085;">**message**</span> to an external system. In that case, you need to send the message to the component responsible for requesting the external network to process it (the right side of the figure). The component that receives the <span style="color:#16a085;">**message**</span> will request the external system to process it.

Besides, suppose a <span style="color:#16a085;">**message**</span> requires human review, data conversion, or data appending. In that case, the <span style="color:#16a085;">**message**</span> is sent to the component in the middle of the diagram (BPM), which is responsible for coordinating the processing flow.

<span style="color:#16a085;">**Messages**</span> are used to send and receive data between each component. When a <span style="color:#16a085;">**message**</span> is sent or received, the message is automatically stored in the database.

Since <span style="color:#16a085;">**messages**</span> are stored in the database, it is possible to check the difference before and after the data conversion. Check the <span style="color:#16a085;">**message**</span> that was the source of a problem during an operation or start over (resend) from the middle of the process. Verify the status using <span style="color:#16a085;">**messages**</span> at each stage of development, testing, and operation.

A simple picture of system integration would be divided into three components (business services, business processes, and business operations), as shown in the figure below.

There is also a definition called "<span style="color:#c0392b;">**production**</span>" that stores information about the components to be used (e.g., connection information).



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zdlwclspujhrjezaqtl7.png)


The role of each component is as follows:

<u>**Business Services**</u>  
Responsible for receiving information from external sources, creating <span style="color:#16a085;">**messages**</span>, and sending <span style="color:#16a085;">**messages**</span> to other components.

<u>**Business Processes**</u>  
This role is activated when a <span style="color:#16a085;">**message**</span> is received and is responsible for coordinating the process (calling components in the defined order, waiting for responses, waiting for human review results, etc.).

<u>**Business Operations**</u>
This function is activated when a <span style="color:#16a085;">**message**</span> is received and has a role in requesting the external system to process the message.

<span style="color:#16a085;">**Messages**</span> are used to send and receive data between components.

Components other than business services initiate processing when they receive a <span style="color:#16a085;">**message**</span>.

The question is, what is the purpose of creating and using this <span style="color:#16a085;">**message**</span>?

<span style="color:#16a085;">**Messages**</span> are created by retrieving the information you want to relay to the external system from entered data into the business service.

Since not all external systems connected to IRIS use the same type of data format for transmission, and the content to be relayed varies, the production can freely define <span style="color:#16a085;"><strong>message classes according</strong></span> to the information.

There are two types of <span style="color:#16a085;">**messages**</span>: request (= request message) and response (= response message). The <span style="color:#16a085;">**message**</span> that triggers the component's activation is called request (= request message), and the <span style="color:#16a085;">**message**</span> that the component responds to after processing is called response (= response message).

These <span style="color:#16a085;">**messages**</span> will be designed while considering the process of relaying them.

In the following articles, we will use a study case to outline the creation of <span style="color:#c0392b;">**productions**, <span style="color:#16a085;">**messages**</span>, and components.