Question Gunwant Kapade · Dec 4, 2018

This is the class which I want to test.

Class GSK.MyTestUnit Extends %RegisteredObject {

ClassMethod Add(num1 As %Integer, num2 As %Integer) { s res=num1+num2 q res } }

This is my testing class.

Class GSK.TestingClass Extends %UnitTest.TestCase {

Method test() { Do $$$AssertEquals(##class(GSK.MyTestUnit).Add(3,8),41, "Test Add(2,2)=4 passed ") do $$$AssertNotEquals(##class(GSK.MyTestUnit).Add(3,8),11,"pass/fail") }

}

The test cases are passed even though they should fail.

s ^UnitTestRoot="C:\TestSuite1" d ##class(%UnitTest.Manager).RunTest("Test2")

1
1 366
Question Tirthankar Bachhar · Dec 3, 2018

Hi,

When we define a %String property, and don't mention any MAXLEN, by default it uses 50 as defined in class %Library.String.

As a result, when we try to save data more than 50 characters, it fails with below error.

ERROR #7201: Datatype value 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' length longer than MAXLEN allowed of 50

This is very challenging when we parse data and tries to store it in SDA3 structure, because in many places its always set to 50, which is not enough.

12
0 2084
Question David Foard · Dec 3, 2018

I am trying to use %INLIST in  SQL query using a cursor and the query fails to return results. It appears that the variable I use against %INLIST returns an empty string. All the examples I have seen use result sets and build the query as a string. Is it possible to use %INLIST in a cursor-based query? Below is a a snippet of the code I am using:

Property mylist as %String (MAXLEN="") [InitialExpression = "route1, route2, route3"];

set routeList = $LISTBUILD(mylist)

&sql(DECLARE MyReport CURSOR FOR

SELECT

      ProcessStartDate,

      ProcessCompleteDate,

      ProcessName,

     RouteName

FROM

3
0 752
Question Scott Roth · Oct 12, 2018

In looking at the Production monitor within Ensemble, I was wondering if there is a way we could customize it for our use. I notice it is basically a dashboard.

For example I would only like to truly display those Services, Processes, and Operations that are truly in dire need of attention. The Monitor out of the box just seems too busy, and I would like to simplify it.

2
3 924
Announcement Evgeny Shvarov · Dec 3, 2018

Hi Community!

As you know or maybe guess we keep working on making Developer Community a better place for you, developers on InterSystems Data Platforms.

And here is the release on what we did in October-November.

Key visible enhancements:

better monthly digests,

InterSystems Best Practices,

Speed up mailings.

And a lot of small, but nice things - check the details inside.

0
0 212
Question Sean Connelly · Dec 3, 2018

It was mentioned in an earlier version of the IRIS documentation that IRIS and Cache should not be installed on the same physical server (port clashes?).

I can't see this warning in the current version of the documentation.

Could someone clarify if this has been resolved in the latest release of IRIS?

1
0 561
Article Dmitry Maslennikov · Nov 5, 2018 13m read

I bet that not everyone familiar with InterSystems Caché knows about Studio extensions for working with the source code. You can actually use the Studio to create your own type of source code, compile it into interpretable (INT) and object code, and sometimes even add code completion support. That is, theoretically, you can make the Studio support any programming language that will be executed by the DBMS just as well as Caché ObjectScript. In this article, I will give you a simple example of writing programs in Caché Studio using a language that resembles JavaScript. If you are interested, please read along.

6
6 1319
Question Eduard Lebedyuk · Dec 2, 2018

I'm using this code to read a file, line by line.
Most lines are shorter than 32767 symbols, but some are longer. No line is longer than $$$MaxStringLength and long strings are enabled.
Is there a param to Open/Read command I can pass to increase Read limit?
My code:

set filename = pFile
open filename:("R")
for  {
    use filename read x
    quit:$ZEOF=-1
    set ^dbg($i(^dbg)) = $lb($e(x,1,10), $e(x,*-10,*), $l(x))
}
close filename

I've checked reclen parameter but it did not seem to help
 

3
0 345
Question Anthony Harrison · Nov 9, 2018

We are trying to get a custom header that I have added to a request to Cache, and I have seen the following in another post, however it doesn't work for us:

You can do it as in any CSP page/class. With %request, which is object of class %CSP.Request

And headers available in property CgiEnvs, where every http header appear with a prefix HTTP_

So, you may try this code.

set ipCountry=%request.GetCgiEnv("HTTP_CF_IPCOUNTRY")

I have verified in Charles (a Mac equivalent to the Windows traffic sniffer 'Fiddler' program) that my client sent the following headers in the request to Cache:

4
0 1509
Announcement Evgeny Shvarov · Dec 1, 2018
0
0 229
Question William Casey · Nov 30, 2018

Hi, all.

I know this is basic, and I think I have done this before, but I haven't been successful this time.

In a Routing Rule, I would like to take the value of MSH:9.2, see if that value does NOT exist in a lookup table, and ultimately return out of the rule if true.

So, if my message is an "A05", but "A05" is not in a particular lookup table, then it evaluates to 1, and I execute my action of "Return" and the rule ceases processing.

Is there something incorrect with my sample code below?

..DoesNotIntersectList(HL7.{MSH:9.2}, "ValidAdt.lut") 

Thank you in advance for any insight!

Bill

1
0 441
Question Alexi Demetriou · Nov 20, 2018

Good morning,

Background to task: Shut down Ensemble from a task in Task Manager.

I have a batch file that shuts down Ensemble when run as administrator. I can confirm this works, as it brings up the shutdown/restart prompt for Ensemble, however I now need to plug this into Ensemble's Task Scheduler so it can be run on-demand.

At present I am trying to use: do ^execute: %windir%\system32\cmd.exe Z:\Scripts\shutdown.lnk

19
1 2144
Question Jiri Svoboda · Nov 9, 2018

Hi all,

I have an incoming JSON message with a string field exceeding in length the 'caché long-string limit' of 3641144 characters.

Using {}.%FromJSON(instream) I am able to create %DynamicObject properly. However, I am unable to access the long property, as in every assignment, I get the <MAXSTRING> error.

Is there any way for me to obtain contents of the 'too long' string field as a stream?

Thanks

Jiri

3
0 12591
Question Harkirat Dhillon · Oct 25, 2018

Hello, I need help in health insight. I am trying to generate reports on deep see but i am not able to pull in the patient ids as these are our requirements for the project. Can anyone help me in unlocking this feature. Can anyone help me with link to correct documentation on how to access the edge gateways of multiple facilities to access the clinical data on sql explorer.

3
0 532
Question Andrew Hubbard · Nov 19, 2018

When using the JSON_OBJECT() function in Caché SQL on a %String property that contains JSON syntax, it converts the %String into a JSON object instead of escaping it as a string literal. How can I prevent this? (without ridiculous hacks like "add a space to the beginning of the value" as we don't always know which properties will contain these values and I certainly don't want to have to check for nulls and add/remove a space every single place this value is used in the application)

I don't want these strings automatically marshalled into JSON objects.

For example:

12
0 1421
Question Bruno Soares · Oct 25, 2018

Hi everyone! My name is Bruno Soares and I work with HealthShare. I have one question and would be very grateful if someone help me. Can somebody tell me where HealthShare parameters weight came from? Thank you all. 

3
0 364
Question Rui Figueiredo · Nov 25, 2018

Hi,

I'm having the following error when returning a large dataset from a REST API.

"errors":[ {
            "code":5002,
            "domain":"%ObjectErrors",
            "error":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxx",
            "id":"CacheError",
            "params":["<STORE>%0NmGk1+5^xxxxxxxxxxxxxxxxxxxx"
            ]
        }
    ],
    "summary":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxxxxxxx"

My understanding is that this error is related to the amount of memory available. 

1
0 5050
Question Jack Mears · Nov 26, 2018

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation. 

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

Cheers

3
0 961
Article Eduard Lebedyuk · Mar 1, 2018 6m read

Everybody has a testing environment.

Some people are lucky enough to have a totally separate environment to run production in.

-- Unknown

.

In this series of articles, I'd like to present and discuss several possible approaches toward software development with InterSystems technologies and GitLab. I will cover such topics as:

  • Git 101
  • Git flow (development process)
  • GitLab installation
  • GitLab WorkFlow
  • GitLab CI/CD
  • CI/CD with containers

This first part deals with the cornerstone of modern software development - Git version control system and various Git flows.

1
4 4970