#ObjectScript

13 Followers · 1.6K Posts

InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.

Documentation.

New
Article Dmitrij Vladimirov · Jun 16 3m read

Hi folks!
Our community is growing rapidly, and the knowledge base is incredibly vast. Whether you're a newbie, confused, and unsure where to start, or a seasoned IRIS veteran who occasionally forgets a few basic rules (it's normal and happens to everyone!), you'll find this brief overview of IRIS basics and all its wonders useful.
Here I'd like to begin a series of articles dedicated to this topic.
There will be eight main topics in total:

  1. InterSystems ObjectScript
  2. Build with REST APIs
  3. Managing Data Models
  4. Explore Integrated ML
  5. Interoperability & Integrations
  6. Introduction to IRIS HealthShare products
  7. Analytics & Business Intelligence
  8. Deployment & DevOps

Each of them will consist of four parts: Courses, Community articles, Documentation, Applications

This particular part will cover InterSystems ObjectScript. For your convenience, all categories will be hidden under a spoiler.
 

0
1 45
Article Vachan C Rannore · Oct 21, 2025 3m read

Hello!!!

Data migration often sounds like a simple "move data from A to B task" until you actually do it. In reality, it is a complex process that blends planning, validation, testing, and technical precision.

Over several projects where I handled data migration into a HIS which runs on IRIS (TrakCare), I realized that success comes from a mix of discipline and automation.

Here are a few points which I want to highlight.

14
2 348
Article Robert Cemper · Oct 21, 2025 2m read

If you start with InterSystems ObjectScript, you will meet the XECUTE command.
And beginners may ask: Where and Why may I need to use this ?

The official documentation has a rich collection of code snippets. No practical case.
Just recently, I met a use case that I'd like to share with you.

The scenario:

When you build an IRIS container with Docker, then, in most cases,
you run the  initialization script  

iris session iris < iris.script

This means you open a terminal session and feed your input line-by-line from the script.
And that's fine and easy if you call methods, or functions, or commands.

2
3 283
Question Davi Massaru Teixeira Muta · Jun 2

On save the ClassMethod:

ClassMethod create() [ Language = python ] {

 print("python") 

}

it has received the error : Compilation started on 06/03/2026 02:15:21 with qualifiers 'cuk /multicompile=0'

 ERROR #7802: Worker job/s '1078:17' unexpectedly shut down in group '#Default:(9119826733444):0'.

 ERROR #7802: Worker job/s '1078:17' unexpectedly shut down in group '#Default:(9119826733444):0'.  

 

with the compileFlags "cuk" the return is:

ERROR #7802: Worker job/s '1160:34' unexpectedly shut down in group '#Default:(6933525859080):0'.

3
0 80
Article Robert Cemper · Oct 14, 2025 3m read

To better understand Streams in IRIS I'll start with a short

History

In the beginning (before IRIS), there was just basic access to external devices.
The 4 commands OPEN, CLOSE, READ, WRITE still work and are documented 
by  Introduction to I/O in detail.
Especially for files, this is a direct access to your actual file system.
You have to take care of any status or other signal in your code.  
Also, any code conversion or similar is up to you. 

Class %Library.File aka %File offers a large collection of methods and queries 
for standard operations on directories and files.

3
4 266
Article Jonathan Card · May 28 5m read

There seems to be a generous use of ClassMethods in ObjectScript code generally. I hope my own experiences aren't representative, but I bet they are. Forgive me for giving away the ending of this article, but in short: don't use them. Unless you can make a pretty convincing case that you have to, just never use them.1

What is a ClassMethod? In an ObjectScript class, you can define methods in two different ways: in a Method, you must instantiate an instance of the class to call the method, and in a ClassMethod, you can call the method without instantiating the class. Of course, in a ClassMethod, you don't have access to any properties of the object (because there's no object), but you can access globals (they are global, after all) and Parameters (which are class constants).

8
2 263
Article José Pereira · May 19 13m read

Abstract

Common Table Expressions (CTEs) provide a structured framework for defining reusable intermediate result sets within SQL statements. InterSystems IRIS implements CTEs via the WITH clause, enabling clearer query composition and modular analytical processing while remaining fully integrated with the IRIS cost-based optimizer.

This article explores the semantics of CTEs in InterSystems IRIS, explains their interaction with query optimization, discusses appropriate deployment scenarios, and presents executable examples illustrating practical patterns for production environments.


3
4 321
New
Article Ben Schlanger · Jun 8 4m read

Back when I was a Developer Support Engineer in the InterSystems Worldwide Response Center (WRC), I would occasionally receive cases involving large message backlogs in a production. The customer would discover that a subset of queued messages were no longer useful and would ask a question similar to the following:

Is there an established best practice for mass-aborting messages in a specific component's queue that match a particular set of criteria?
0
1 65
Article Andrew Sklyarov · Oct 3, 2025 8m read

I was really surprised that such a flexible integration platform with a rich toolset specifically for app connections has no out-of-the-box Enterprise Service Bus solution. Like Apache ServiceMix, Mule ESB, SAP PI/PO, etc, what’s the reason? What do you think? Has this pattern lost its relevance completely nowadays? And everybody moved to message brokers, maybe?

Wiki time: An enterprise service bus (ESB) implements a communication system between mutually interacting software applications in a service-oriented architecture (SOA) .

1
4 306
Article Clinovera · May 9 10m read

Many organizations that operate systems built on legacy technology stacks are facing significant support and maintenance complexities. They are eager to modernize, but the transition is usually prohibitively complex and expensive. These challenges apply to virtually any legacy tech, while InterSystems-based systems have their own unique nuances.

Key modernization challenges include:

  • Refactoring massive amounts of code, including identifying and removing obsolete "dead code."
  • Managing complex business logic accumulated organically over decades.
0
0 216
Article Gabriel Ing · May 7 4m read

For those of you that weren't at READY last week, you may have missed the exciting announcement that the Early Access Program for AI Hub is officially open. It was announced during an amazing demo from @Benjamin De Boe and @Jeff Fried, I recommend catching up with this demo when the recording is released!  I had the opportunity to play with AI Hub in advance, and thought I might share an introduction with the community.

0
5 213
Question Scott Roth · Apr 23

Was wondering if anyone had a Dynamic way to see if a Global is still being used by a Class File. 

We have been monitoring our Global Size recently, and I am trying to find problematic Class files that are not being cleaned up or used appropriately. I have come across some globals that do not seem to have a Class attached to them anymore, and instead of deleting globals 1 by 1, I was looking for a way that we could dynamically do this since the globals have data that is stale in them.

Thanks

Scott

7
0 96
Article André Dienes Friedrich · May 5 9m read

Abstract

Solar irradiance forecasting is critical for grid stability in photovoltaic (PV) power plants. This article replicates and extends the methodology of Lara-Benítez et al. (2023) "Short-term solar irradiance forecasting in streaming with deep learning" replacing the original offline simulation with a fully operational streaming pipeline built on InterSystems IRIS. We leverage IRIS Interoperability Productions as the streaming backbone, Embedded Python to run MLP, LSTM, and CNN deep learning models, and IntegratedML as an AutoML baseline.

0
0 70
Question John Murray · May 4

As an experiment in agentic coding in ObjectScript I'm using VS Code to try and create an implementation of an SFTP server.

SFTP is built on top of SSH, so the first phase involves implementing an SSH server. While working on the KEX part of that the agent (using GPT-5.3-Codex) reported:

  1. IRIS has what we already need for signing and hashing: RSASHASign, RSASHAVerify, RSAGetLastError, SHAHash, SHA1Hash, SHA3Hash.
  2. It does not list a Diffie-Hellman key exchange or modular exponentiation API in %SYSTEM.Encryption.

It then offered these options:

  1. Keep using IRIS APIs for cert/key/sign/hash.
1
0 80
Article Vachan C Rannore · Sep 15, 2025 2m read

Starting out with ObjectScript, it is really exciting, but it can also feel a little unusual if you're used to other languages. Many beginners trip over the same hurdles, so here are a few "gotchas" you'll want to watch out for. (Also few friendly tips to avoid them)


NAMING THINGS RANDOMLY

We have all been guilty of naming something Test1 or MyClass just to move on quickly. But once your project grows, these names become a nightmare. 

➡ Pick clear, consistent names from the start. Think of it as leaving breadcrumbs for your future self and your teammates.


17
4 576
Article Beatrice Zorzoli · Sep 10, 2025 4m read

I joined InterSystems less than a year ago. Diving into ObjectScript and IRIS was exciting, but also full of small surprises that tripped me up at the beginning. In this article I collect the most common mistakes I, and many new colleagues, make, explain why they happen, and show concrete examples and practical fixes. My goal is to help other new developers save time and avoid the same bumps in the road.

1. Getting lost among system classes and where to start

The issue: ObjectScript/IRIS ships with many system classes and packages (%Library, %SYS, %Persistent, %SQL, etc.).

17
3 590
Article Suprateem Banerjee · Apr 30 14m read

 

Ever since I started using IRIS, I have wondered if we could create agents on IRIS. It seemed obvious: we have an Interoperability GUI that can trace messages, we have an underlying object database that can store SQL, Vectors and even Base64 images. We currently have a Python SDK that allows us to interface with the platform using Python, but not particularly optimized for developing agentic workflows. This was my attempt to create a Python SDK that can leverage several parts of IRIS to support development of agentic systems.

1
2 196
Article David Hockenbroch · Apr 28 2m read

. . . you are not alone. 

Help is available.

This took me a while to figure out, and I assume there may be others struggling too. I made my way through all the Entra stuff to set up a client credentials workflow to send email through a Microsoft 365 account. I was able to successfully retrieve my token, but I couldn't ever get it to authenticate with the SMTP server using the %Net.SMTP class. There were two parts to fixing this.

First, the authenticator's access token needs to be more than JUST the access token. It has to be formatted as:

set smtp.authenticator.AccessToken = "user="_emailaddress_$C(1)_"auth=Bearer "_token_$C(1,1)
2
0 138
Article Andrew Sklyarov · Apr 23 4m read

Hey Community, 

Yeah, I know we have a lot of tips & tricks articles - we even have a special tag for it, right? But I can not share my own collection. In this collection, you can find snippets for beginners, as well as some everyday ObjectScript constructions. In fact, it's also a way to learn something new about my favorite programming language. So, if you guys have anything to add, you are welcome!

8
10 267
Article Kristina Lauer · Apr 23 2m read

Hi Community,

Take a look at these new videos in online learning, and get familiar with new features and interfaces in the latest release of InterSystems® products. All videos are also available in the Learning Services YouTube channel.

Plus, check out a video for new ObjectScript developers, and a guide for HealthShare® users upgrading their deployments.

Videos for the Latest Release of InterSystems Products

  • Goal: Learn about enhancements to the interoperability UI in version 2026.1 of InterSystems products.
0
3 88
Article Dmitry Maslennikov · Apr 18 5m read

Most IRIS developers use $LISTBUILD every day — often without even noticing it.

It is not just a convenient function for building lists. It is also the default internal format used to store row data, global values, and many intermediate structures inside the database engine.

Despite this, the actual binary representation of $LISTBUILD values is rarely discussed. Most developers rely on its behavior, but never look at how the data is really stored.

This article focuses strictly on the binary layout of $LISTBUILD values, based on direct inspection via zzdump.


11
7 255
Question Andrew Sklyarov · Apr 18

I need a %SYS.Python object that will be accessible from different processes. The goal is to avoid reinitializing the Python object whenever it is called. Ways that I checked and decided that it is NOT what I want:

  • %-variables (process variables). Reusing only in the same process
  • Save-and-restore via globals. Restoring means heavy initialization, which I want to avoid

Next, my ideas (none of them look like a silver bullet):

  • Using Interoperability Production.
5
0 115
Article Yuri Marx · Apr 20 25m read

What is a Microservice?

A microservice is an architectural style that structures an application as a collection of small, autonomous services. Each component is developed around a specific business capability, can be deployed independently, and is typically managed by a miniature, specialized, self-governing team. (Source: https://microservices.io/)

0
4 270
Article Roy Leonov · Apr 14 7m read

We didn't start with a big AI strategy.

We had a legacy InterSystems Caché 2018 application, a lot of old business logic, and a practical need: build a new UI and improve code that had been running for years. At first, I thought an AI coding agent would help only with a small part of the work. Maybe some boilerplate, some REST work around the system, and a bit of help reading old ObjectScript.

In practice, it became much more than that.

0
4 119
Article Vachan C Rannore · Aug 18, 2025 3m read

While starting with Intersystems IRIS or Cache, developers often encounter three core concepts: Dynamic Objects, Globals & Relational Table. Each has its role in building scalable and maintainable solutions. In this article, we'll walk through practical code examples, highlight best practices, and show how these concepts tie together. 

1. Working with Dynamic Objects:

Dynamic objects (%DynamicObject and %DynamicArray) allow developers to manipulate JSON-like structures directly in Objectscript. They are especially useful for modern applications that need to parse, transform or generate JSON.

5
7 417
Question Scott Roth · Apr 13

This past weekend we ran into something odd. When we failed over our mirror from 2022.1.3 to 2025.1.3 the one of the Business Rules that was on what became the Primary (2025.1.3), had a rule within it that was removed back in January. When the Failover occurred, we had to scramble to backup, disable, and remove the Rule that shouldn't have been there. 

Both the Data and Code live within the same IRIS.dat that is the main MIRROR database for that Namespace. 

If this happened to one Class file, could it happen to others we do not know about?

4
0 107