Find

Article
· Oct 2 3m read

De "¡Ups!" a "¡Ajá!" - Evitad los errores de principiantes en ObjectScript

Empezar con ObjectScript es realmente emocionante, pero también puede resultar un poco extraño si estáis acostumbrados a otros lenguajes. Muchos principiantes tropiezan con los mismos obstáculos, así que aquí tenéis algunas "trampas” a las que debéis prestar atención. (Y también algunos consejos para evitarlas)


PONER NOMBRES AL AZAR

Todos hemos caído en la tentación de llamar a algo Test1 o MyClass solo para avanzar rápido. Pero una vez que vuestro proyecto crece, esos nombres se convierten en una pesadilla.

➡ Elegid nombres claros y coherentes desde el principio. Pensad en ello como si dejarais migas de pan para vuestro yo del futuro y para vuestros compañeros de equipo.


CONFUNDIR GLOBALES Y VARIABLES

Los globales (^GlobalName) pueden ser confusos al principio. No son simples variables. Viven en la base de datos y permanecen incluso después de que vuestro código deje de ejecutarse.

➡ Usadlos solo cuando realmente necesitéis datos persistentes. Para todo lo demás, quedaos con variables locales. (Esto también ahorra almacenamiento.)


OLVIDAR LAS TRANSACCIONES

Imaginad que actualizáis el registro de un paciente y vuestra sesión se bloquea a mitad de camino. Sin una transacción, os quedaríais con datos a medio hacer.

➡ Encapsulad las actualizaciones importantes en TSTART/TCOMMIT. Es como pulsar “guardar” y “deshacer” al mismo tiempo.


CONSTRUIR SQL EN CADENAS

Es tentador meter SQL directamente en cadenas y ejecutarlo. Pero eso rápidamente se vuelve desordenado y difícil de depurar.

➡ Usad SQL embebido. Es más limpio, seguro y fácil de mantener.

EJEMPLO:

❌ Construir SQL en cadenas

Set id=123
Set sql="SELECT Name, Age FROM Patient WHERE ID="_id
Set rs=##class(%SQL.Statement).%ExecDirect(,sql)

✅ Uso de SQL Embebido

&SQL(SELECT Name, Age INTO :name, :age FROM Patient WHERE ID=:id)
Write name_" "_age,!

SALTARSE EL MANEJO DE ERRORES

A nadie le gusta ver cómo su aplicación se bloquea con un mensaje críptico. Eso suele pasar cuando se ignora el manejo de errores.

➡ Encapsulad las operaciones arriesgadas en TRY/CATCH y daos a vosotros mismos mensajes de error con sentido.


IGNORAR MEJORES HERRAMIENTAS

Sí, el terminal funciona. Pero si solo programáis ahí, os estáis perdiendo mucho.

➡ Usad VS Code con la extensión de ObjectScript. La depuración, el autocompletado y el resaltado de sintaxis hacen la vida mucho más fácil.


REINVENTAR LA RUEDA

Los desarrolladores nuevos suelen intentar escribir sus propias utilidades de registro o de manejo de JSON, sin darse cuenta de que ObjectScript ya tiene soluciones integradas.

➡ Explorad %Library y los objetos dinámicos antes de crear lo vuestro.


ESCRIBIR “CÓDIGO MISTERIOSO”

Todos hemos pensado: “Esto lo recordaré más tarde.”

⚠️ SPOILER: ¡NO LO HARÉIS!

➡ Añadid comentarios breves y claros. Incluso una sola línea explicando por qué habéis hecho algo ayuda muchísimo.


 

CONCLUSIONES FINALES :)

Aprender ObjectScript es como aprender cualquier otro lenguaje nuevo. Requiere un poco de paciencia, y cometeréis errores por el camino. La clave está en reconocer estas trampas comunes cuanto antes y construir buenos hábitos desde el principio. De ese modo, en lugar de pelearos con el lenguaje, disfrutaréis realmente de lo que puede hacer.

Discussion (0)1
Log in or sign up to continue
Article
· Oct 1 6m read

エージェンティック AI RAG アプリケーションの構築方法: 手順ガイド

コミュニティの皆さん、こんにちは。

従来のキーワードベースの検索では、ニュアンスのあるドメイン固有のクエリには対応できません。 ベクトル検索であれば、セマンティック認識を利用して、キーワードだけでなくコンテキストにも基づいたレスポンスを AI エージェントで検索して生成することができます。

この記事では、エージェンティック AI RAG(検索拡張生成)アプリケーションを作成手順を紹介します。

実装手順:

  1. エージェントツールを作成する
    • インジェスト機能の追加: ドキュメント(例: InterSystems IRIS 2025.1 リリースノート)を自動的にインジェストしてインデックス作成を行います。
    • ベクトル検索機能の実装
  2. ベクトル検索エージェントを作成する
  3. Triage(メインエージェント)に渡す
  4. エージェントを実行する
Discussion (0)0
Log in or sign up to continue
Question
· Oct 1

Executing csession always return exit code 1.

Hi all,

I'm developing a Azure Pipeline to automate the deployment process in Caché.

I use selfhosted agent to execute code im my Caché Server.

My problem is that cession execution via cmd always terminate with exit code 1 and the pipeline finishes with error, but the execution in Caché is fine, the method executed returns $$$OK

I use the following line to execute a class in Caché.

C:\InterSystems\Cache\bin\csession.exe CACHE -U  %RELEASE_TRIGGERINGARTIFACT_ALIAS% "##Class(sgf.pipeline.DeploymentManager).ProcessDeployment()"

Bellow printscreen of execution in Azure:

The problem is the exit code 1


I did a local test printing the errorlevel environment variable before execution:

After execution:

Regards.

5 Comments
Discussion (5)2
Log in or sign up to continue
Digest
· Oct 1

Resumo do InterSystems Developer Community, Setembro 2025

Olá e bem-vindo ao boletim informativo da comunidade de desenvolvedores Setembro 2025.
Estatísticas gerais
20 novas postages publicadas em Setembro:
 15 novos artigos
 5 novos anúncios
4 novos membros ingressaram em Setembro
1,459 postagens publicadas ao todo
649 membros ingressaram ao todo
Principais publicações
Principais autores do mês
Artigos
#InterSystems IRIS
#HealthShare
#Developer Community Oficial
#Portal de Aprendizagem
#InterSystems IRIS for Health
Anúncios
Setembro, 2025Month at a GlanceInterSystems Developer Community
Announcement
· Oct 1

Developer Community Recap, September 2025

Hello and welcome to the September 2025 Developer Community Recap.
General Stats
116 new posts published in September:
 35 new articles
 36 new announcements
 41 new questions
 4 new discussions
465 new members joined in September
15,514 posts published all time
17,897 members joined all time
Top posts
Top authors of the month
Articles
#InterSystems IRIS
Build a Customer Support AI Agent with smolagents + InterSystems IRIS (SQL, RAG & Interoperability)
By Alberto Fuentes
Data Transformation Testing
By Robert Barbiaux
How to Build a Usable Method With 50 Parameters or Leveraging JSON As Method Qualifiers
By Evgeny Shvarov
Link tables programmatically
By Megumi Kakechi
IRIS in Docker for beginners
By Robert Cemper
Getting those hyphens ( - ) in (or out) of your custom FHIR operation
By Ariel Glikman
How to get InterSystems IRIS Community Edition
By Derek Gervais
Share volumes across pods and zones on GKE
By Steve Lubars
Learning ObjectScript as a New Developer: What I Wish I Knew
By Beatrice Zorzoli
Plug-N-Play on Pattern Match WorkBench
By Alex Woodhead
From "Oops" to "Aha!" - Avoiding Beginner Mistakes in ObjectScript
By Vachan C Rannore
Run Your AI Agent with InterSystems IRIS and Local Models using Ollama
By Alberto Fuentes
High Availability IAM
By Ariel Glikman
Reviews on Open Exchange - #55
By Robert Cemper
Snapshot of free disk space
By Robert Cemper
Snapshot DB free - Strategies
By Robert Cemper
Share volumes across pods and zones on AKS
By Steve Lubars
Dashboard of database free space
By Robert Cemper
Share volumes across pods and zones on EKS
By Steve Lubars
How to keep your InterSystems IRIS Mirror configurations in sync
By Laurel James (GJS)
Securing IRIS Integrations with Mutual TLS (mTLS): A Practical Guide
By Raef Youssef
Running InterSystems IRIS with Docker: A Step-by-Step Guide - Part 1: From the Basics to Custom Dockerfile
By Pietro Di Leo
About parallel queries (%PARALLEL)
By Megumi Kakechi
SentinelIRIS
By André Dienes Friedrich
InterSystems for Dummies – Record Map
By Kurro Lopez
InterSystems IRIS Data Platform For IoT Applications
By Developer Community Admin
 
#InterSystems IRIS for Health
 
#InterSystems Kubernetes Operator (IKO)
 
#Developer Community Official
 
#Caché
 
#Health Connect
Implementing a FHIR project - ÚNICAS
By Luis Angel Pérez Ramos
 
Announcements
#InterSystems IRIS
[Demo Video]
By Vishal Pallerla
Managing InterSystems Servers – In-Person September 29-October 3, 2025 / Registration space available
By Larry Finlayson
An amazing webinar in Spanish is coming! From Data to Knowledge: Harnessing Clinical Information with InterSystems and AI
By Sergio Farago
JediSoft IRISsync® - Synchronize Smarter, Manage Faster!
By Kimi Niittyniemi
IRIS Data Platform Specialist | 10+ years exp | Looking for the next job
By Andrew Sklyarov
[Webinar] AI Vector Search Technology in InterSystems IRIS
By Anastasia Dyubaylo
InterSystems IRIS BI Tips & Tricks!
By Asaf Sinay
New Hands-On Tutorial: RAG using InterSystems IRIS Vector Search
By Anastasia Dyubaylo
[Video] August Developer Meetup Recording - Agentic Orchestration & Multi-LLM Systems
By Derek Gervais
[Video] InterSystems Different by Design
By Anastasia Dyubaylo
 
#InterSystems IRIS for Health
 
#Developer Community Official
 
#Open Exchange
 
#Other
 
#Global Masters
 
#IRIS contest
 
#Summit
 
#InterSystems Ideas Portal
InterSystems Ideas News #25
By Irène Mykhailova
 
Questions
#InterSystems IRIS
JSONNAME with JSON Adapter
By Touggourt
A Property with Collection of lists
By Touggourt
SearchTable properties not populating
By Scott Roth
Undefined IRIS attribute in Embedded Python
By Touggourt
Creating multiple production
By Touggourt
Adding Business Operation
By Touggourt
How can I optimize the performance of my queries and cubes in Adaptive Analytics?
By Prakash Hinduja
Run EnsLib.FTP.InboundAdapter on demand
By Kurro Lopez
LOAD DATA from file erroring after upgrade to 2025.1
By Don Martin
Embedded Python pages in IRIS
By Touggourt
Testing Java Gateway ( EnsLib.JavaGateway.Service) Connection from Ens.BusinessOperation/EnsLib.SQL.OutboundAdapter
By Scott Roth
How to disable web source control in Bussiness Process
By Guilherme Silva
Plotly Bar Graph is NOT showing expected values
By Oliver Wilms
Creating a lookup table with Data from ADT message to reference later in business rule
By Gigi La Course
Ensemble query
By Virat Sharma
ExportUDL adds extra line at the end of class
By Jochen Roese
How to get the specific production component status like (Running, stopped, Inactive, etc...) in programatically.
By TAMILMANI RAVI
How to Merge Contents from Multiple Routine Databases into a Common Target Database
By Evan Gabhart
Resending a message automatically every 60 minutes from Business Operations
By Saju Abraham
Setting up MQTT connection
By Touggourt
InitialExpression Not Working in %CSP.Page Subclass
By Ashok Kumar T
Practical Architecture Question
By Floyd Lewis
Is it possible to send in different context request classes to the same BPL?
By Matthew Martinez
 
#HealthShare
 
#Other
 
#Caché
 
#InterSystems IRIS for Health
 
#Ensemble
 
#Health Connect
 
Discussions
September, 2025Month at a GlanceInterSystems Developer Community
Discussion (0)2
Log in or sign up to continue