I would like to know if there is a way of having a callback or something similar, on persistent classes that is always called after the execution of the operation (failed or successfull).

%OnOpen is executed prior to the action, and there is no post callback

%OnAfterDelete and %OnAfterSave are executed after a successfull operation

0 8
0 246
Question
· Jun 29, 2020
Get Property MaxLen

Set cdef = ##class(%Dictionary.ClassDefinition).%OpenId(table)
Set count = cdef.Properties.Count()
For i = 1:1:count {
Write cdef.Properties.GetAt(i).Name, " ", cdef.Properties.GetAt(i).Type, "", <MY QUESTION>,!
}

How can I do to get maxlen?

2 8
3 472

While the integrity of Caché and InterSystems IRIS databases is completely protected from the consequences of system failure, physical storage devices do fail in ways that corrupt the data they store. For that reason, many sites choose to run regular database integrity checks, particularly in coordination with backups to validate that a given backup could be relied upon in a disaster.

16 8
9 1.8K

iris-docker-multi-stage-script

A python script to keep your docker iris images in shape ;)

Witout changing your dockerfile or your code you can reduce the size of your image by 50% or more !

TL;DR

Name the builder image builder and the final image final and add this to end of your Dockerfile:

Modify your Dockerfile to use a multi-stage build:

ARG IMAGE=intersystemsdc/irishealth-community:latest
FROM $IMAGE as builder

Add this to end of your Dockerfile:

FROM $IMAGE as final

ADD --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} https://github.com/grongierisc/iris-docker-multi-stage-script/releases/latest/download/copy-data.py /irisdev/app/copy-data.py

RUN --mount=type=bind,source=/,target=/builder/root,from=builder \
    cp -f /builder/root/usr/irissys/iris.cpf /usr/irissys/iris.cpf && \
    python3 /irisdev/app/copy-data.py -c /usr/irissys/iris.cpf -d /builder/root/ 

Boom! You're done!

12 8
7 564
Question
· Dec 19, 2019
%New error handling

Hi,

On a persistent class, I have defined an %OnNew method that validate some properties with appropriate status code for each kind of error.
Question is: how do you catch the specific error when %New is called on this class?

Surrounding %New method with a try-catch not seems to work.

Thanks

0 8
0 470

Hi Community!

We're pleased to invite you to the "Online Meetup with IRIS Programming Contest Winners" on April 3rd at 11:00 EDT!

It's a virtual Meetup with some of the winners of the past InterSystems IRIS Online Programming Contest.

What awaits you at this virtual Meetup?

  • Our winners bios.
  • Short demos on their applications.
  • A short interview with all the winners about the past contest. Plans for the next contests.

4 8
0 349

Hi all

I've been looking into how to convert some images with IRIS and saw some recommendations on the forums around using image magick.

However I can't seem to get this working using ZF100 and on windows server and I'm wondering if I'm missing something really obvious as I've not used IRIS to call third party applications before.

If I run via a Windows CLI on the server, it works fine, e.g:

magick "D:\1221701739_20190716134351965_1_0.jpg" -resize 640x480 "D:\1221701739_20190716134351965_1_TEST.jpg

0 8
1 331

In my Business Operation I need to execute a bookkeeping method every X seconds.

How can I do that?

There are two workarounds (I dislike both):

  1. Execute bookkeeping on process start - but there might be no requests at all
  2. Create a BS that sends messages to BO every X seconds - it makes production more complex and also queues might not guarantee that the method is executed on schedule.

Thoughts?

0 8
0 245
Discussion
· Nov 17, 2021
Code Golf - Encoder

We need to send some coordinates to a spaceship through a laser beam.
To do that we have to encode it, and beam it out into space.
Your mission is to implement the encoder with a compression standard.
As usual shortest solution wins.

Task

You will receive a string of comma-separated integers and you will return a new string of comma-separated integers and sequence descriptors.

Input

"0,2,4,5,5,5,5,5,3,4,5"

Output

"0-4/2,5*5,3-5"

4 8
2 563

InterSystems announces another developer preview release, as part of the developer preview program for the 2022.3. Many updates and enhancements have been added in 2022.3 and there are also brand new capabilities, such as the new FHIR SQL Builder, improvements for Columnar Storage, and support to SUSE 15 SP4 and Oracle Linux 9. Some of these features or improvements may not be available in this current developer preview.

0 8
0 300

Hi Developers!

As you know InterSystems IRIS Interoperability solutions contain different elements of the solution, such as: production, business rule, business process, data transformation, record mapper. And sometimes we can create and modify these elements with UI tools. And of course we need a handy and robust way to source-control the changes made with UI tools.

For a long time this was a manual (export class, element, global, etc) or cumbersome settings procedure, so the saved time with source-control UI automation was competing with lost time to setup and maintain the settings.

Now the problem doesn't exist any more. With two approaches: package first development and usage of IPM package git-source-control by @Timothy Leavitt
.

Meme Creator - Funny WOW IT REALLY WORKS Meme Generator at MemeCreator.org!

The details are below!

6 8
3 826
Article
· Dec 7, 2019 1m read
About %objlasterror

%objlasterror is a useful reference to the last error.

Every time $$$ERROR is called, %objlasterror is set to a result of this call.

It's important in cases where you want to convert exception to status:

Try {
   //  quality code
} Catch ex {
   Set sc = $g(%objlasterror, $$$OK)
   Set sc = $$$ADDSC(sc, ex.AsStatus())
}

Because AsStatus calls $$$ERROR under the wraps, the order is important, first you need to get %objlasterror and convert exception after that.

7 8
3 1K

Hi All,

I'm being asked if I can set up a AWS EC2 containerised version of IRIS and a separate AWS EC2 installation of Apache to serve IRIS web files.

Creating the Apache EC2 and containerised IRIS EC2 is the simple bit but getting them both to talk to each other does not seem quite so simple and I cannot find any documentation to describe how this can be achieved.

Has anyone else managed to achieve this?

0 8
0 424
Question
· Nov 7, 2022
Stream Compression

Does anyone have insight into how the Stream Global Compression works in 2022? I'm particularly interested in the XDSb repository on the Edges. As I understand it anything new will be compressed. Is there a compression method that is used that can be utilized by other code? How are the retrievals aware that the contents are compressed in order to de-compress them?

0 8
0 540

Hi Community!

Just want to share with you an exercise I made to create "my own" chat with GPT in Telegram.

It became possible because of two components on Open Exchange: Telegram Adapter by @Nikolay Solovyev and IRIS Open-AI by @Kurro Lopez

So with this example you can setup your own chat with ChatGPT in Telegram.

Let's see how to make it work!

6 8
1 348

Hi Community!

We're pleased to invite all the developers to the upcoming "Enterprise-grade Source Code Management" webinar on May 21st at 11:00 AM EDT.

You will learn how Deltanji from George James Software can control large scale InterSystems applications throughout the development, testing, deployment and maintenance cycle.

Presenters:
@George James, CEO, George James Software
@John Murray, Senior Product Engineer, George James Software

What is Deltanji and what will be demonstrated at this webinar?

2 8
0 477
InterSystems Official
· Nov 29, 2023
Introducing the Upgrade Impact Checklist

We are excited to announce a new part of InterSystems documentation that makes it easier to upgrade InterSystems IRIS® data platform, InterSystems IRIS® for Health™, or HealthShare® Health Connect. The Upgrade Impact Checklist at https://docs.intersystems.com/upgrade shows you all the things you need to consider – and only the things you need to consider – in an upgrade between any two versions.

18 8
3 441