Getting Started Connect Your Systems Interoperability QuickStart

Interoperability QuickStart

time to complete
20 minutes

Sharing data between systems has never been easier. Consume data from multiple systems, route messages according to logic you define, and connect using common protocols and multiple languages. With InterSystems IRIS® data platform, you can:

  • Route messages based on metadata or message contents.
  • Apply and update business logic in a low-code UI.
  • Transform data programmatically for downstream systems.
  • Use out-of-the-box components for quick integrations or code your own for even more flexibility.
  • Act on data flowing through the system with machine learning algorithms.
  • Store consolidated data to one repository for deeper analysis.
  • Track messages to troubleshoot or audit with ease.

Cameras on traffic lights have been installed to automatically identify red light violations. This data needs to be stored in a database for further analysis. If the violator is not an emergency vehicle, the data also needs to be sent to another application to issue a ticket.

InterSystems IRIS is being used to route the data, apply business rules to determine which violations result in tickets, and automatically transform data to the appropriate format needed for the downstream systems. For this activity, you will use the InterSystems Management Portal from an instance of InterSystems IRIS to see some of the key features of interoperability.

In InterSystems IRIS, an integration solution is known as a production. A production provides built-in connections to a wide variety of message formats and communications protocols. You can easily add other formats and protocols, and define business logic and message transformations either by coding or using graphic wizards. Productions provide persistent storage of messages, which allow you to trace the path of a message and audit whether a message is successfully delivered.

A production consists of business services, processes, and operations:

  • Business services connect with external systems and receive messages from them.
  • Business processes allow you to define business logic, including routing and message transformation.
  • Business operations connect with external systems and send the messages to them.

Set up

Start InterSystems IRIS and view the production

  1. First, make sure you have an instance of InterSystems IRIS and an ObjectScript IDE ready to go. Sandbox settings will appear below after you log in and launch a sandbox.
    Need InterSystems IRIS?
    Get a free, online development sandbox here. Log in with your InterSystems login account, or register for one below.
  2. Launch the development sandbox and click the Management Portal link, and log in with your username-- cannot display value - please provision a sandbox and password-- cannot display value - please provision a sandbox.
  3. In the Management Portal, navigate to Home > Interoperability > List > Productions and open Demo.RedLights.
  4. If the box on the top left says Production Stopped or Production Suspended, start the production using the Start button.

Monitor message transport

When the integration solution was started in Set Up, the production consumed a .txt file and processed it. We’re going to take a look at the message passed through.

1. View messages

  1. Navigate in the Management Portal to Interoperability > View > Messages and selecting the top-most message that has source equal to RealTimeRedLightViolation.
  2. On the Trace tab, click View Full Trace.
  3. This opens what is known as the Visual Trace and allows you to see how the data is passed between InterSystems IRIS production components.
  4. All messages are stored in the database, which makes troubleshooting and auditing easy.
  5. A message has been consumed by the RedLightViolation business service. Can you tell which business process the message was then sent to? Which property is not used when sending data to the To_TicketApplication business operation? (Hint: Select message [1] and click the Contents tab on the right. Then compare this to [3].) Answer: Demo.TicketBPL and CarType, respectively.

2. Send another message through the interface

  1. In the IDE -- cannot display value - please provision a sandbox, copy shared/Samples-Integration-RedLights/data/SampleFiles/LocalRedLightViolation1-copy.csv to the shared/Samples-Integration-RedLights/data/In folder (you may have to create the In folder).

Consume CSV files using the built-in Record Mapper

The Record Map UI allows you to easily generate code to consume and produce delimited files. While this particular record map already exists, notice there is the option to select a sample file and see how data in the file will be parsed. Additionally, a CSV wizard can read headers and generate the corresponding record map on the fly.

  1. From the Message Viewer window, click Interoperability in the upper left. Then navigate to Interoperability > Build > Record Maps and open Demo.RedLightViolationsRecordMap.
  2. Click Select sample file and choose the message you previously passed in: /home/project/shared/Samples-Integration-RedLights/data/SampleFiles/LocalRedLightViolation1-copy.csv. This utility makes it easy to build your record map and verify files will correctly be parsed. Unable to find it? Make sure to change the File of type drop-down to All Files (*) in the file selection dialog.
    If you get a cross-origin error, simply change the Management Portal URL from https:// to http:// (with no s). Based on the way this lab environment is set up to share content between containers, this is required to successfully upload a file.
  3. Select in the top menu, Home > Interoperability > Configure > Production. Select the RealTimeRedLightViolation business service. In the Settings tab on the right, find the RecordMap setting and note that it is set to the record map you just viewed, Demo.RedLightViolationsRecordMap.

Each business service has configuration settings that can easily be modified while the integration system is running, only impacting the particular service you need to work on. No code had to be written for this business service to work, allowing you to quickly consume and send delimited files.

Route messages, apply business logic and transformations

Data received from traffic lights needs to be sent to the ticket application and stored in an archive for further analysis. However, a ticket should only be sent if the vehicle that ran the red light is not an authorized vehicle, such as a police car or fire truck. InterSystems IRIS can appropriately route, apply logic, and transform data to ensure this process happens smoothly.

  1. Still on the Production Configuration page, select the Demo.TicketBPL business process on the Settings tab on the right. Find Class Name setting under Informational Settings, and select the magnifying glass to open the business process. Using the low-code editor, you can easily add logic, control flow, and send messages to business operations, which ultimately send data out to other applications.
  2. Select the Check if whitelisted rule activity and open the Rule Editor using the Rule Editor button on the right. You can apply rules to modify particular aspects of how messages are processed, and set up security so certain people can only edit the rules. This allows you to easily divide tasks and provide access to the right people while keeping the rest of your application secure.
    CHALLENGE: See if you can add a new rule to also allow vehicles with CarType equal to SWAT.
  3. Go back to the Demo.TicketBPL business process. If you no longer have the tab open, you can select Home > Interoperability > Build > Business Processes > Go. Select Call To_TicketApplication. Call activities like this one can easily convert data to a format that can be used by downstream systems. Leveraging the same UI, you can create advanced data transformations and reuse transformations throughout your applications.

While the business services and business operations in this sample production consumed data using no code, you can also write code to completely customize your own business components, letting you consume and send data in just the way you need. This allows you to use prebuilt adapters for TCP, FTP, SQL, and REST data input and output.

Up Next
Build a Smart Ticketing System
time to complete
45 minutes
Create a complex traffic application in a real-world scenario.