#Caché

30 Followers · 4.6K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Discussion Javier Llobet · Jul 8, 2020

I was trying the %JSON.Adapter backport to cache and try it also in IRIS and i found a kind of an issue regarding to export and object to json that is an inheritance of %ListOfObjects
If we have a list of elementtype of and object and then we try to export this to a json we get this json instead of a correct json.

exported json:

{
  "ElementType":"test.element",
  "Size":"1"
}

Json that we want:

[
  {
    "field1":"testField1",
    "field2":"testField2"
  }
]

Test classes:

Class test.elementList Extends (%ListOfObjects, %ZJSON.Adaptor)
{ 
 /// The type (class name) of the elements stored in the collection.
3
0 807
Question Gary Holt · Jul 6, 2020

Hi, we are in the process of looking to refresh our ensemble/cache environments. Currently we are using windows iis web servers with aix database servers, has any one compared cache running under windows,linux or aix ?

5
0 514
Question Peter Geerts · Jul 4, 2020

Forgive my possible intrusion.  

I am not currently involved (yet) in any Intersystems deployment and/or development.
However I was triggered by an piece of (Intersystems) documentation residing under the Intersystems website discussing options  regarding 
Using MTOM for Attachments.  (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
)
I this article there is the following sentence: 

By default, a Caché web service behaves as follows:

  • If it receives a request in an MTOM package, the web service sends the response as an MTOM package.
2
0 392
Question Yone Moreno · Jul 7, 2020

Hello,

We wonder how could we get the following attribute:

Which is found in the response Header being sent from a Operation to a Process, when there is an exeptionWwe would need to access the Response ErrorStatus text in the Process

We have already tried:

$$$LOGINFO("..%Process.%PrimaryRequestHeader.ErrorStatus: "_..%Process.%PrimaryRequestHeader.ErrorStatus) //It shows "1"

$$$LOGINFO("$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus): "_$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus))  //It shows an empty string
1
0 238
Question Mathew Lambert · Jun 23, 2020

I know that 1-1 relationships are not officialy supported by intersystems cache/iris so I want to know the best way to store data with this kind of data model.

Currently I have two classes that where implemented some time ago:

Table A with a relationship type one on table B

Table B with a relationship type one on table A

To compile I have a double compile with qualifyer U.

What is the best way to implement a data model with 1-1 relationships?

Thank you

6
0 730
Question Anthony Harrison · Jul 5, 2020

Hi, how do I add the POST body content to my Net.HttpRequest (It's not a key value pair, I am posting my own JSON to the remote server because it needs JSON in the body):

                set httpRequest=##class(%Net.HttpRequest).%New()

                set httpRequest.Https=1
                set httpRequest.Server="redacted.azurewebsites.net"
                set AbsolutePath="/api/redacted"
                set QueryString="?operation=redacted&id=redacted"
                 set status=httpRequest.Post(AbsolutePath_QueryString)
But how to add the Body to the request?
7
0 3410
Question Paul Coviello · Jun 22, 2020

Hi  I'm trying to setup STUNNEL between my pc and the cache database on the server,  I'm trying to define port 1972 on my pc with out any luck.

has anyone done this?

thanks 

Paul

11
0 566
Question Mark O'Reilly · Jun 26, 2020

We have code with the line 

Set archiveFilePath=##class(Ens.Director).GetItemSettingValue("ReadPDFFileService","Adapter","ArchivePath",.status)

When we have this archivePath set as a System Default setting rather than Production definition setting i.e. shows in blue rather than black in the restore default screen it doesn't get the setting value. We want to get this value nomatter what way it is set. 

Running 2016 Healthshare

5
0 510
Article Peter Steiwer · Jun 26, 2020 1m read

Now available on Open Exchange is a library of third party charts available to use within DeepSee/InterSystems IRIS BI dashboards. To start, simply download and install, select the new portlet as the widget type, then select the chart type that you desire. If you don't find the type of chart you are looking for, you can easily extend the portlet to implement your desired chart type. These new chart types can be used within existing dashboards or you can create new dashboards using them.

0
0 1196
Question Raymond Shadow · Jun 24, 2020

How do I compile a file through the command line?

I am generating a very basic csp page in a bash shell, it is generating fine and displays what I want to see as long as I go into studio and compile it .  This defeats my purpose of having the page and I am having no luck figuring out what I am doing wrong.  I think the issue has to do with the file not being included when I compile from command line.

Ver is 2017 running  RHEL 7

From command line I see

TST 3f2>DO $SYSTEM.OBJ.Compile("csp.vvmaccessnewrds","h")

Compilation started on 06/24/2020 09:47:26 with qualifiers 'h'
Compiling class csp.

3
0 769
Question Daniel McGowan · Jun 24, 2020

just wondered if there was a way to pass functions for execution to another function so that events can occur before and after?

like :

d ..MethodA(
   ..Method1("var"),
   ..Method2(0),
   ...
)

edit: 

I managed to get it working with execute but is there a cleaner (easier way)?

ClassMethod WriteSegment(Functions. As %String) As %Status
{
     w "Start",!
     f Fn=1:1:Functions {
          x Functions(Fn)
     }
     w "End",!
     Q $$$OK
}

ClassMethod WriteSomething(Arg As %String) As %Status
{
     w Arg,!
16
0 744
Question Arnold Cota · May 26, 2020

I am trying to set a varaible/property within JavaScript and use the value in my method.  The alert method below returns "0".  Do I have the syntax wrong?

/// Storage for current table row

Property currentTableRow As %ZEN.Datatype.string [ InitialExpression = 0 ];

set ..currentTableRow = "1"

&js<

    alert(zenPage.currentTableRow);
>

8
0 479
Question Mark O'Reilly · Jun 23, 2020

Hi:

We added a column to a table as follows 

Property SentTime As Ens.DataType.UTC;

And the code to populate this

if pStatus = "SENT" //set SentTime which is used in the Tableau Report
{
Set doc.SentTime = $$$timeUTC
}

For Historical records of type "Rejected" the Sent time is appearing though as 1840-12-31 00:00:00, we don't know why. Current docs work fine with this column just historical seems to display the default instead of blank/null. 

6
0 295
Question Flávio Lúcio Naves Júnior · Oct 28, 2019

Hello,

I am having a problem with SQL Select, the command in portal is OK, show all items, but when I use a CacheDataAdapter in VB .NET show the message 'Incorrect list format 0>=0'.  What could be this message? Because is the same SQL command.

Best Regards.

8
0 839
Question Michael Fimbres · Jun 18, 2020

Running Cache 2017.2.2.

I'm trying to make a REST API call in JSON format. When using the example in the class reference documentation the getJSON method in the %Net.Http class throws the error  <METHOD DOES NOT EXIST> on a %Clone() method in the %LIbrary.DynamicObject class. I even changed the parameter to a JSON string to no avail. The  code will then fail on the %Compose method (examples below). My workaround is to use the %Net.HttpRequest functionality. Is there another workaround to this?

Example As Is:

USER>set continents = ##class(%Net.Http).

2
0 341
Question Thomas Schroyen · Jun 17, 2020

Hello everyone,

In the purpose of my work, I have to implement a code that will communicate with a restful server coded in JAVA.

To fulfill my task, they gave me the link to the restful server + a certificate to use + the class that's going to be sent back +  the names of 2 functions:

Acces: https://XXX:8443/

First fonction: https://XXX:8443/patient/IdOfPatient

Second fonction: https://XXX:8443/patient/search/nameOfFunction?ndoss=Number

Object that returned:

{

"id" = ...

1
0 394
Question Yone Moreno · Jun 16, 2020

Hello,

We would like to learn how would you approach this task.

We would need to check every day a set of folders which are outside our server (in fact we could see them as if they were "inside" the server), then we need to check for modified or created files in the last day, and move all the ones which match the criteria to just one folder in our server.

We have thought about doing the following:

1) Create a task to run it each day:

Class Tareas.SaludPublica.EjecutarComando Extends %SYS.Task.Definition
{ Method OnTask() As %Status
{
 set tSC = ##class(Ens.Director).CreateBusinessService("Servicios.

5
0 790
Question Cristiano Silva · Jun 9, 2020

Hi guys,

I'm trying to consume a REST Service that use Digest authentication, I'm trying to implement the authentication but I'm don't know where is my mistake.

Someone have already used this type of authentication.

Below the code I wrote to try to generate the response hash:

 // Algorithm reference: https://en.wikipedia.org/wiki/Digest_access_authentication
 //
 // Test data:
 // Do TestDigest^HC.Debug("posstman", "password", "/digest-auth", "postman-echo.com", 80)
 // Do TestDigest^HC.Debug("usr", "pwd", "/digest-auth/auth/usuario/senha/MD5", "httpbin.
2
2 772
Question Henrique Dias · Jun 10, 2020

Hi Community, 

Is it possible to track Application Errors from a specific namespace? 

With the new API, I know we have the endpoint /alerts. 

But the endpoint /alerts, as described in the documentation: 

The /alerts endpoint fetches the most recent alerts from the alerts.log file and returns them in JSON format.

I want to create push notifications for Application errors in specifics Namespaces, and I don't know how to extract that information from there.

System  > System Logs  > View Application Error Log
Thanks,
Henrique

3
0 567
Discussion Eduard Lebedyuk · Jun 7, 2018

Application licensing enables InterSystems application partners to take advantage of Caché’s licensing capabilities for their own licensing purposes.

Caché manages customer application licenses just as it does Caché/Ensemble and InterSystems application licenses, maintaining usage counts and acquiring and returning user licenses as needed.

Application licenses consumed by a process or a CSP session are automatically released along with the Caché license consumed by the process or session when a process exits, halts or is deleted from the process table, or when a CSP session times out or is deleted.

More in docs.

Do you use this feature? If so, how?

I'm especially interested in license validation and general workflows?

4
0 493
Question Yone Moreno · Jun 15, 2020

Hello,

We would need to iterate all over the OBXs list and get their OBX3 CE1 to determine if it is the lab result we need to send to the output system.

We wonder how could we achieve this in a foreach component inside a Bussiness Process.

We think we would need to use a foreach because of it is needed to generate a message, for each one of the OBX which have the OBX3 CE1 that the output systems uses for the lab results.

1
0 705