Caché

Syndicate content 115 

This is a translation of the following article. Thanks [@Evgeny Shvarov] for the help in translation.

Someone posted a question on DC asking whether it was possible to determine access rights for a particular table row always at runtime, and if it was, how could one do that?
Answer: it is possible and it’s not hard at all.

Last comment 14 June 2017
0 3
251

views

+ 3

rating

Here's my issue. I've been using Sample.* globals and packages mapped to another development namespace to realize unit tests. So when I ran it, I notice that I forgot to start a transaction in order to be able rollback it to it's original data.

I assumed that I should use transactions since I was manipulating it's data but I didn't want it to be persisted.

Now I've lost all their default data. That's ok, or so I though... since I supposedly should run %Populate on the Sample.Company to have all data back (their integrity regarding the lost ones isn't relevant). However I notice that even though I could populate data back to Sample.Company, Sample.Employee wasn't being populated

Last answer 13 June 2017
0 2
0

comments

159

views

0

rating

Unless I'm mistaken, 2017.1 doesn't appear to support RFC 7523 (JSON Web Token Profile for OAuth 2.0 Client Authentication and Authorization Grants).  Is that coming in 2017.2?

In order to support it in 2017.1, I'd have to override the OAuth 2.0 token endpoint to cater for the additional grant types - what's the best way to do this?

 

Thanks.

Last answer 6 June 2017 Last comment 13 June 2017
0 2
364

views

0

rating

I know the process ID< and I know the global name: ^||testing(index).  From the terminal (and therefore, and different process ID), how do I view the contents of ^||testing() ?  Not the list of process private globals; the contents of this single PPG.

Thanks,

Laura

Last answer 12 June 2017 Last comment 12 June 2017
0 3
341

views

0

rating

Hi, Community!

Suppose I have class A with properties P1 and P2.

I want to introduce class B, which would have same records as Class A, but only  one property - P2.

What is the easiest  way to manage it assuming that I would like to use Class A to add records and be available for any operations to Users with Role A.

And I would like to introduce class B for Users with role B for read-only access.  Preferably they shouldn't even be aware of Class A and P1 existence .

What is the easiest way to introduce it and manage it?

Use some proxy-classes?  Property-level security?

Or to Introduce usual class B with only property P2 and manage the update operations together with Class A?

Last answer 9 June 2017 Last comment 10 June 2017
0 3
333

views

0

rating

It was InterSystems hackathon time and our team, consisting of Artem Viznyuk and me had Arduino board (one) and various parts of it (in overabundance). And so like that our course of action was set - like all other Arduino beginners, we decided to build a weather station. But with data persistent storage in Caché and visualization in DeepSee!

Last comment 8 June 2017
0 7
1086

views

+ 12

rating

Hi, Community!

Last weekend we held the Final of InterSystems Contest on InterSystems Caché and DeepSee as a part of IT Planet Student Championship in Sochi. BTW, this year we had about 2 000 participants in InterSystems Contest.

One of the tasks for the finals was to solve the following  with Caché ObjectScript and use the minimum code. 

Problem description

Write a method that would return the string 9876543210, however cls code should not contain numbers 0-9.

The goal is to write the shortest method.

Here's a method signature (it can't be modified)

Last answer 8 June 2017 Last comment 8 June 2017
0 7
515

views

+ 4

rating

I needed to use the OnGetNodeInfo callback of a Zen <dynaTree>, because this seems to be the only way to control the style separately for different levels of the tree. This post describes two discoveries I made.

How a dynaTree builds a tree via the OnGetNodeInfo callback

When you use a dynaTree with the OnGetNodeInfo callback, the dynaTree creates a series of nodes and displays them top to bottom in the order they were created.

0 1
0

comments

112

views

+ 3

rating

Hello experts,

I’m working on an "Sort After" (]]) bug that I traced back to some weird behavior in ObjectScript.  Perhaps someone can enlighten me…

The problem is as follows:

Let’s say we have:

Set A = “1.0”
Set B = “2.2”

If you execute the command ‘Sort After’ (]]), you get the following:

W A]]B
​1

…Which is wrong, A does NOT sort after B.  The output should be 0.

If you set A and B to numeric values, it correctly outputs false (0):

set A = 1.0
set B = 2.2
​W A]]B

0

I dug for a bit, and came up with this:   If you set  a numeric string to “<number>.0” an write the variable, it will be set as a string:

Set A = “1.0”
Set B = “2.2”

W​
A = “1.0”
B= 2.2

Last answer 8 June 2017 Last comment 8 June 2017
0 6
220

views

0

rating

The Cogs.JsonClass library is now available in the Cogs project on GitHub.

https://github.com/SeanConnelly/Cogs

Please see the README and the /docs folder on how to use the class.

Overview

The Cogs.JsonClass class provides a one step serialisation and deserialisation to and from Caché registered and persistent classes. It is not dependent on any other code and should be compatible with older versions of Caché.

The unit tests have been included in the update, but until I release the dependent Touchstone unit test solution it won't be possible to run these tests.

Please report any issues on the GitHub issues log.

I will post some benchmarks later in the week.

Sean.

Last comment 8 June 2017
0 6
446

views

+ 5

rating

This week I am going to look at CPU, one of the primary hardware food groups :) A customer asked me to advise on the following scenario; Their production servers are approaching end of life and its time for a hardware refresh. They are also thinking of consolidating servers by virtualising and want to right-size capacity either bare-metal or virtualized. Today we will look at CPU, in later posts I will explain the approach for right-sizing other key food groups - memory and IO.

So the questions are

Last comment 7 June 2017
0 4
2654

views

+ 11

rating

Hi people,


I am migration my web application of Cache 2013 to Cache 2016, in Cache 2013 I have a integration with a Java aplication using Java Gateway mapping proxy classes and consuming a method that param is a object, and it works perfectly.

But in Cache 2016 this integration don't work, I send the param as object but Cache send as String with the ref of object...


I maked a test, importing two classes used by the Java Gateway (%Net.Remote.Proxy and %Net.Remote.Gateway) of the Cache 2013 to Cache 2016 and integration come back it to works, but I don't see significant changes to justify.


Someone has a same problem?

 

Regards,

Lucas Boeing Scarduelli

lucas@scarduelli.com

Skype: lucas.scarduelli

Facebook/Twitter/Linkedin: @lucasscarduelli

Last answer 7 June 2017 Last comment 7 June 2017
0 3
229

views

0

rating

Hi,

I'm unable to locate a set of instructions that would allow me to encrypt the traffic to/from the Cache' Management Portal (that is - run it over HTTPS)

I am referring to the Management portal as hosted by the private Apache Web server instance installed with Cache. (I know how to do this for regular web sites hosted on, for example, IIS).

 

I would imagine the steps would involve, (a) enable SSL on that apache instance and (b) deploy certificates into the Apache web server.

Does anyone have a step-by-step guide on how this is accomplished ?

Thanks in advance - 

Steve

Last answer 7 June 2017 Last comment 7 June 2017
0 5
662

views

0

rating

We have a service that sends XML message. During unit test, I tried to resend the message with following scenario:

(1) If I leave the content blank, the original message will be resent in the ContentStream;

(2) If I post a new XML message, the new XML will be sent in the Content, the original message will be resent in the ContentStream;

(3) If I post a new XML message with very big length, it will be converted to 5@%CSP.CharacterStream, and following kind of error will be thrown:

ERROR #6901: XSLT XML Transformer Error: SAXParseException: invalid document structure (Occurred in an unknown entity, at line 1, column 23.)

Last answer 7 June 2017
0 0
0

comments

216

views

0

rating

Hello everyone,

 

I'm doing a REST service for integration between 2 systems. The system that invokes me expects a response object where only one of its attributes changes. It could be something like this:

Class ResponseCustomer  {
    Property Code As %String;
    Property Info As Customer;
}
Class ResponseAppointment {
    Property Code As %String;
    Property Info As Appointment;
}
Class ResponseCancellation  {
​    Property Code As %String;
    Property Info As %String;
}

To avoid creating almost identical objects for each of the methods of my REST service, I had thought to implement it with generic classes known in other languages like .NET or JAVA that allow to be able to define at run time the type of that parameter. In addition, that response must be able to be transformed into JSON. I imagine something like this (in pseudo code / COS / .NET):

Last answer 6 June 2017 Last comment 6 June 2017
0 5
260

views

0

rating

or "Things are going to break"

We left our application over the weekend, secure in the knowledge that it was returning data from our primary persistent class, User.Widget.  However, Widgets Direct are the premier supplier of both Widgets AND Widget Accessories, so we should really start working on adding these Accessories to our application. 

We should do some housekeeping first though.  Our Page Controlller code is currently sitting in the widgetmaster.js file.  As we start to build up our application and use multiple controllers, this will make the PageController hard to find, so we should refactor it into a sensible location and file name.  So let's create modules/page/PageController.js under our web application, and paste the code in there.  We can then remove the controller code from widgetmaster.j

Last comment 5 June 2017
0 0
560

views

+ 2

rating