#ObjectScript

14 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 Lorenzo Scalese · Feb 20 6m read

Introduction

The standard %Net.HttpRequest library in InterSystems IRIS is powerful and comprehensive, but it can be verbose for simple operations. Writing an HTTP request often requires several lines of code to instantiate the class, configure the server, the port, HTTPS, add headers, and finally send the request.

When testing in the terminal, this configuration quickly becomes too heavy, and usually ends up with the creation of temporary methods...

FastHTTP was designed to address this need. This utility class provides a fluent and concise interface to perform HTTP calls in a single line, while automatically handling the underlying complexity (SSL/TLS, URL parsing, JSON encoding, headers, etc.).

1
2 41
New
Article Ashok Kumar T · Feb 20 3m read

This is an excellent candidate for a developer community post (like Dev.to, Medium, or the InterSystems Community). It bridges the gap between high-level architecture and hands-on implementation.

Here is the summarized article format.

Building a Robust Asynchronous Queue Manager with InterSystems IRIS and Angular

As applications scale, handling heavy computational tasks synchronously becomes a bottleneck. Whether it's processing large data sets, sending high-volume emails, or managing API integrations, a decoupled architecture is essential.

0
0 21
New
Article Sanjib Pandey · Feb 20 5m read

Project Overview:

The Clinical Staff Master Data Management (CSMDM) system is a full-stack healthcare integration application built on InterSystems IRIS for Health. It centralizes and standardizes clinical staff metadata into a single authoritative repository, exposed through RESTful CRUD APIs and reusable backend methods.

The platform eliminates fragmented lookup tables and hardcoded mappings that commonly cause errors in HL7 and FHIR integration workflows, ensuring data consistency and interface reliability.

Application to Other Domains:

0
0 16
New
Discussion Evgeny Shvarov · Feb 14

Hi developers!

I'm testing vibecoding with ObjectScript and my silicon friend created a code-block that got me thinking "what's wrong"?

Here is the piece of code:

for i=0:1:(json.%Size()-1) {

set p = json.%Get(i)

if (p="value1")!(p="value2") {

quit1
}

 

AI wanted to quit from a method with a return value. Good intention, but bad use of the command.

And ObjectScript compiler compiles this code with no error(?) (syntax linter in VSCode says it's a syntax, kudos @Brett Saviano ).

But in action, it produces <COMMAND>, of course.

27
0 222
New
Announcement Ali Nasser · Feb 18

Hello DC community, 

InterSystems Certification is currently developing a certification exam for ObjectScript developers, and if you match the exam candidate description below, we would like you to beta test the exam! The exam will be available for beta testing starting February 18th, 2026. 

Beta testing will be completed May 4, 2026.

What are my responsibilities as a beta tester?

0
1 44
New
Article David Hockenbroch · Feb 18 7m read

In the previous article, we examined how we can use the %CSP.Request and %CSP.Response classes to test a REST API without having the API fully set up and accessible across a network with an authentication mechanism. In this article, we will build on that foundation to perform some simple unit testing of one of our REST API methods.

0
0 22
Article Suprateem Banerjee · Jan 25 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
0 39
Question prashanth ponugoti · Feb 7, 2022

Hi Community,

Here we have requirement to process messages min 10 sec delay. Current time it is taking my businessProcess is less than 1 sec.

To implement this requirement , I need to sleep 10 sec in business process custom code.

Could somebody help me to implement delay in BusinessProcess.

Thanks,

Prashanth

9
0 1047
Question Evgeny Shvarov · Feb 5

Hi developers!

In a method I need to return a result as a dynamic object aka JSON Object. And here is my logic:

Classmethod Planets() as%DynamicObject {

 set val1="Jupiter"
 set val2="Mars"// this doesn't work! cannot compile
 return {"value1":val1, "value2":val2}

}

So I need to do the following:

Classmethod Planets() as%DynamicObject {

 set val1="Jupiter"
 set val2="Mars"
 set result={}

 set result.value1=val1

 set result.value2=val2

 return result

}
20
0 180
New
Question Julian Matthews · Feb 10

Hey everyone.

I have a web service which is receiving XML as a stream, and I'm intending to then correlate the stream into an object. Unfortunately I am hitting a road block where the sender places a large chunk of the XML within a cdata block which is then causing the correlate of %XML.Reader to not work.

The structure of my xml is along the lines of:

<abc><def>010203</def><ghi>040506</ghi><jkl><mno><pqr>070809</pqr><stu>101112</stu></mno></jkl></abc>
5
0 66
Question Scott Roth · Feb 5

I have always struggled with Iterating through a JSON response to pull out certain fields into a Data Class Structure to use to populate fields in a DTL. So I defined the whole structure for the following JSON, with the base structure extending Ens.Response, %XML.Adaptor, and %JSON.Adaptor.

5
0 56
Article Jonathan Card · Jan 25 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).

3
0 32
Announcement Thomas Dyar · Jan 22

Hi Community,

We’re excited to invite you to take part in shaping the next generation of ObjectScript development tools. We’re working on an AI-powered ObjectScript coding assistant designed specifically for IRIS developers. Not a generic AI adapted for ObjectScript, but a solution built from the ground up to understand ObjectScript idioms, IRIS APIs, interoperability productions, and real-world developer workflows.

To make sure we build something truly useful, we need your input.

👉 ObjectScript Coder Agent Developer Survey 👈

17
2 348
Question Pietro Di Leo · Jan 17, 2024

Hi everyone, 

Does anyone know how to export projects via VSC? 

I opened the project through the "InterSystems Tools" plugin (command is "Edit Code in Project") and I can correctly work on it.

However, when I try using the "ObjectScript" plugin to export the project (right click on the project -> "Export Project Contents")

This message appears and it is not possible to export the project:

I've tried also to open a new window, then a folder and finally the project, but nothing changes. 

This is an example of my workspace: 


Anyone knows how to do it? 

Thank you! 

14
0 3275
New
Article Evgeny Shvarov · Feb 16 5m read

How I Vibecoded a Backend (and Frontend) on InterSystems IRIS

I wanted to try vibecoding a real backend + frontend setup on InterSystems IRIS, ideally using something realistic rather than a toy example. The goal was simple: take an existing, well-known persistent package in IRIS and quickly build a usable UI and API around it — letting AI handle as much of the boilerplate as possible. Here is the result of the experiments.

2
0 94
Announcement Evgeny Shvarov · Feb 2

Here are the technology bonuses for the InterSystems Full Stack Contest 2026, which will give you extra points in the voting:

  • IRIS Vector Search usage -3
  • InterSystems Native SDK for Python or Embedded Python usage -3
  • Developer Community Idea implemented - 2
  • Docker container usage -2 
  • IPM Package Deployment - 2
  • Online Demo -2 
  • Find and report a bug - 2
  • Article on Developer Community - 2
  • The second article on Developer Community - 1
  • Video on YouTube - 3
  • YouTube Short - 1
  • First Time Contribution - 3

See the details below.<--break->

0
0 73
Article Luis Angel Pérez Ramos · Jan 28 5m read

How many times have you had to receive or generate a JSON and wished you could work on it using DTLs without having to deal with DynamicObjects trying to remember the name of each field? Do you want to break down and make your giant JSON file more digestible?

In my case, never, but I thought that someone might find it useful to have a feature that captures your JSON and breaks it down into a series of ObjectScript classes that you can work with more easily and conveniently.

Well then...behold JSON2Class in all its glory!

0
0 85
Job Ratnesh Shrivastava · Jan 27

Job Title: InterSystems Developer / Specialist (IRIS / HealthShare)
Location: New York City, NY (Hybrid / Remote)
Duration: Contract (2+ years)
Experience: Min. 8 Years 

Job Summary

We are looking for an experienced InterSystems Developer / Specialist with expertise in InterSystems IRIS / HealthShare to support healthcare integration and interoperability initiatives. The ideal candidate should have hands-on experience in ObjectScript development, healthcare data standards, and integration protocols supporting EHR/HIE environments.

Key Skills Required

0
0 74
Article Henry Pereira · Jan 26 6m read

Some concepts make perfect sense on paper, whereas others require you to get your hands dirty. Take driving, for example. You can memorize every component of the engine mechanics, but that does not mean you can actually drive.

You cannot truly grasp it until you are in the driver's seat, physically feeling the friction point of the clutch and the vibration of the road beneath. While some computing concepts are intuitive, Intelligent Agents are different. To understand them, you have to get in the driver's seat.

0
2 170
Question Evgeny Shvarov · Jan 18

Hi folks!

How can we handle JSON boolean types in IRIS?

I'm having a UI sending me a JSON payload as:

{

  "id": 1,
  "strprop": "string",
  "boolprop": true

}

The class is 

MyPackage.MyClass Extends (%Persistent%JSON.Adaptor)

{

strprop as%String;

boolprop as%Boolean;

}

And I'm trying to update an instance of a MyPackage.MyClass and I'm getting a datatype-related error, something like %JSONImportInternal+269...

How am I supposed to deal with booleans in JSON with IRIS and ObjectScript? Any best practice advices?

5
0 94
Article David Hockenbroch · Jan 7 7m read

There are numerous excellent tools available for testing your REST APIs, especially when they are live. Postman, various web browser extensions, and even custom ObjectScript written with %Net.HttpRequest objects can get the job done. However, it is often difficult to test just the REST API without inadvertently involving the authentication scheme, the web application configuration, or even network connectivity. Those are a lot of hoops to jump through just to test the code within your dispatch class. The good news is that if we take our time to understand the inner workings of the %CSP.REST class, we will find an alternative option suited for testing only the contents of the dispatch class. We can set up the request and response objects to invoke the methods directly.

5
7 262
Question Evgeny Shvarov · Dec 27, 2025

Hi developers!

There is a very neat variable in IPM ${ipmdir} that lets packages be installed on a particular IRIS server and ensures that the data and resources they bring don't mess around as ${ipmdir} variable during the installation transforms into:

iris installation dir/ipm/package_name/version/whatever_you_install_here

It is very convenient, e.g., to bring some data and resource files that can be useful during the installation setup, e.g., via FILECOPY. Indeed, suppose you bring some csv_file, e.g. titanic.csv via FILECOPY as:

<FileCopy Name="data/titanic.csv" Target="${ipmdir}data/titanic.csv"/>

or even the whole folder of data in the source code repo into the package:

<FileCopy Name="data/" Target="${ipmdir}data/"/>

And in the case of Iris in Docker it resides in:

/usr/irissys/ipm/package_name/1.0.0/data/titanic.csv

This is all great, but is there any way for the installed code to determine the location of the data files? It'd be neat to let the installed app know somehow where is the data that came with it? Could it be the method in the IPM client that will resolve ${ipmdir} for the app? 

2
0 74
Article Vachan C Rannore · Dec 28, 2025 1m read

SETassigns value to the variable at RUNTIME.

#DIM declare the variable and it's Data Type at COMPILE TIME.

SET #DIM
Makes the variables Dynamic. Improves Readability.
No Data Type Declaration. Enables IDE auto-completion.
Runtime Useful for Object references.
#DIM name As%StringSet name = "Micheal Scott"#DIM age As%NumericSet age = 36#DIM employer As App.Employer               ; compile timeSet employer = ##class(App.Employer).%New() ; runtime 

 

SETor #DIM? Your design, your rules.

18
4 279
Article Jean Millette · Apr 23, 2025 7m read

I have a new project to store information from REST responses into an IRIS database. I’ll need to sync information from at least two dozen separate REST endpoints, which means creating nearly that many ObjectScript classes to store the results from those endpoints.

Could I use ChatGPT to get a headstart on creating these classes? The answer is “Yes”, which is great since this is my first attempt at using generative AI for something useful. Generating pictures of giraffes eating soup was getting kind of old….

Here’s what I did:

3
1 354