Caché

Syndicate content 126 

Hello everyone!

Does anyone know of a library that can be used to create Mock objects for Objectscript classes?

Right now, my team has been building mock objects by hand to help circumvent dependencies when writing and executing unit tests, but I always wondered if someone had ever created a Mock library like Mockito to help quicken the process. 

Thanks!

Last answer 10 October 2017 Last comment 26 August 2019
+ 3   0 4
381

views

+ 3

rating

Does anyone have any experience with getting, unfortunately, an older version of Cache to authenticate via SMTP to send email? I have verified that the settings are set up properly on the mailbox as I have successfully sent an email from a LAMP server, which comes from the same IP address.

If you have any thoughts, I would greatly appreciate it.

 

This is the error I receive

ERROR #6034: SMTP server connection failed during MAIL FROM command: <READ>zSend+105^%Net.SMTP.1.

Last answer 26 August 2018 Last comment 25 August 2018
0   0 4
1174

views

0

rating

I cannot connect to Cache from node.js  

I have installed in Windows 10 the following: CACHE 2016, node.js v 4.4.7 and  express .

-  where can I get cache.node? The link in the Intersystmes documentation  http://globalsdb.org/downloads/  doesn't work. I found cache0100.node and cache0120.node  in my Cache instance's  \bin directory. But I am not sure if I can use them or not.

 - how to install cache.node ? Where do I place it exactly? 

Can anyone recommend any tutorial or code example with installation instructions?

Last answer 10 September 2016 Last comment 4 July 2018
+ 1   1 8
2204

views

+ 1

rating

What are the best steps for troubleshooting printing to a Windows printer from Cache.  The printer has been configured in the Windows Printer Manager and has been able to print a test page (from the windows print manager).

The device has been configured in Cache -> Sys Admin -> Config -> Device Settings -> Devices with properly formatted |PRN|printer device name and "W" for open parameters and 101 for Alias.

Last answer 16 February 2018
0   0 6
299

views

0

rating

One aspect of source code management is how to deal with the almost inevitable need to upgrade your Caché or Ensemble platform to a newer InterSystems release.

It's long been my experience that InterSystems does a very good job of maintaining backward compatibility. Code that works correctly on, say, 2012.1 is very likely to work correctly on, say, 2015.2 without any modification.

Last comment 18 March 2016
0   0 3
394

views

0

rating

Problem:

A file-based business service uses a local path on a Linux machine that is actually a mounted CIFS share. The mount is "soft" and is designed to not cache data, etc. There are times however when the remote system offering up the share (it's a Windows machine I believe) gets bounced or otherwise hung up the business service in the Ensemble production just hangs.

Last answer 30 July 2016
0   0 3
943

views

0

rating

Hi!

I am not system admin. But it used to be very simple to install CSP Gateway on an apache system on Linux with Apache installed. I used to run the CSP Gateway installation program and after it was done, all I had to do was fine tune some configurations on CSP Gateway portal on http://<ip>/csp/bin/Systems/Module.cxw and I was up and running.

Last answer 30 August 2017 Last comment 21 December 2016
0   0 4
658

views

0

rating

Hi,

 

I have been working on a csp page and trying to export it to excel using the standard activex object. I would like to know if it is possible to export the table on the page with formatting to excel? Thank you in advance for any insight.

 

Thank you,

Subba.

Last answer 23 August 2017 Last comment 22 February 2016
0   0 1
509

views

0

rating

Hi.

It is easy to receive JSON representation or dynamic Array from %ListOfDataTypes:

set l=##class(%ListOfDataTypes).%New()
do l.Insert("a")
do l.Insert("b")
do l.Insert("c")

set arrStr=l.$toJSON()
zwrite arrStr
set arr=l.$compose([])
zwrite arr

How to make backward conversion? How to receive %ListOfDataTypes from dynamic Array an JSON string?

I've tried

Last answer 30 June 2017 Last comment 8 February 2016
+ 2   0 2
796

views

+ 2

rating

I've been building up a REST services API, consisting of a dozen or so classes referenced from a Dispatch class, which has route mappings for the first piece of the URI.  I'd like to have the Dispatch class be able to output all of the available Services, with some documentation.  Is there something like a %Library resource that I could use to pull this information from each of the classes?

Thanks

Chris

Last answer 17 March 2017 Last comment 9 June 2016
0   0 0
479

views

0

rating

I want to generate a list object of routines from the ^$ROUTINE global without directly reading the [^$ROUTINE] global.


E.G. I want to create an array/variable/object with names of all routines that start with "ABC" so that an application process can use each routine name as input for a subsequent process.

Last answer 29 December 2016 Last comment 29 December 2016
0   0 0
304

views

0

rating

I have a server with public web application with Unauthenticated access and there seems to  be a problem that CSP session ends, but associated license persists for some time (hours). If several users log in, we can hit license limit and all the other users get 503 Service unavailable error.

We are currently debugging it and moving to authenticated web applications,  but is there a way to free these licenses quickly?

Here's how it looks like in SMP:

 

 

Last answer 14 December 2016
0   0 1
0

comments

389

views

0

rating

I see that there is an "Insert Special Character" option from the text editor where "é" can be selected, but would it be possible to create a "Caché" button that inserts the word "Caché"? I can see cases where mixing these words can be confusing. An even more important reason would be searching. If the word "Cache" is used instead of "Caché" in many places, it may be difficult to find information about the "Cache".


If a "Caché" button existed, it may encourage the correct spelling to be used. I am not sure if this is a real problem, but I see the possibility of it happening.

Last answer 8 December 2016 Last comment 13 December 2016
+ 1   0 2
393

views

+ 1

rating

Hi,

Thanks for your time.

Plain $ZF(-1) and $ZF(-2) calls from Cache Studio or Terminal have stopped launching the OS shell from Win10.

cmd (Windows Command Prompt) should be launched.

Configuration:

Windows 10 Anniversary Update, Ensemble 2016.2.0.585.0 Developer Edition x64

Is this common? I have enabled both %Developer role and a Cache CallOut privilege for all users that operate in this scenario.

In Terminal, W $ZF(-1) prints -1, W $ZF(-2) prints -1

In Studio, W $ZF(-1) hangs the IDE, W $ZF(-2) prints 0

Last answer 8 December 2016 Last comment 8 December 2016
0   0 1
535

views

0

rating

Hello folks,

      We have recently upgraded the cache (5.x) to cache 2016. All are working perfectly. But i am struggling in Telnet.

Working Good,

      when i connect to telnet it automatically gets the username(for example when we give the system ip addr(148.168.2.50), the ip address is taken as username) and directly goto the Password field in Telnet on old cache (5.x).

Now my problem is,

      I can't get the same from my new upgrade instance 2016. When i connect to telnet  it directly goes to username field but not to password field.

Last answer 7 December 2016 Last comment 7 December 2016
0   0 1
307

views

0

rating

Hello.  When you export and then import a table of data, is the import smart enough to figure out if a row already exists in the new namespace, and if so update the row rather than just save/add the row?

For example, we have a table in DEV, and the same table in QA.  The DEV table has more fields than QA.  When we moved up the class, the field definitions went with the table into QA, so now the table definition is the same in both.

Last answer 6 December 2016 Last comment 6 December 2016
0   0 1
252

views

0

rating

Hello Fellow Caché Developers,

The purpose of this post is to ask for everyone's thoughts and input around the use of transient, SQLCalculated/Computed properties within persistent classes.

This approach allows for extra data values needed in SQL queries to be available without having to join to other tables.

Very simple/basic example to illustrate the topic:

Let's say I have a persistent class named ICDAutoCodeDefn to hold ICD Auto-Coding definitions, such as:

Last answer 1 December 2016
0   0 1
0

comments

335

views

0

rating

I have a class which defines a property as array of %String. Is it possible to index values of this property and use this property in SQL?

I have tried 'Index idx On prop(ELEMENTS)' and then a select from the generated collection table, but this is still orders of magnitude slower than queries to the containing class.

Last answer 29 November 2016 Last comment 30 November 2016
+ 1   0 2
271

views

+ 1

rating

In writing some code on:

Cache for Windows (x86-64) 2015.1 (Build 429U) Fri Feb 13 2015 14:37:23 EST

I noticed an unexpected "ROLLFAIL" error when a Unique Index fail was generated in a %Save() call.

The object SHOULD fail to save, since the Unique criteria is not met, but I didn't expect to see a ROLLFAIL error as the "Last Error".

When running the following class code:

Last answer 17 November 2016 Last comment 28 November 2016
0   0 2
417

views

0

rating

Coming from a C/C++/C# background, I was expecting the & and | operators in Cache ObjectScript to perform bitwise operations on integers, but apparently they don't.

 

I checked the online documentation http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

but couldn't find any information on bitwise integer arithmetic.

 

So given the following code:

set x = 10  //bit pattern is : 1010

Last answer 27 November 2016 Last comment 27 November 2016
+ 1   0 1
395

views

+ 1

rating