Hi,
For a REST application, when a user connects, I have to write a message in an application log.
The login is processed by the /login routine by default.

How can I add a process to the login process?
Is there a callback ?
Should I create a login method in my class that extends %CSP.REST ?
I'm not sure and can't find information in the documentation ?

I try this (not working) :

<Routes>

<Route Url="/lists" Method="GET" Call="GetLists" />

<Route Url="/me" Method="GET" Call="GetUserInformations" />

0 11
0 140

Hi everyone,

Lately, I've been spending a lot of time with Visual Studio Code (VSC), and I've been wondering if there's a terminal or a panel within VSC that acts like the Intersystems Studio Output panel, which serves both as an input and output window and allows the execution of ObjectScript commands.

Could anyone help? Thanks :)

1 11
1 298

Hi everyone,

I'm working on a Business Operation whit an HTTP Outbound Adapter and I would like to know if is possible to adjust the FailureTimeout value based on the incoming message type. For example, I would like to have a FailureTimeout of 60 seconds for the standard operations and a FailureTimeout of -1 (wait forever) for few special operations that absolutely need a response.

Can we dynamically modify the FailureTimeout through code, based on either the incoming message type or a specified parameter?n the incoming message type or depending by a parameter?

0 10
0 403

Hi Community,

Can anyone point me to the docs that show how to add automatic class documentation for the arguments used in a method call? I can auto document the class, methods, properties etc. with the "///" but can't figure out how to get the nice argument documentation for the arguments used when calling a method.

Thanks in advance

0 10
0 130
Question
· Sep 12, 2023
Scoping OID / OREF map

It's a feature of ObjectScript (perhaps widely known, perhaps not) that if you open the same object ID multiple times, you end up with the same OREF. For example:

USER>set obj1 = ##class(Sample.Person).%OpenId(1)
 
USER>set obj2 = ##class(Sample.Person).%OpenId(1)

USER>w obj1,!,obj2
1@Sample.Person
1@Sample.Person

Generally speaking, this is an important feature - you won't end up accidentally modifying the same record via multiple paths and losing some of the changes.

2 10
2 297
Question
· Dec 4, 2023
Storage %SYSTEM.Event

Hello, How are you doing?

I'm currently developing a proyect in wich I want to use %SYSTEM.Event to process queues. I realized that if a queue has events pending to be sent to the listeners, when I restart the cube the queue with all its events are deleted.

Is there a way to store the queue with their messages in a Global?

I've checked the documentation but I can't find any option for this prupose.

0 10
0 241

This is for the veteran programmers out there (you know who you are; you started programming before date 60000).

I'm in the middle of updates for our system, and I've come across many $ZU() calls. Most of them are documented in the "Replacement List", but two are missing: $ZUtil(0) and $ZUtil(1).

I honestly don't remember what these are for (and I'm pretty sure I used them in code in a previous century), so if someone can tell me, great. If you can provide a link to a reference, better!

As always, I appreciate your help.

0 10
0 268

Still working on my first External REST API call, and I am struggling to find the exact answer I am looking for... I get a JSON response from my API call but I am not quite sure how to dynamically get the JSON response into the Ens.Response Object with its lists of Arrays that I have defined.

set tSC = ..Adapter.SendFormDataArray(.tHTTPResposne,"POST",tHTTPRequest,,,tURL)

0 10
0 341

Hello, I need to determine the best way to split a class containing multiple methods(about 20), into multiple classes in which each method is in its own class. I am wondering if there is another way other than manually creating the different classes, and copying each method into each class. Doing this in Intersystems Studio.

2 10
1 287

I have several 1GB journals from a LIVE server that I would like to inspect (eg: check which globals have been updated over the time).

Is there a simple way to view those journals using another IRIS instance ? (eg: local installation).

I have been tempted to put those files directly into the journal folder of my local installation and restart the system, however I am concerned that the transactions they contains will be restored and will corrupt the local database.

0 10
1 218

I have some databases in my cache instance that were created from an online backup file (.cbk). I would like to see the information for these databases in the Databases and SQL sections of Management Portal, but they only appear in the Classes section. I can navigate to the files in my cache instance terminal and see the CACHE.DAT files, and a check in the terminal shows that they are mounted.

This is what I see in the terminal for each database when I check to see if the databases are mounted:

%SYS>set db="/path/for/mydatabase"

0 10
0 205

We have a function that was written for us that allows us to create text files for logging certain aspects to the OS using %Stream.FileCharacter. We had no issues with this until we moved from AIX to Red Hat.

Now it seems the 1st time the function is called, and the file is created the permissions seem to be correct on the file. But as soon as we attempt to write another line to the file using MoveToEnd() it seems the permissions are changed on the file. I have been able to narrow the issue down to the MoveToEnd() by calling the function from different users.

0 9
0 396
Question
· Aug 17, 2023
ICMP/Ping with ObjectScript

Is it possible to "Ping" a remote host in IRIS for Health using ObjectScript? We host hundreds of TCP connections over hundreds of VPNs. I'm working on a project that would make it nice to have way to ping remove clients over the VPN to monitor connectivity and keep the tunnels alive.

Another thought/method would be to make an OS system call (AWS Linux), but I don't see a way to do that either.

1 9
1 255

I have a project where I will need to take an HL7 messages and transforms it into a multi-line flat file. I tried creating a complex record map but those require leading data to identify the record type I'm dealing with but based on the destination vendors spec they do not want any leading data prior to the actual data being sent. Also the lines in the output file require different pieces of data pull from different HL7 fields in the messages and in the third field in the flat file I need to generate a unique line number.

Any assistance would be greatly appreciated.

1 9
0 463

Hi,

I don't found how to get params send by a GET REST query (not in url but by request param).

this is config of the call in postman

I try to get %request.Data, doesn't work : Data is undefined

I try to get %request.GetCgiEnv("Data"), doesn't work, return ""

I do ZW %request and see that my parameter is present in cgi parameters, but I don't now how to access it.

0 9
2 308
Question
· Jan 17
VSCode New Files

The company I work for have a repository for one of our products which already contains both InterSystems and non-InterSystems source code. I'm in the process of trying to migrate us over to using VSCode to edit the InterSystems source but am stuck on some issues surrounding the files on disk and the routines in the IRIS instance.

0 9
0 110
Question
· Apr 13, 2023
Breaking a string into words

Is there any ObjectScript or a basic function that takes a string and separates it into words + punctuation/spaces array/list? Just not to reinvent the wheel. Say, process "It is a test, after all" into "It", space, "is", space, "a", space, "test", ", ", "after", space, "all". Or something to that effect.

2 9
0 319