I am receiving the following error in my buisness operation:

ERROR <Ens>ErrException: <UNDEFINED>zGo2+181^mb.MbMainOperation.1 *tSC -- - registered as '-' number - @' set pResponse = ##class(mb.MbMessageResponse).%New()'

From what I understand, the problem occurs in the generated int file mb.MbMainOperation.1 in the method zGo2, with the offset of 181 lines, and the variable in question is a local variable tSC.

However, the line where the error occurs does not refer to tSC in any way

0 3
0 186
Article
· Mar 1, 2022 5m read
How to become a time lord - The birth

Good men don’t need rules.

The Doctor.

It's not an easy task to be a master of dates and times, it is always a problem and sometimes confusing in any programming language, we are going to clarify and put a few tips to make this task as simple as possible.

Get on the TARDIS and I'm going to turn you into a Time lord

Tardis

15 3
1 584

Hello,
as i'm trying to develop a operation and its methods (SQL adapter), I'm running into issues when i run my test class.
I have the class i want to test in the very same folder as my test class.
I followed the tutorial in the documentation.
When i run the test class, i get the following message error :

LogStateStatus:0::ERREUR #5002: Erreur Cache: <METHOD DOES NOT EXIST>zTestAdd+1^unitTests.testMyClass.1 *myMethod,Package.BO.MyClass

Here is my test class (heavily inspired bythe documentation :-) :

0 3
0 263

Hey everyone.

I have a process where I create a new %Stream.FileCharacter object, specify the filename (including it's path), write data to the stream, and then save. However for some reason, if the user account does not have write access to the directory, the %Save method is still returning true even though it was unable to actually write the file to the folder.

The location is a UNC path, and I'm wondering if this is tripping me up?

0 3
0 285
Question
· Jul 13, 2021
Initialise object list

How do you initialise a list of objects of a particular type?

I have tried the following code and I get an undefined when I try to insert.

I can do this and it works but I don't know if it is correct.

Is there any way to do something like this?

Set a= New list of Accciones()

Thank you.

0 3
0 229
Question
· Mar 7, 2023
Questions about using ZSTOP

I am working on setting up our Failover techniques as we move to a Mirror Environment with a Arbiter, 2 Failover Nodes, and a Async (DR) Node. There are some system commands that I would like to call when the Mirror moves, and I am working on a ZMIRROR routine for that, but I also wanted to create an additional step if we wanted to manually shutdown and for the Mirror to move. So I was looking at using ZSTOP to call a couple of different items while shutting down, while the documentation has an example a couple of questions come to mind about using ZSTOP.

0 3
0 259
Question
· May 23, 2016
REST and IO redirection

Problem: I have a REST broker, and if I hit a code block, which does IO redirection, the REST reply becomes broken in one of the following ways:

  • Binary output
  • No output
  • First 4096 characters of the reply are missing

Consider the following REST broker:

4 3
1 1.1K

With help from others here I had developed some code to take a Base64 PDF within a OBX.5 and save it locally to the file structure on the server.

I had to make a change to the code to return me a String so I can pass the Path back into Ensemble to use it in the message. When I made this change I am getting " ERROR #5034: Invalid status code structure ("/ensemble/data/transfer/AncillaryPDF/TMSAUDIO/Apr-11-1/980512729TMSAUDIO1046784936436537800.pdf")"

Here is the code...

0 3
0 1K

(Originally posted by @Ben Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":


Class benspead.EnsTablesSchema
{
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Continue:$listfind($lb("2.1.HL7","2.2.HL7","2.3.HL7","2.4.HL7","2.5.HL7","2.6.HL7","2.7.HL7","2.3.1.HL7","2.5.1.HL7","2.7.1.HL7","ITK.HL7")
                                    ,item)
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

1 3
0 773
Question
· Aug 15, 2019
List property

I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please.

0 3
0 454

Hi Developers!

Suppose you have a persistent class with data and you want to have a simple Angular UI for it to view the data and make CRUD operations.

Recently @Alberto Fuentes described how to build Angular UI for your InterSystems IRIS application using RESTForms2.

In this article, I want to tell you how you can get a simple Angular UI to CRUD and view your InterSystems IRIS class data automatically in less than 5 minutes.

Let's go!

7 3
4 991

Hi Community,

A long time ago, I create a package for a String datatype that works with Regular Expression. It is quite a simple solution.

This can work well with packages like the OpenAPI-Suite, where you can then use the "Regular Expression String" as the type for properties of the validator objects where the Swagger contained a Regular Expression.

I am proposing we start a common package of datatypes for use. The package name to use can be provided by the admins.

3 3
0 194

I'm trying to read the response to a long (indefinitely) running HTTP response with Transfer-Encoding: chunked. Ideally I'd be able to read the individual chunks from the response and do something with them as they arrive rather than needing to wait for the response to finish (because it never will) - ultimately I'm thinking to wrap these back up over a WebSocket connection which seems cleaner from an API perspective.

So far it looks like my options are:

1 3
0 668

Hello,

It is time for me to eat my own dog's food and start implementing unit test running with coverage :) I will be inundating IRC with questions at this point, but I have a more general question first.

In this tutorial, it is supposed that your unit tests are exported as XML first... But that's not very practical. Is there a way, instead, to run all tests from a given project without having this export?

My first thought on how to do this would be to:

1 3
0 566
Article
· Oct 18, 2016 7m read
Macros in the InterSystems Caché

In this article I would like to tell you about macros in InterSystems Caché. A macro is a symbolic name that is replaced with a set of instructions during compilation. A macro can “unfold” in various instruction sets each time it is called, depending on the parameters passed to it and activated scenarios. This can be both static code and the result of ObjectScript execution. Let's take a look at how you can use them in your application.

9 3
0 2.1K