Hi, Community!

Have a question for general discussion.

In ObjectScript we have cls for classes and mac code, which both compile into int code.

Is there any reason when you use mac instead of cls for non-persistent classes?

For me the benefits for cls are:

1. Inheritance and other OOP features

2. Auto-documented code

For mac one visible benefit is easier call in terminal:

do method^Utils(p1,p2)

vs

1 43
1 2.6K

I have a simple app which tries to establish a connection with a Cache database instance via Global API for Java:

import com.intersys.globals.Connection;
import com.intersys.globals.ConnectionContext;

public class Assignment {

    public static void main(String[] args) {
        Connection connection = ConnectionContext.getConnection();
        connection.connect("SAMPLES", "_SYSTEM", "SYS");
    }

}

The expection I am getting:

0 36
0 777

I am trying to fetch the data from cache database. But i got the error like "CSP application closed the connection before sending a responce".

Below is the query.

SELECT
CallbackComment
FROM SQ.CBPhoneResult_View Where PhoneDateODBC = '2018-04-09'

I have investigated and found that "CallbackComment" contains the special character single quotes " ' " for one result and due to this i got this error.

In this field data is enter by customer. so we cannot restrict them like Do Not use single quotes.

0 30
0 1.4K

I am working with a client to try and export a set of tasks defined in the Task Manager from one system to another. I am not seeing any API for this. I can query this information in SQL. So I tried to use the Data Export Wizard from the System Management portal in the SQL window. Export was fine. Importing failed with a "can't insert into read only field" error. Looking at the class definition does not help since the implementation details are not visible.

So how would one accomplish this? Export scheduled tasks from one system to another?

0 25
0 1.4K
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.7K

GraphQL is a standard for declaring data structures and methods of data access that serves as a middleware layer between the client and the server. If you’ve never heard about GraphQL, here is a couple of useful online resources: here, here and here.

In this article, I will tell you how you can use GraphQL in your projects based on InterSystems technologies.

17 24
10 2.4K
Question
· Jan 1, 2018
Send JSON Via HTTP request

Hi Guys,

Basically I'm looking for a sample what I can send data in aJSON format to a a webservice using an http request pls?

I've found some documentation on %Net.HttpRequest but a sample on how to connect to a Webservice and send data to it would be really helpful?

Our clients are running Cache & Ensemble 2014

Thanks

0 21
0 5.7K
Article
· Jan 31, 2018 3m read
Container - What is a Container?

Containers

With the launch of InterSystems IRIS Data Platform, we provide our product even in a Docker container. But what is a container?

The fundamental container definition is that of a sandbox for a process.

Containers are software-defined packages that have some similarities to virtual machines (VM) like for example they can be executed.

Containers provide isolation without a full OS emulation. Containers are therefore much lighter than a VM.

12 20
1 2.4K
Question
· Aug 16, 2018
%UnitTest.TestCase

I need to start doing unit testing for some of my code.

Why does it delete the unit testing class from Cache when I run the test?

Is there a way to turn this off?

0 20
0 582

Cache 2016.2.1.603 for windows)

I created a few classes and one class called jitPod.Api.toServer.additionalConsignments and realised even before I did any work,, that the word "Api" (note capital A) needed to be "api" (all lowercase)

it would not allow copying the class to the lowercase name because the directory already exists (i understand that)

so I exported the class to an XML, edited the xml to become lowercase "api" , deleted all the classes (and directory name) and re-imported the class.

0 19
0 720

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

0 19
1 1.7K

Hi,

I am sending a request message to Business Process which has one property as Dynamic Object type. So i get the JSON in my REST service and convert that as a dynamic object and set that in the request message and calling the business process from the business service. But the request is not getting sent to the Business Process. Is it possible to send dynamic object input to the business process.

0 18
0 836

InterSystems states that Caché supports at least three data models – relational, object and hierarchical (globals). On can work with data presented in relational model in a program written on C# the same way one works with any other relational DB. To work with data presented by object model in C# one needs to use .NET Managed Provider or some kind or ORM. And starting with version 2012.2 one can work directly with globals (or use direct access to hierarchical data) via Caché eXTreme for .NET.

4 18
2 1.9K

I am trying to determine the write-access to a windows-directory, using the method %File.Writeable(). But, this method always returns the boolean "true", even when I have revoked the write-access of Healthshare-user in this directory.

Note:
1) When the same ensemble-service tries to write a file in this directory (which it says is "writeable"), it fails.
2) The method %File.Writeable(...) works perfectly in the case of files.

Any help is appreciated.
Thanks in advance... :-)

1 17
0 856

I would like to examine the contents of my OBX-5 field and not route the message if it contains alphabetic characters. I've tried various combinations of the Match and Contains functions, with no luck. Should I be using the COS ? operator or plaini regular expressions?

e.g.

OBX-5 Contains "\D"

OBX-5 Contains "?.A"

OBX-5 Contains "[A-Z]"

0 17
0 1.3K

On one HealthShare servers (RH Linux, 2017.1.1), I am not able to login to Studio for this server. When I select the server connection from the notification tray icon, choosing Remote System Access, Studio, then the server, the error I getting is:

Unable to log on to server {Server Name}

Communication link failure

I've tried using both DNS name and IP address, same result. Using Atelier, I am able to connect to the server using the same DNS name and Web Server Port that I'm trying in Studio.

0 16
0 2.3K
Question
· Apr 13, 2018
Git behavior

We are going to start using Git within Cache.

One question came up - if the branch that you checked out does not have the class or mac file, what is the correct thing to do?

Should we delete from Cache or should we just keep it?

I'm leaning more towards deleting it because Cache should reflect what is in your work folder in git. But other team members are saying to keep it.

0 16
0 495